vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Banned usergroup default avatar (https://vborg.vbsupport.ru/showthread.php?t=154315)

craiovaforum 08-04-2007 05:19 PM

Banned usergroup default avatar
 
How do I set a default avatar for the banned usergroup?
Is there any way to do this?
After the user is banned to modify his avatar with a default one.

Gray Matter 08-04-2007 08:01 PM

In postbit or postbit_legacy, find:

Code:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
and replace it with:

Code:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="<if condition="$post[usergroupid]==9">images/avatars/banned.gif"<else />$post[avatarurl]" $post[avwidth] $post[avheight]</if> alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
Change the red number to your banned usergroup's ID and the green URL to the URL of the avatar. Hope this works for you. :)

(Also, remember that this will only affect the avatars within posts, not within member profiles or any other part of the board. You will have to edit those manually if you wish to change them as well.)

craiovaforum 08-04-2007 11:24 PM

thanks, it works but I have some problem with the size of the image, it shows up like the original avatar of the person.

Gray Matter 08-05-2007 12:08 AM

Sorry, I failed to take that into account. I've edited the code I wrote in my original post and it should work fine now. :)

Spermy 08-21-2007 05:22 PM

How would you do it to have 2 different usergroups with 2 different pictures?

Reeve of shinra 08-21-2007 06:25 PM

HTML Code:

<if condition="$show['avatar']">

<if condition="$post[usergroupid]==9>
<td class="
alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]">
<img src="images/avatars/banned.gif"></a>
</td>

<else />

<if condition="$post[usergroupid]==10>

<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]">
<img src="images/avatars/banned.gif"></a>
</td>

<else />

<td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]">
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
</if>
</if>
</if>


wally 08-09-2009 05:09 PM

doesnt work in vb3.7.4 (i know old topic)

anyone a idea how to get this working in vb3.7.4 (or in 3.8.x)?


All times are GMT. The time now is 12:50 AM.

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.01699 seconds
  • Memory Usage 1,723KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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