View Full Version : Online.php with colors
LOD-squa
10-25-2002, 10:00 PM
Well I noticed that there wasn't a hack for online.php to have colors(or I didn't look right) Well I decided to make it so other people that have the who's online on index.php with colors so it will match with the online.php If you install this hack please click install (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=45002).
Go Here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=32149) for the version on the forum home.
Quiries:
4
File edits:
2 file
1 template
Pics on the next two post!
LOD-squa
10-26-2002, 12:00 AM
Pic 1:
LOD-squa
10-26-2002, 12:01 AM
Pic 2:
Matt87
10-26-2002, 02:05 AM
Nice... :D
LOD-squa
10-26-2002, 02:14 AM
thanks if anyone has problems just post it here.
Matt87
10-26-2002, 02:32 AM
I will install it tomorrow... Too tired now :D
LOD-squa
10-26-2002, 02:47 AM
BTW any comments are welcome.
Areku
10-26-2002, 12:25 PM
/me installs...
LOD-squa
10-26-2002, 02:43 PM
Good to hear four people installed it! And no problems so far.
jjdog2
10-26-2002, 03:27 PM
works well. Worked for me
LOD-squa
10-26-2002, 11:23 PM
Good to hear! :)
LOD-squa
10-28-2002, 01:15 AM
Edit members are blue now
Cyberhouse
10-28-2002, 07:34 AM
Installed... ;)
LOD-squa
10-28-2002, 08:23 PM
So no problems good!
Dark Jim
10-28-2002, 09:27 PM
Tip: Use replacements instead of colors in online.php. That way you can use it with more themes. :)
LOD-squa
10-28-2002, 10:05 PM
okay >_< you got me confused there.
Dark Jim
10-29-2002, 07:27 AM
Instead of something like:
if ($user['usergroupid'] == 6 and $highlightadmin) {
$userinfo["$key"]['username'] = "<font color=red><b><i>$user[username]</i></b></font>";
} else if (($user['usergroupid'] == 7)and $highlightadmin) {
$userinfo["$key"]['username'] = "<font color=green><b>$user[username]</b></font>";
Use:
if ($user['usergroupid'] == 6 and $highlightadmin) {
$userinfo["$key"]['username'] = "<font color={admincolor}><b><i>$user[username]</i></b></font>";
} else if (($user['usergroupid'] == 7)and $highlightadmin) {
$userinfo["$key"]['username'] = "<font color={modcolor}><b>$user[username]</b></font>";
Then create replacements {admincolor} and {modcolor}. If you have a white or black theme for example, coloring the admin color red is fine but what if you add another theme that is red? In that case you'll set the {admincolor} to something else for that theme. ;)
LOD-squa
10-29-2002, 06:00 PM
ah okay I'll be updating the file soon I just gotta test it on my own ^^
LOD-squa
10-30-2002, 02:05 AM
Hack edited thanks for the suggestion Dark Jim :)
LOD-squa
10-30-2002, 08:19 PM
anyone understand the file? About the replacements?
Dark Jim
10-31-2002, 10:14 PM
The who's online legend should also use those replacements. ;)
LOD-squa
10-31-2002, 10:16 PM
I forgot that let me edit it thanks for the reminder.
LOD-squa
10-31-2002, 10:18 PM
Attachment edited.
Dynamic One
11-01-2002, 06:57 PM
Thanks was searching for this hack. Nice job m8.
LOD-squa
11-01-2002, 09:13 PM
No Problem :)
We will be installing this soon... let you know how it goes!
Shadowblazer
11-05-2002, 04:59 AM
This is very similar to a hack that I've put in place on the boards that I help run. If I may be so bold, here's a suggestion that makes it easier to configure the colors in the admin cp. If you'd like to make it so that you can go into fonts/colors/etc for your styles and edit the colors from there (in the same manner that main colors and calendar colors are set), try this out:
Edit admin/style.php
find.makelinkcode("calendar colors","#calendarcolors")just after that add.makelinkcode("who's online colors","#whoonlinecolors")
Then find // *** calendar colors ************************************************
maketableheader("Calendar Colors","calendarcolors");
makestyleeditor("calbgcolor","Background Color",1);
makestyleeditor("caltodaycolor","Today Background Color",1);
makestyleeditor("caldaycolor","Calendar Date Font Color",1);
makestyleeditor("calbirthdaycolor","Birthday Font Color",1);
makestyleeditor("calprivatecolor","Private Event Font Color",1);
makestyleeditor("calpubliccolor","Public Event Font Color",1);
restarttable();just after that add // *** who's online colors ************************************************
maketableheader("Who's Online Colors","whoonlinecolors");
makestyleeditor("admincolor","Administrator Color",1);
makestyleeditor("supermodcolor","Super Moderator Color",1);
makestyleeditor("modcolor","Moderator Color",1);
makestyleeditor("membercolor","Regular Member Color",1);
restarttable();Now you (and your admins) don't have to fiddle with the replacements to set the who's online colors :)
It also helps to insert default values for these replacements into the replacement table. That way when a new style is created, you'll have some standard colors for the who's online ready to go. I've always done this by just running the SQL statements myself in phpMyAdmin. Anything with a replacementsetid of -1 is considered a default value and will be used if the replacementset you're using doesn't have a value set for that replacement, so something like
INSERT INTO `replacement` (replacementsetid,findword,replaceword) VALUES("-1","{admincolor}","#FF0000");
INSERT INTO `replacement` (replacementsetid,findword,replaceword) VALUES("-1","{supermodcolor}","#FF9900");
INSERT INTO `replacement` (replacementsetid,findword,replaceword) VALUES("-1","{modcolor}","#FFFF00");
INSERT INTO `replacement` (replacementsetid,findword,replaceword) VALUES("-1","{membercolor}","#000000");with the hex values for the colors you want in place of the ones I used. (Red, Orange, Yellow, Black). There's probably a way to do that all in one SQL statement but my SQL knowledge is somewhat lacking so I use four ;)
Hope somebody finds this useful. :D
LOD-squa
11-06-2002, 01:49 AM
Thanks for that I might be adding that to the hack.
LOD-squa
11-10-2002, 04:08 PM
Hack has been updated :)
Graphics
11-10-2002, 05:37 PM
Cool hack
* Seph clicks install
LOD-squa
11-16-2002, 03:54 PM
:) Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.