vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show UserGroup Rank Image/Images in Postbit (https://vborg.vbsupport.ru/showthread.php?t=107298)

Gizmo99 02-05-2006 10:00 PM

Show UserGroup Rank Image/Images in Postbit
 
Eho Team

https://vborg.vbsupport.ru/showthrea...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

The Chief 02-06-2006 05:01 PM

thats awesome, looking good :)

thanks!!

will install soon...

Hamednet 11-18-2007 07:42 AM

thanks

How do I this ?

https://vborg.vbsupport.ru/external/2007/11/16.gif

Hamednet 11-22-2007 05:30 PM

no body ?

Gizmo99 11-27-2007 05:33 AM

No this hack mate


All times are GMT. The time now is 08:42 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.01029 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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