I have a plugin where I can have additional usergroups on profiles but I want to make it so it'll display on threads as well, is their a way to do this? Thanks!
Bumping this up. I still need this. Thanks!
Which plugin is that plz post your profile templete here
additional usergroup images plugin by jammerx2 works fine for me and shows additional groups in threads
May be just Pull all the groups from the database store them in some array, or variable & eval them using a for loop.
Like this:
$cache = $cache->read("usergroups");
$groups = explode(',',$memprofile['additionalgroups']);
foreach($groups as $group)
{
$userbarimage = $groupcache[$group]['image'];
$imghtml = "<img src=\"$userbarimage\">";
eval("\$groupimages .= \"".$imghtml."\";");
}
Now to go to your template & use {$groupimages} to display the images
I just made a raw code. Modify it as per your needs.
(2013-08-01, 10:29 AM)Cedric Wrote: [ -> ]May be just Pull all the groups from the database store them in some array, or variable & eval them using a for loop.
Like this:
$cache = $cache->read("usergroups");
$groups = explode(',',$memprofile['additionalgroups']);
foreach($groups as $group)
{
$userbarimage = $groupcache[$group]['image'];
$imghtml = "<img src=\"$userbarimage\">";
eval("\$groupimages .= \"".$imghtml."\";");
}
Now to go to your template & use {$groupimages} to display the images
I just made a raw code. Modify it as per your needs.
Why use "eval" ? No need, just concatenate the contents of $imghtml and use {$imghtml}:
Quote: $cache = $cache->read("usergroups");
$groups = explode(',',$memprofile['additionalgroups']);
foreach($groups as $group)
{
$userbarimage = $groupcache[$group]['image'];
$imghtml .= "<img src=\"$userbarimage\">";
}
Using EVAL to properly parse PHP VARS inside the $imghtml.
(2013-08-01, 10:38 AM)Cedric Wrote: [ -> ]Using EVAL to properly parse PHP VARS inside the $imghtml.
You don't need eval() for that. Double quotes expand variables.