Results 1 to 5 of 5

Thread: Redirect on set time

  1. #1
    User
    Join Date
    08-04-09.
    Posts
    230

    Default Redirect on set time

    I am wondering if anyone can point me to a good script to redirect a site on a set time.

    For a client I would like to make two versions of a website one for the daytime and one for the nighttime.
    I am looking and looking in google, but I think I am not using the right search query, cause nothing much is coming up.

    Also, the visitor should be able to switch to nighttime manually if it is during the day.

    Hopefully someone with a native English tongue (or just better english skills) can point me in the right direction...

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Redirect on set time

    Do you need to change the look and feel of the website, the contents or both? Is the day/night depending on server or client time?

  3. #3
    User
    Join Date
    08-04-09.
    Posts
    230

    Default Re: Redirect on set time

    Server time will be just fine.

    Content will also vary, so i really need to create two startsites in the backend. A day site and a night site.
    However, when client visits during the day and would like to see the night version they should be able to change manually.

    Thanks!

  4. #4
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Redirect on set time

    If the two sites are slight variations (some different content, but not all) it would be ideal to add a field that changes visibility of any content element/article/page based on current setting. The current setting is determined via generatePage hook or some other method.

    If the sites are mostly different, then you could build two site structures and fill them assigning different layout to both (if needed). Then an entry point will always choose the correct version. But users can always switch because in principle both sites are always available, yet a different page is shown based on the entry page. This option might show the wrong page to search engine visitors. Google and alike will not know to show a different version based on time.

    There is most likely no extension that does either. I'm not sure if you want to build one yourself?

  5. #5
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Redirect on set time

    I found this extension: http://contao.org/extension-list/view/mobilecore.html. It does not do what you want, but the only thing it does differently at first sight seems to be that it selects on device instead of time. Perhaps that extension can serve as a basis for what you need?

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
  •