vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Online.php with colors (https://vborg.vbsupport.ru/showthread.php?t=45002)

LOD-squa 10-25-2002 10:00 PM

Online.php with colors
 
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.

Go Here 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:
PHP Code:

        if ($user['usergroupid'] == 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:
PHP Code:

        if ($user['usergroupid'] == 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 :)

dm02 11-03-2002 04:05 PM

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
PHP Code:

.makelinkcode("calendar colors","#calendarcolors"

just after that add
PHP Code:

.makelinkcode("who's online colors","#whoonlinecolors"

Then find
PHP Code:

    // *** 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
PHP Code:

    // *** 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
[sql]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");[/sql]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


All times are GMT. The time now is 03:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01095 seconds
  • Memory Usage 1,789KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete