Randomising Images

2 views
Skip to first unread message

Gareth

unread,
Jun 25, 2009, 8:45:54 PM6/25/09
to flickrRSS
Just a thought (and I'm certainly no developer) but could the plugin
be modified to fetch the feed, store those values in an array and then
print it randomly?

Any takers?

Federico

unread,
Jun 29, 2009, 12:01:16 AM6/29/09
to flickrRSS
I think the problem is not in the plugin. This can't be done, because
of the limitations of the feed that flickr provides. But, perhaps some
real developer (wich I am not) could help you with this.

eightface

unread,
Jun 29, 2009, 1:38:43 AM6/29/09
to flickrRSS
That's pretty much the problem. The feed is limited to the last 20
pictures. Other people have written code to randomize within those
twenty images, but it's not something that I'm going to include in the
plugin. If you're interested, it may have been posted in the forum
already, try searching it or google.

Ryan

unread,
Jul 15, 2009, 5:58:21 AM7/15/09
to flickrRSS
Line 140 of flickrrss.php
Change this: $items = array_slice($rss->items, 0, $settings
['num_items']);
To this: $items = array_slice($rss->items, rand(0,(count($rss->items)-
$settings['num_items'])), $settings['num_items']);

nFormas

unread,
Sep 7, 2009, 12:15:49 AM9/7/09
to flickrRSS
Thanks man, it works for me!

http://www.nformasdesign.com/blog
Reply all
Reply to author
Forward
0 new messages