2007-05-23, 08:16 AM
2007-05-23, 03:12 PM
DamYan Wrote:I found!
http://community.mybboard.net/showthread...7#pid50267
http://community.mybboard.net/showthread...9#pid53369
Thanks for advice
That won't work if you use that mod of CraKteR cause it's reading the usergroups from the cache =P
2007-05-23, 03:44 PM
LeX- Wrote:That won't work if you use that mod of CraKteR cause it's reading the usergroups from the cache =P
I have deacitvated this plugin and change some code in files and templates
2007-05-23, 03:57 PM
Yeah, that second one is what I had been looking for! Don't know why I couldn't find it, but at least you did! I'll try it again and see if it works!
edit: Hmmm...can anyone update that code for 1.2?
edit: Hmmm...can anyone update that code for 1.2?
2007-05-23, 04:40 PM
judel Wrote:Yeah, that second one is what I had been looking for! Don't know why I couldn't find it, but at least you did! I'll try it again and see if it works!
edit: Hmmm...can anyone update that code for 1.2?
Don't see much differents but OK =P
Code
$query = $db->query("SELECT title, namestyle, gid FROM ".TABLE_PREFIX."usergroups ORDER BY title ASC");
$usertitles = "";
while($usertitle = $db->fetch_array($query))
{
$format = $usertitle['namestyle'];
$userin = substr_count($format, "{username}");
if($userin == 0)
{
$format = "{username}";
}
$format = stripslashes($format);
$usertitles .= "[ ".str_replace("{username}", $usertitle['title'], $format)." ]";
}
Template
<tr> <td class="tcat"><strong>Group Legend</strong></td></tr>
<tr> <td class="trow1">{$usertitles}</td></tr>
2007-05-23, 04:43 PM
Lex, does that code replace something? Where does it go? And I mean the first part. I know where the second part goes in the template.
2007-05-23, 04:49 PM
judel Wrote:Lex, does that code replace something? Where does it go? And I mean the first part. I know where the second part goes in the template.
At the same place that Zaher told in his post
http://community.mybboard.net/showthread...9#pid53369
In your index.php above the eval of 'whosonline' template =P
2007-05-23, 06:47 PM
I will update your code LeX with code from http://community.mybboard.net/showthread...7#pid50267
Code
Template
And effect is:
[attachment=6351]
Code
$query = $db->query("SELECT title, namestyle, gid FROM ".TABLE_PREFIX."usergroups WHERE gid!=1 ORDER BY isbannedgroup ASC,showforumteam DESC, issupermod DESC, usertitle ASC");
$usertitles = "";
while($usertitle = $db->fetch_array($query))
{
$format = $usertitle['namestyle'];
$userin = substr_count($format, "{username}");
if($userin == 0)
{
$format = "{username}";
}
$format = stripslashes($format);
$usertitles .= "[ ".str_replace("{username}", $usertitle['title'], $format)." ]";
}
Template
<tr> <td class="tcat" colspan="2"><strong>Group Legend</strong></td></tr>
<tr> <td class="trow1" colspan="2">{$usertitles}</td></tr>
And effect is:
[attachment=6351]
2007-05-23, 08:32 PM
Hmmm..I guess I was hoping there was something I could change in the actual plugin, so I wouldn't need to make any core file changes.
2007-05-23, 08:39 PM
judel Wrote:Hmmm..I guess I was hoping there was something I could change in the actual plugin, so I wouldn't need to make any core file changes.
You could use the query instead of reading it from the cache =P