Back to vBulletin 3.0 Add-Ons

Show UserGroup Rank Image/Images in Postbit
Mod Version: 1.00, by Gizmo99

This modification is in the archives.
vB Version: 3.0.9 Rating: (0 vote - 0 average) Installs: 1
Released: 06 Feb 2006 Last Update: Never Downloads: 0
Supported Template Edits Code Changes  

Eho Team

http://www.vbulletin.org/forum/showt...5&page=2&pp=15

Gave me the idea so here Goes

Got Images assign via ranks to usergroups ? well problem is only the primary user group, rank will display !! so how do u get more than the primary to apear ? see below and see attached

There are 2 if .. continue test. It works but if it can be done better/slicker PM me

NOTE: There are modifications for both postbit and postbit_legacy templates!

Open includes/functions_showthread.php and find
PHP Code:
 $show['messageicon'] = iif($post['iconpath'], truefalse); 
Add Below
PHP Code:

// Rank Image Hack
    
$show[rank_images] = 1;
    
$membergroupids explode(',',$post[membergroupids]);

// For Every groups belonged to go through them 
    
foreach ($membergroupids as $group)
    {

// If user does not have any addtional groups end
        
if (!$group) {
        continue;
        }

// Do the query to get images file names per usergroup based on rank
        
$other_rank_db=$DB_site->query_first("SELECT rankimg FROM ranks WHERE usergroupid='$group'");
        
$other_rank=$other_rank_db[rankimg];

// if there is no images attached to the rank skip
        
if (!$other_rank ) {
        continue;
        }

// build the output
        
$membergroups .= '<img src="'$other_rank.'" /><br>';
    }
// End Rank Image Hack 
Right time to edit Postbit or Postbit_Legacy templates (need to do each style if you have more than one )

Open postbit and find (but upto you there you want it)
PHP Code:
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if> 
Add Below
PHP Code:
 <if condition="$show[rank_images]">$membergroups</if> 
Done

Should Take 10 mins, remember to back up your files before editing ANYTHING !!

Click the Install button, Have only tested it on 3.0.9 BUT .....

Giz
http://bbs.rsownersclub.co.uk

Download

No files for download.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024