SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SE Friendly Dynamic Content

    Hi

    I have been testing out this script http://www.dynamicdrive.com/dynamici...ajaxrotate.htm for a site I am developing. I dont know much about programming, but got it to work for my site.

    The thing is the content from the external file that it loads does not get displayed within the source code, so search engines will not be able to see this.

    Is there a work around for this, or can someone point me in the right direction to what I am trying to achieve

    thanks

  2. #2
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can anyone help me on this please?

  3. #3
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not if you want to stick with the Ajax approach. You could try something similar to this image slideshow, where all the content is loaded to the page and then cycled through (obviously you'd have to hack the code to get it to cycle on a per-day basis).

  4. #4
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I owuld prefer a php solution, that example is the only one I could find that matches what I want to achieve.

    I just need 3 text blocks, to change on either refresh or on a daily basis.

    Any ideas?

  5. #5
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would be very easy to do with PHP.

  6. #6
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    glad to hear, have you any examples I could see buddy?

  7. #7
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you shwo me any examles for this?, I am more or less a newbie to php!

  8. #8
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP's rand() function
    Code:
    <?php
    $random_no = rand(1,3);
    echo '<img src="banners/banner_' . $random_no . '.gif" alt="My banner" />';
    ?>
    That would show one of three banners at random on each page refresh. If you wanted to control the order they were shown in you could do something with cookies or session variables.

    Different one per day would take a little longer, have a look at the date() function.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •