vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Default Avatar for Usergroups? (https://vborg.vbsupport.ru/showthread.php?t=294253)

Tyran1 01-22-2013 06:19 PM

Default Avatar for Usergroups?
 
I need a default Avatar for usergroup X and for usergroup Y!!

Can help me??

Sorry for my English i am vom Germany

Tyran1 05-07-2013 09:33 PM

Can i help me?

blind-eddie 05-08-2013 01:04 AM

In 3.8 series, you can set permissions per user group to use certain avatars.
Look in acp Avatar Manager, create new categories, add an avatar to that category and only allow the user group you want to use that avatar via Avatar Manager/permissions.

Tyran1 05-09-2013 03:10 PM

Quote:

Originally Posted by blind-eddie (Post 2420617)
In 3.8 series, you can set permissions per user group to use certain avatars.
Look in acp Avatar Manager, create new categories, add an avatar to that category and only allow the user group you want to use that avatar via Avatar Manager/permissions.

I know that, but an avatar should have automatically each or two user groups!

blind-eddie 05-09-2013 10:00 PM

The Avatar will not automatically appear unless you do as I stated & as you said you already know...

Lynne 05-09-2013 10:33 PM

Could do a plugin:
hook location - postbit_display_complete

PHP Code:

if (is_member_of($this->post,x)) {
$this->post['avatarurl'] = "http://yoursite.com/path/to/avatar.jpg"
$this->post['avwidth'] = 'width="100"'
$this->post['avheight'] = 'height="100"'


replace x with the usergroupid and enter the correct path to the url and the correct width and height. That should work for the postbit (I think, I haven't tried it). Just do similar for wherever else you use avatars.

Tyran1 05-12-2013 09:27 AM

Thanks!!

YungAnh 05-14-2013 05:52 AM

Quote:

Originally Posted by Lynne (Post 2420970)
Could do a plugin:
hook location - postbit_display_complete

PHP Code:

if (is_member_of($this->post,x)) {
$this->post['avatarurl'] = "http://yoursite.com/path/to/avatar.jpg"
$this->post['avwidth'] = 'width="100"'
$this->post['avheight'] = 'height="100"'


replace x with the usergroupid and enter the correct path to the url and the correct width and height. That should work for the postbit (I think, I haven't tried it). Just do similar for wherever else you use avatars.

Hi Lynne, Can you help me with the code of adding a frame to certain user group avatar - frame 1 for group 1 and frame 2 for group 2-?
This look like what I could try but I can't figure out how.
I'm using vbb 3.8 and postbit, not postbit_legacy
I also had several image of the 100x100 frame in png file.

Lynne 05-14-2013 03:06 PM

Did you try the code I posted? I don't think it matters if it is for postbit or postbit_legacy.

YungAnh 05-14-2013 05:05 PM

Hi Lynne,
No I didn't. The code you posted was to replace usergroups' avatars to default avatars. I want them to have their own avatar, I just want to add a frame/border around their avatar. Just like in the demo here

http://us.battle.net/sc2/en/forum/topic/628075820

Moderator group has green frame while normal user has blue frame.

darnoldy 05-14-2013 09:11 PM

Quote:

Originally Posted by YungAnh (Post 2422032)
I want them to have their own avatar, I just want to add a frame/border around their avatar.

If you want a simple colored border based on user group, you can do it by editing the proper postbit template and defining a sequence of classes in your css.
Look for the following code in the postbit:
PHP Code:

<img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" style="margin:0;padding:0;border:1px solid #fff;" /> 

Then change it to:
PHP Code:

<img src="$post[avatarurl]class="$post[usertitle]$post[avwidth$post[avheight]  alt="<phrase  1="$post[username]">$vbphrase[xs_avatar]</phrase>"  style="margin:0;padding:0;" /> 

In your css, make the following line for each usertitle:

HTML Code:

img.usertitle {border: 2px solid #00f;}
[adjust values to suit your needs]

--don

YungAnh 05-14-2013 11:49 PM

Hi Don,
Thank you very much for the help. Wish there is a thank button here. But I actually had some frames ready just like in the blizzard forum in the demo above and would like to use those frames for different user group.

YungAnh 05-18-2013 06:18 AM

So no one can help me? :(

darnoldy 05-18-2013 12:57 PM

With a quick look at the site to which you linked, it looks like they surrounded their avatars with a div, then set the background image of that div to the appropriate frame by using classes.

I hope this gives you a place to start.

YungAnh 05-19-2013 12:36 AM

Quote:

Originally Posted by darnoldy (Post 2422841)
With a quick look at the site to which you linked, it looks like they surrounded their avatars with a div, then set the background image of that div to the appropriate frame by using classes.

I hope this gives you a place to start.

It sounds ... too complicated for me.
Do you mean they use something like this: user postbit background
https://vborg.vbsupport.ru/showthrea...ground+postbit
But is it going to be a tight fit. I'm not a computer guy, I learned to do these stuff on my own.
Thank you for your time helping me.

darnoldy 05-19-2013 03:48 AM

Quote:

Originally Posted by YungAnh (Post 2422918)
It sounds ... too complicated for me.
I'm not a computer guy, I learned to do these stuff on my own.

That's how most of us learned how to do stuff.

No, you do not need a plugin or a mod. You need to edit the postbit template, and write a selector into the additional CSS.

Create a new style and edit it. If you mess it up, delete it and create a new one so you can try again. That's how you learn.

--don

YungAnh 05-19-2013 05:55 PM

I see.
Thanks for the clarification but I think it is out of my hand. :|

Terrablade 10-23-2013 09:14 PM

i got this....
Parse error: syntax error, unexpected $end in /home/cracking/public_html/includes/class_postbit.php(294) : eval()'d code on line 131

vb 3.8.7 pl3

Quote:

Originally Posted by Lynne (Post 2420970)
Could do a plugin:
hook location - postbit_display_complete

PHP Code:

if (is_member_of($this->post,x)) {
$this->post['avatarurl'] = "http://yoursite.com/path/to/avatar.jpg"
$this->post['avwidth'] = 'width="100"'
$this->post['avheight'] = 'height="100"'


replace x with the usergroupid and enter the correct path to the url and the correct width and height. That should work for the postbit (I think, I haven't tried it). Just do similar for wherever else you use avatars.


ozzy47 10-23-2013 10:43 PM

Sounds to me like you missed something in the c/p pate the exact code in your plugin here.


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01176 seconds
  • Memory Usage 1,778KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (5)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete