Jump to content


Photo

Image(header) rotation based on time?


  • Please log in to reply
24 replies to this topic

#21 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 June 2007 - 02:37 AM

I see one post by Adam, and it seems pretty serious to me. In fact, i was going to make mention of that myself.

#22 SatanicPenguins

SatanicPenguins

    P2L Jedi

  • Members
  • PipPipPip
  • 541 posts
  • Gender:Male
  • Interests:Photoshop, Web Design, Graphic Design, Internet.

Posted 06 June 2007 - 02:38 AM

If he was serious, Didnt mean to laugh at him lol, my fault. I never assumed okey dokie to be swearing. Lol.

#23 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 June 2007 - 02:41 AM

You're right, "okey dokie" isn't swearing, it's a quote he was using... dunno why. But if you look closing at some other posts, you might notice why he might have been being serious.

#24 SatanicPenguins

SatanicPenguins

    P2L Jedi

  • Members
  • PipPipPip
  • 541 posts
  • Gender:Male
  • Interests:Photoshop, Web Design, Graphic Design, Internet.

Posted 06 June 2007 - 02:47 AM

Ah i get ya now ;). I assumed from the Quote in adam's post that that's what he was referring to :)

Which WOULD of been fairly funny, However due to extenuating circumstances is not funny :(.

#25 kingzl3y

kingzl3y

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 06 June 2007 - 03:46 AM

I see my 'use of words' has offended some of you. For that, i'm sorry. I'll try not to do it, although its a habbit.
Ok, now that's been said, Back to work.
Thanks for that rc69, the sarcasm was a nice touch.
However, i'm using stylesheets - my headerandwhatnot are located in my css, hence why i wanted it in CSS.
I did think about defining my header in the actual document itself, but i though it would be alot easier to do it in the css.

Yes, i do have 4 css's in my root folder, "sunrise.css", "sunset.css", "midday.css" and "midnight.css".

My php one is working brilliantly,

thnx, and sorry again.
Guess when i'm pissed (off that is) (if thats a swear word?)(if it is i'm sorry) i tend to swear.

Well, after like afew days looking for a js css time based rotation script; i've came to the conclusion there are none out there. Or maybe i'm wrong. :>

I've kinda had a mess around, and like this time it NEARLY works
code:
<script type="text/javascript"</script>
 var currentTime = new Date();
 var hours = currentTime.getHours();
 if(hours >= 00 && hours< 06) document.write('<link rel="stylesheet" type="text/css" href="sunrise.css" />' );
 elseif(hours>= 06 && hours< 12) document.write('<link rel="stylesheet" type="text/css" href="midday.css" />' );
 elseif(hours>= 12 && hours< 18) document.write('<link rel="stylesheet" type="text/css" href="sunset.css" />' );
 else document.write('<link rel="stylesheet" type="text/css" href="midnight.css" />' );
 </script>

It cycles through the different css's, (well, i have a different colour scheme for each css, all it does, is it changes the background colour (not showing anything else) and on the top it has "Attached File  px2l.JPG   14.91KB   59 downloads"
it cycles through 3 of the 4 css's and then stays on the midnight one.

I'm guessing my js date syntax isn't good?
:)

Edited by Mr. Matt, 07 June 2007 - 11:47 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users