Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-13-2000 Last Update: Never Installs: 0
 
No support by the author.

How hard would it be to set things up such that the board had one look during the day and another at night? Not changing much--colors, bbtitle, and on/off icons so that at 6am the day style is seen and at 6pm the night style blinks on. It would be nice if we could set the times. Or does such a hack already exist?

[Edited by Shoe on 07-13-2000 at 08:35 AM]

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-15-2000, 02:16 AM
Guest
 
Posts: n/a
Default

Thanks for all the feedback. maybe it is more trouble than it's worth but I thought it would be a nice touch to have a day vs a night look.
Reply With Quote
  #13  
Old 07-15-2000, 05:44 PM
Guest
 
Posts: n/a
Default

This can be done rather easily, except for the bbtitle and posting images. If you can live without those, you're good to go...

Actually, you _can_ do it with those images as well

Here's how.

Open up global.php (not in the admin dir), and look for:
Code:
// load vars
$vars=$DB_site->query("SELECT * FROM replacement ORDER BY replacementid DESC");
Replace with:
Code:
if (date("G") < 18 && date("G" > 6) {
// load vars
$vars=$DB_site->query("SELECT * FROM replacement ORDER BY replacementid DESC");
}
Look for:
Code:
  $DB_site->data_seek(0,$vars);
  while ($var=$DB_site->fetch_array($vars)) {
    $newtext=str_replace($var[findword],$var[replaceword],$newtext);
  }
Replace with:
Code:
if (date("G") < 18 && date("G" > 6) {
  $DB_site->data_seek(0,$vars);
  while ($var=$DB_site->fetch_array($vars)) {
    $newtext=str_replace($var[findword],$var[replaceword],$newtext);
  }
} else {
    $newtext=str_replace("<body>,"<body bgcolor=dark>",$newtext);
    $newtext=str_replace("<largefont,"<font color=dark",$newtext);
    $newtext=str_replace("</largefont>","</font>",$newtext);
etc...
}
The entire else statement should be a manual duplication of the normal dovars subroutine, so go look in your replacements table, and do what I started, except change the values and colors to what you want it to look like at night.

You can also add bbtitle.gif to the first variable in str_replace, and use the darktitle.gif name in the second variable. This will replace that image, and you can do the same for newpost, postreply, etc.

Ask if you have any questions.

Oh, and this was coded in my web browser, so there might be one or two stupid errors.
Reply With Quote
  #14  
Old 07-16-2000, 02:00 PM
Guest
 
Posts: n/a
Default

That seems a lot of clart on when you can just put replacement variables in the header!
Reply With Quote
  #15  
Old 08-11-2000, 09:57 PM
Guest
 
Posts: n/a
Default

"It is extremely complicated though unless you know every visitor to your site is in the same part of the world, to work properly you would have to get them to input their latitude and longditude and correct current timezone and have access to forumulas which will calculate sunrise and sunset times for everywhere around the world - not an easy task."

No, actually it would be possible to do something like visualtraceroute.datametrics.org on a couple of packets. Using that info it could customize it. It could also ask for the users time zone and customize it for each user.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:39 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.03878 seconds
  • Memory Usage 2,227KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete