Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • Time Banner
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4
Time Banner; created by Eureka
Tweet Topic Started: Jul 12 2008, 07:57 PM (2,620 Views)
Kevin Jul 12 2008, 07:57 PM Post #1
Member Avatar


Posts:
700
Group:
Former Staff
Member
#8
Joined:
Jul 2, 2008
Coding language
HTML/CSS
Title: Time Banner

Author: Eureka

Placement: Above the Board, Below the Board or Above the Copyright

Pre-preparation: NONE

Description: This code generates a banner for your site depending on whatever time the user is in. So if you want different banners to show up at different times, this is one for you.

Quote:
 
<script>
/* TimeBanner by Eureka of Divinity Coding and The Coding Zone */
var _br = [];
_br[_br.length] = ["00:00","URL"];
_br[_br.length] = ["06:00","URL"];
_br[_br.length] = ["12:00","URL"];
_br[_br.length] = ["18:00","URL"];

document.write("<script src='http://divinitycoding.net/scripts/TimeBanner.js'><\/script>");
</script>


Change the colored text. The red text indicate this: HH:MM. Please do not add seconds onto the time. It won't work. To add more times, just copy one of the lines and edit the needed text.

Original Request: Clicky
Edited by Reid, Jun 15 2009, 08:16 PM.
Posted Image
Offline Profile Goto Top
 
meeklay daflea Oct 9 2008, 12:45 AM Post #2


Posts:
10
Group:
Member
Member
#1,058
Joined:
Sep 27, 2008
Coding language
ASP.Net
sounds pretty interesting! thanks!
Posted Image
Visit our new Harry Potter RP!
Offline Profile Goto Top
 
Heir Feb 19 2009, 03:16 AM Post #3


Posts:
13
Group:
Member
Member
#290
Joined:
Jul 25, 2008
Hi, I'm having trouble getting this to work, and I think it's a really great idea for a code.

Here is my code:

Quote:
 
<script>
/* TimeBanner by Eureka of Divinity Coding and The Coding Zone */
var _br = [];
_br[_br.length] = ["00:00","http://z3.ifrm.com/146/6/0/f272608/pathbannernight.png"];

document.write("<script src='http://divinitycoding.net/scripts/TimeBanner.js'><\/script>");
</script>


Am I doing something wrong? Thanks in advance!
Offline Profile Goto Top
 
Moon Mar 14 2009, 04:14 PM Post #4
Member Avatar


Posts:
44
Group:
Member
Member
#2,307
Joined:
Feb 12, 2009
Coding language
HTML/CSS
Heir
Feb 19 2009, 03:16 AM
Hi, I'm having trouble getting this to work, and I think it's a really great idea for a code.

Here is my code:

Quote:
 
<script>
/* TimeBanner by Eureka of Divinity Coding and The Coding Zone */
var _br = [];
_br[_br.length] = ["00:00","http://z3.ifrm.com/146/6/0/f272608/pathbannernight.png"];

document.write("<script src='http://divinitycoding.net/scripts/TimeBanner.js'><\/script>");
</script>


Am I doing something wrong? Thanks in advance!
I think you need to add more times to it. There's only one banner to show
Posted Image
Love Animals? Click here!
Offline Profile Goto Top
 
Heir Mar 30 2009, 05:21 PM Post #5


Posts:
13
Group:
Member
Member
#290
Joined:
Jul 25, 2008
Thank you for your reply.

I have actually added a few more times now, but I have a new question.

If I want this banner to appear for, say, half of the day (night), how should I enter the hours? Do I enter each hour that I want it to appear, or can I do something to the effect of 8 PM - 8 AM?

Thanks!
Offline Profile Goto Top
 
Vitality Mar 30 2009, 06:37 PM Post #6
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
I think it works in the sense that once the new time arrives on the next image, that one will replace the old banner. For example:
Code:
 
var _br = [];
_br[_br.length] = ["00:00","The first banner to appear."];
_br[_br.length] = ["06:00","Once it is this time on your board, this banner will replace the one before it."];
_br[_br.length] = ["12:00","The same thing will happen here"];
_br[_br.length] = ["18:00","And here"];
Offline Profile Goto Top
 
Moon Apr 8 2009, 12:59 PM Post #7
Member Avatar


Posts:
44
Group:
Member
Member
#2,307
Joined:
Feb 12, 2009
Coding language
HTML/CSS
Heir
Mar 30 2009, 05:21 PM
Thank you for your reply.

I have actually added a few more times now, but I have a new question.

If I want this banner to appear for, say, half of the day (night), how should I enter the hours? Do I enter each hour that I want it to appear, or can I do something to the effect of 8 PM - 8 AM?

Thanks!
Your Welcome. Vitality is right, that will show the banner for half the day and the other for night
Posted Image
Love Animals? Click here!
Offline Profile Goto Top
 
HelenaZF Apr 9 2009, 12:07 PM Post #8
Member Avatar
I wake up cuter every day

Posts:
146
Group:
Member
Member
#2,131
Joined:
Jan 26, 2009
Coding language
HTML/CSS
I love the idea of this code. I'm planning to use it on one of my boards to show a city view as it goes through the different lighting of the hours of the day.
Posted Image
Posted Image

Posted Image ................. the meaning of life

Offline Profile Goto Top
 
Cr1 Apr 10 2009, 11:56 AM Post #9


Posts:
3
Group:
Member
Member
#697
Joined:
Aug 22, 2008
Coding language
PHP
Nice, I may use that. =]
APARTMENT BALL
Advertise your forum or website for free today!

Post updates about your forum every 24 hours!
No posts required before you can advertise - simply sign up
Joining is hassle free and takes a minute
Offline Profile Goto Top
 
Cr1 Apr 11 2009, 02:12 PM Post #10


Posts:
3
Group:
Member
Member
#697
Joined:
Aug 22, 2008
Coding language
PHP
What would you do if you wish to use it seperately on certain themes if you have many on your board, place it in the CSS?
APARTMENT BALL
Advertise your forum or website for free today!

Post updates about your forum every 24 hours!
No posts required before you can advertise - simply sign up
Joining is hassle free and takes a minute
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
  • 4

Track Topic · E-mail Topic Time: 7:50 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy