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
  #2  
Old 07-13-2000, 01:32 PM
Guest
 
Posts: n/a
Default

That... sounds complicated but doable. I'm not sure if it needs this but it sounds like it needs a cron job.
Reply With Quote
  #3  
Old 07-13-2000, 02:19 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by SonnetCelestial
That... sounds complicated but doable. I'm not sure if it needs this but it sounds like it needs a cron job.
hmmm... so maybe I could just copy vb files from a day and a night directory into the forums directory whenever it's 6am or 6pm?

How would I set cron to do this?

[Edited by Shoe on 07-13-2000 at 11:19 AM]
Reply With Quote
  #4  
Old 07-13-2000, 03:46 PM
Guest
 
Posts: n/a
Default

actually, all you need is a different template for each "zone", and change the templates in the html...

this is a simple, but very time-consuming hack. for practically each template call you need a if day then this else do that.
Reply With Quote
  #5  
Old 07-13-2000, 04:46 PM
Guest
 
Posts: n/a
Default

Well, you could setup a cron script (or 2, one for night, other for day) to change the styles stuff
Reply With Quote
  #6  
Old 07-13-2000, 06:03 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Ed Sullivan
Well, you could setup a cron script (or 2, one for night, other for day) to change the styles stuff
Yes, I think the cron is a good idea. I could just copy over the files in the forum directory. I would also have to force a refresh/relaod of the browser. Does anyone know how to do that off hand? Is there a script I could add to the <head>? Has anyone added js to their pages? Thanks for the feedback and help .
Reply With Quote
  #7  
Old 07-13-2000, 06:06 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Ed Sullivan
Well, you could setup a cron script (or 2, one for night, other for day) to change the styles stuff
Yea it was what I was thinking of but I'm not too sure that is safe. To be honest with you I never had too much faith in designs that revolved around time. I mean they are cool and give your site some personality but to manipulate a DATABASE's style variables daily at a set time interval with live connections is asking for a forum boo boo. I'd say the cron script should first shut down the forum (or connections) before it changes the variables, although the best way to do this safely is by hand. I'd wait until they get the software wrinkles ironed out (not to mention learn A LOT more about databases) before fooling around with forum manipulating cron scripts. Ed would know a lot more about me, I'm just a php newbie!
Reply With Quote
  #8  
Old 07-13-2000, 06:57 PM
Guest
 
Posts: n/a
Default

Well, although you'd be increasing your chance of getting an error if you didn't shut off the forum to change the colors, IMO, it's the equivalent of adding a post to the post table.

This is just coming off the top of my head, so I wouldn't count on it working:
Code:
<?php

$DB_site->query("UPDATE replacement SET replaceword='<b><FONT face=\"verdana, arial, helvetica\" size=\"4\" color=\"#000000\"' WHERE findword='<largefont'");
$DB_site->query("UPDATE replacement SET replaceword='<body bgcolor=\"#ffffff" text=\"#959595">' WHERE findword='<body>'");

//etc.... I don't feel like going all the way now

?>
Of course, it gets a little more complex as you try and replace certain options.

[Edited by Ed Sullivan on 07-13-2000 at 03:57 PM]
Reply With Quote
  #9  
Old 07-14-2000, 07:55 AM
Guest
 
Posts: n/a
Default

I think if you are wanting to do this then you shouldn't go and change the actual variables themselves it would be best to do it dynamically. i.e. get each script to look at the time and then put the appropriate colour variables into it.

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.
Reply With Quote
  #10  
Old 07-14-2000, 01:47 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Mark Hewitt
I think if you are wanting to do this then you shouldn't go and change the actual variables themselves it would be best to do it dynamically. i.e. get each script to look at the time and then put the appropriate colour variables into it.

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.
Umm.. I would just go for a javascript function to check the person's local time (aka time on their computer)then check it but that's just me. (and if I REALLY took the lazy route out, I would just stick to server time )

[Edited by SonnetCelestial on 07-14-2000 at 10:49 AM]
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 05:02 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.04411 seconds
  • Memory Usage 2,263KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (4)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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_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