PDA

View Full Version : Recoloring the "user online" links


Simon Moon
01-05-2002, 04:05 AM
I am trying to recolor the user online links. For this i need to edit index.php 2 times before this comes in place:
eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
I make the coloring depending on status. The higher rank you have, the stronger is your color. Anyways, thats not my problem at all. The real bummer is, that i cant seem to change the links color. I wanted to define an CSS style in the head part, for each of the levels, and then assign the CSS to the links.
This is how my forumhome_loggedinuser template looks like now
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid"
class="$usercolor_class">$username</a>$invisibleuser
now in the code in index.php i define $usercolor_class to be the name of the class.
if these are my styles:
.level_1 {
COLOR: #666666;
}
.level_2 {
COLOR: #888888;
}
i would assign "level_1" or "leve_2" to the $usercolor_class variable. It wont change the color at all, no matter what i do. So anyone got an idea what i could be doing wrong? I am sure its something simple, but i cant find the error.

Gimp
01-05-2002, 04:50 PM
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$loggedin[username]</i></b>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$loggedin[username]</b>";
} else {
$username = $loggedin['username'];
}


look in the index.php file for this and change it as like it fits ur needs no need to change the CSS or anything like that only the code

Gimp
01-05-2002, 04:56 PM
i think there was a hack like this though

Simon Moon
01-05-2002, 10:28 PM
Hi

This is standard in 2.2.1, but this is now what i am looking for. I want to recolor the links, but they DONT accept my recoloring at all. I want to recolor certain levels and the code is celar, but the CSS doesn seem to work. I checked it, my code works, so far, that it gets assigned to the links, but then my CSS doesnt work on those things. I have no clue why, so please, can anyone help me?

Gimp
01-09-2002, 04:45 PM
well u need a CSS program to do the job for you

Simon Moon
01-09-2002, 04:48 PM
Thanks, but teh solution is much simpler. make a variable for the color, and let it change in the index.php to an hex value you want it to have. Then change the "loggedinuser" template, by packing around the username a <font color="$user_color">username</font> and that will do the trick. Its not the nicest way, but at least one that works :)

Moonwolf
01-09-2002, 05:39 PM
You might want to check out the hack at https://vborg.vbsupport.ru/showthread.php?s=&threadid=32149, it might help point you in the right direction, if it isn't the solution you need.

Kathi

Dade
01-09-2002, 08:55 PM
Thanks Wolf :)