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)

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


All times are GMT. The time now is 07:16 PM.

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.01403 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete