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)

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 01:45 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.01196 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete