Gizmo99
02-05-2006, 10:00 PM
Eho Team
https://vborg.vbsupport.ru/showthread.php?t=61305&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
$show['messageicon'] = iif($post['iconpath'], true, false);
Add Below
// 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)
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
Add Below
<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
https://vborg.vbsupport.ru/showthread.php?t=61305&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
$show['messageicon'] = iif($post['iconpath'], true, false);
Add Below
// 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)
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
Add Below
<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