vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Miscellaneous Hacks - Banned User Profile Replaced by Custom Image (https://vborg.vbsupport.ru/showthread.php?t=160533)

cheat-master30 10-17-2007 10:00 PM

Banned User Profile Replaced by Custom Image
 
The premise of this mod is simple; it replaces the avatar of a banned user with a picture you want to replace it with, maybe a banned image or something that humiliates the member.

This allows you to put 'Banned' avatars to decent use (those that say banned on them in big, bold letters).

Updates:

Version 1.0: Released

Version 1.1: Replaced MEMBERINFO template change so the 'No Avatar' mods work with this...

Version 1.2 Released which allows this to work on the Legacy Postbit.

How to use:

First, find in Postbit:

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>
Replace with:
Code:

<if condition="$show['avatar']">
<td>
<if condition="is_member_of($post, 8)">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="images/avatars/banned.PNG" alt="Member is Eliminated" title="Member is Eliminated" /></a>
<else />
<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>
</if></td></if>

Then, in Memberinfo template, find:

Code:

<if condition="$show['avatar']">
                <td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
            <else />
                <td>&nbsp;</td>
            </if>

And replace with:
Code:

<if condition="$show['avatar']">
<td>
<if condition="is_member_of($post, 8)">
<a href="member.php?$session[sessionurl]u=$vbulletin->userinfo[userid]"><img src="images/avatars/banned.PNG" alt="Member is Eliminated" title="Member is Eliminated" /></a>
<else />
<a href="member.php?$session[sessionurl]u=$vbulletin->userinfo[userid]">
<img src="$userinfo[avatarurl]" userinfo[avwidth] userinfo[avheight] alt="<phrase 1="$vbulletin->userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
</a>
</if></td></if>

Screenshots and Banned Image I used below (or use a banned image from one of the many avatar packs that has them even though they aren't usable by default):

To add to Legacy Template, search for avatar and change that part of the code to:

Code:

<if condition="$show['avatar']">
<if condition="is_member_of($post, 8)">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="images/avatars/banned.PNG" alt="Member is Eliminated" title="Member is Eliminated" /></a>
<else />
                <div class="smallfont">
                    &nbsp;<br /><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>
                </div>
            </if>
</if>

Common Questions

1. How do I change the image URL for the banned avatar?

You replace images/avatars/banned.PNG with whatever you want to replace it with.

2. What's with the basic default image?

I needed a default, had short time and my board has a distinct gaming theme, therefore the default is of a Glum Reaper from Super Mario RPG.

3. It don't work!

Make sure banned users can use/display avatars. Then the mod should work.

4. Can I submit a banned image?

Yes

Thanks to:

whitemike for saying why the original code did not work in the profile.

Myself for obvious reason.

Anyone reading/using/installing this for their thanks.

cheat-master30 10-18-2007 09:34 PM

Oh, and to add:

You can translate for use on other official sites. I can redistribute it and you can also translate for unofficial sites in other languages, or use as long as minor credit is given to those who helped in this.

ninjamaster 10-19-2007 07:33 AM

thanks nice work

cheat-master30 10-19-2007 08:10 PM

No problem. Oh, and new version released; optional if you upgrade...

bada_bing 10-20-2007 02:24 AM

reserved .....

McMendo 10-20-2007 11:37 AM

The first line of code to remove is found in the postbit template, but not in the postbit_legacy.

cheat-master30 10-20-2007 12:45 PM

Ah. I'll fix that later; should take just a few minutes.

cheat-master30 10-22-2007 03:09 PM

Quote:

Originally Posted by McMendo (Post 1364295)
The first line of code to remove is found in the postbit template, but not in the postbit_legacy.

Fixed. Try the new piece of code in the Legacy Template and tell me if it works.

McMendo 10-25-2007 12:36 PM

Quote:

Originally Posted by cheat-master30 (Post 1365969)
Fixed. Try the new piece of code in the Legacy Template and tell me if it works.

It works, but not with all banned users. I imagine that it only works with those who had an avatar.

Thank You.

cheat-master30 10-25-2007 01:37 PM

That is correct. I had once disabled avatars for banned users, and then this ceased working. You are right; anyone using this must enable avatars for banned users. I think replacing the profile picture as well would be nice...


All times are GMT. The time now is 02:38 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.01037 seconds
  • Memory Usage 1,748KB
  • 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
  • (5)bbcode_code_printable
  • (3)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
  • (10)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