Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How do you reveal a page in sections over a number of days?

  • 11-09-2006 11:25pm
    #1
    Closed Accounts Posts: 58 ✭✭


    Puting togetheir a page which has a countdown clock and montage of photographs and graphics. Idea is that the image is revealed over a number of days, until on the final day it is revealed in full. Any suggestions welcome on how best to do this ?


Comments

  • Closed Accounts Posts: 119 ✭✭frodo_dcu


    by hand ... lol

    seriously a javascript that would expenad a div containing the image over time

    but then the amount of time you spend writing the script it would probably be easyer to do it by hand esp if you are only talking about it changing not very often


  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    Yea, why not by hand?

    Otherwise I'd probably use a bit of simple PHP. If today = such-a-date then image = this, sort of thing.


  • Closed Accounts Posts: 119 ✭✭frodo_dcu


    over a number of days

    lol i was thinking hours not days, yea goodshape is spot on, half a dozzen premade images and dispaly a new one each day with php.


  • Registered Users, Registered Users 2 Posts: 100 ✭✭destraynor


    Yeah the best way to do it is with a server side programming language. PHP/Perl. Just have an array of image names in the order you want them to appear....

    ["house.jpg", "bat.jpg", "elephant.jpg", "snakes.jpg", "jimbo.jpg", "johnjoe.jpg"]

    Then work out how many days are left (i.e. current day minus start day +1, if you're airing one image per day). So if its the 10th, and you started on the 6th, then show the first 5 images (one for the 6th,7th,8th,9th and 10th), using a for loop or whatnot.


    Thats one suggestion from a tired coder anyways.


    Update:
    Things to consider:
    1) Make sure your image name isn't predictable i.e. if you call the images 1.png, 2.png, 3.png most people will cop on how to see the full set, unless you periodically revise permissions on each graphic, but if you're doing that you may as well handwrite the html)
    2) Yes, you could do this in Javascript, but again, people will find a way around this very quickly.


Advertisement