Hello Swentel,

I was looking for a solution to display a random image on my website, with one particularity, it must be the same the whole day and change every day.
I came through your module and I've added the ability to use a custom PHP code for seed.

That allows me to return date('z'); and have a different random image displayed every day.

I'm sure it can be improved, just tell me what you think of it and I'll do the changes.

Thanks !

Comments

pol’s picture

Here is the patch for 6.x-1.x

swentel’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Patch (to be ported)

Committed to 6.x branch (with some small markup changes), thanks! Can you test with the newest build and let me know if all is still ok - I admit, haven't event tested this myself, code looks pretty straightforward anyay :) - I'll roll out a new release after than.

Will port this to D7 soon too.

pol’s picture

Tested on http://through-my-eyes.be successfully, as you can see the image on the banner change every day and the sequence of random images is always the same, until tomorrow ;-)
I used return date('z'); in the PHP textarea.

Don't forget to remove the $Id (old CVS stuff) in the next commit !

Thanks !

swentel’s picture

Ok cool, good point about the cvs id tag, weird that the git migration didn't strip that one. Pushed out a new release for D6.

pol’s picture

Great !

Thanks :-)

swentel’s picture

Status: Patch (to be ported) » Fixed

And also committed, pushed and released for D7 version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.