loading pages based on dates

This is a discussion on loading pages based on dates within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I want my home page to change according the the seasons. To do this, I've created a simple index....


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-28-2006
Bert
 
Posts: n/a
Default loading pages based on dates

I want my home page to change according the the seasons.
To do this, I've created a simple index.html page that contains only PHP
code (and basic header/body structures).
The code simply compares the current date to dates signaling the change of
seasons (if...elseif...else) and when a condition is true, it loads the
appropriate page.
I'm using Include() to do this. (include 'index-summer.html')
My question is, is this the proper useage of include()? Also, is this the
best/most efficient way to be doing this?
Thanks.
Bert


Reply With Quote
  #2 (permalink)  
Old 06-28-2006
Geoff Berrow
 
Posts: n/a
Default Re: loading pages based on dates

Message-ID: <e7tsgc$ler$1@pcls4.std.com> from Bert contained the
following:

>I'm using Include() to do this. (include 'index-summer.html')
>My question is, is this the proper useage of include()?


The only drawback with that is you have to keep four pages up to date.
I prefer to have one page and only change what is necessary.

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Reply With Quote
  #3 (permalink)  
Old 06-28-2006
Bert
 
Posts: n/a
Default Re: loading pages based on dates

Geoff:
Thanks.
The site is for a little hunting lodge in the state of Maine, and there are
enough changes seasonally--but not from one year to the next, if that makes
sense--that individual pages seem easier. (And I've been known to forget to
change the page so we're looking at lovely snow scenes in June.
Well...almost...)
Thanks again.
Bert

"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:fs45a2hfpo8c58ijtfsg2mlslh3ggkfqqe@4ax.com...
> Message-ID: <e7tsgc$ler$1@pcls4.std.com> from Bert contained the
> following:
>
>>I'm using Include() to do this. (include 'index-summer.html')
>>My question is, is this the proper useage of include()?

>
> The only drawback with that is you have to keep four pages up to date.
> I prefer to have one page and only change what is necessary.
>
> --
> Geoff Berrow 0110001001101100010000000110
> 001101101011011001000110111101100111001011
> 100110001101101111001011100111010101101011



Reply With Quote
  #4 (permalink)  
Old 06-28-2006
Ørjan Langbakk
 
Posts: n/a
Default Re: loading pages based on dates

Den 28.06.2006 14:25, skriblet Bert følgende:
> I want my home page to change according the the seasons.
> To do this, I've created a simple index.html page that contains only PHP
> code (and basic header/body structures).
> The code simply compares the current date to dates signaling the change of
> seasons (if...elseif...else) and when a condition is true, it loads the
> appropriate page.
> I'm using Include() to do this. (include 'index-summer.html')
> My question is, is this the proper useage of include()? Also, is this the
> best/most efficient way to be doing this?


The way you are doing it seems fine, but instead of changing the
_html-file_, why not only change the CSS? That will of course mean that
you have to code your HTML correctly, and use CSS for styling. That way,
all you have to change is the CSS file - you can have four of those, and
one of the index.html. (That is, of course, if the text on the page
doesn't change much, only the visuals).

--
mvh
Ørjan Langbakk
http://www.bergenpchjelp.no
http://www.cubic-design.net
Reply With Quote
  #5 (permalink)  
Old 07-01-2006
-Lost
 
Posts: n/a
Default Re: loading pages based on dates

Or even better, output the CSS via PHP. Thereby having one index and one dynamic CSS.

-Lost


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0