User Color Legend Mod request
#11
Hello there, use this version it is easier.

open ./index.php

find

eval("\$whosonline = \"".$templates->get("index_whosonline")."\";"); 

above it add
$query = $db->query("SELECT title, namestyle FROM ".TABLE_PREFIX."usergroups");
$usertitles = "";
while($usertitle = $db->fetch_array($query)) {
$usertitles .= "[".str_replace("{username}", $usertitle['title'] , $usertitle['namestyle'])."] "; 
} 

now in the Admin CP >Templates > Modify / delete > expand > index page templates > index_whosonline

find

<tr>
<td class="trow1"><span class="smalltext">$lang->online_note<br />$onlinemembers</span></td>
</tr>

below it add

 <tr> <td class="tcat">Group Legend</td></tr>
<tr> <td class="trow1">$usertitles</td></tr>


regards
Reply
#12
Hench, thats what i was looking for ^_^ cheers dude
[Image: forum_sig.gif]
Reply
#13
Where are those classes called from? That is, the tcat and trowl?

BTW, I prefer the text to be a bit smaller for the legend since I have many groups...so altering it this way:

<tr> <td class="tcat">Group Legend</td></tr>
<tr> <td class="trow1"><span class="smalltext">$usertitles</span></td></tr>

Works a bit better. Now I have to run and setup my colors Big Grin
Reply
#14
the tcat and trow1 is in the global css theme in your admin CP.
Reply
#15
This user has been denied support. This user has been denied support.
Well Ive maded What zaher told.. But Look How the Legend look:
[Image: 45a78e57e0.jpg]
Reply
#16
You also need to add a colspan (seems like you already modified the template adding some columns)

<tr> <td class="tcat" colspan="2">Group Legend</td></tr>
<tr> <td class="trow1" colspan="2">$usertitles</td></tr> 

regards
Reply
#17
This user has been denied support. This user has been denied support.
Ou...
Thank you verry much ZAHER !!!
Reply
#18
Is there any way to alphabatize the usertitle list??
Jude

If I post in your thread, please do not PM me for more help! Thanks!


Reply
#19
Replace
$query = $db->query("SELECT title, namestyle FROM ".TABLE_PREFIX."usergroups");
with
$query = $db->query("SELECT title, namestyle FROM ".TABLE_PREFIX."usergroups ORDER BY title ASC");
Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Reply
#20
Jude

If I post in your thread, please do not PM me for more help! Thanks!


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)