iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-24-2004, 06:59 PM
WebProWorld Member
 
Join Date: Apr 2004
Location: Wisconsin
Posts: 70
equickxpress RepRank 0
Default How to set home page to rotate between different pages?

I would like to have my home page randomly rotate between a few different pages. I have items that go on sale and change prices all the time and would like to have different pages with different items and different sales, then to have those pages randomly display as the home page when ever someone goes to my website.
Is this possible?
And if so how can I set this up?

Thanks if I need to explain my self a little better please let me know.
Reply With Quote
  #2 (permalink)  
Old 05-24-2004, 08:11 PM
WebProWorld Veteran
 
Join Date: Apr 2004
Posts: 447
HardCoded RepRank 0
Default

Yes, it's possible. You'll need PHP or SSI or some other server side gunk to do it.

Here's how I'd do this in PHP:

Code:
<?
//index.php
include('top.htm');
$pool_size = 4;
$pg_num = rand(1, $pool_size);
include("mid{$pg_num}.htm");
include('bottom.htm');
?>
You could do this with DHTML as well, i.e. output the content of all possible pages into big DIVs, display:none them all, then use a javascript body onload call to randomly display:block one of them.
But I doubt that is very good from a Google point of view.
Reply With Quote
  #3 (permalink)  
Old 05-24-2004, 10:10 PM
WebProWorld Member
 
Join Date: Apr 2004
Location: Wisconsin
Posts: 70
equickxpress RepRank 0
Default

Thanks for the quick reply, I have not worked at all with PHP or SSI and I am not exactly sure how to use that PHP code you gave me with my sites. I have been learning web designing on the fly so whenever I want to try something new with my sites I have to go and learn how to do it before I can try it.
So how would I go about using 3 pages forhttp://equickcomputing.com and then using your PHP code to get the pages to randomly display?
Also Do you link that this would hurt me with google?
Thanks again for all the help!
Reply With Quote
  #4 (permalink)  
Old 05-25-2004, 01:18 AM
WebProWorld Veteran
 
Join Date: Apr 2004
Posts: 447
HardCoded RepRank 0
Default

Take your page and divide it into three parts, the top part, the middle part that's going to change, and the bottom part.

Now create two more middle parts that are alternatives.

Now name them mid1.htm, mid2.htm, mid3.htm

Now take my code and put it into a file called index.php. Set $pool_size to 3.

Now load the whole whizbang up to your site and watch the magic :).
Reply With Quote
  #5 (permalink)  
Old 05-26-2004, 12:48 PM
WebProWorld Member
 
Join Date: Apr 2004
Location: Wisconsin
Posts: 70
equickxpress RepRank 0
Default

Thanks HardCoded,

My pages are already divided into those sections so this should not be to hard to just create a few different pages and enter them into the code. Thanks again for everything and if something doesnt work I may have a few more questions.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

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



All times are GMT -4. The time now is 05:46 AM.



Search Engine Optimization by vBSEO 3.3.0