View Full Version : Display random images from specific album
Divvy
08-15-2011, 09:40 AM
Hello guys,
I want to create a block to my sidebar where I can display random images from specific album.
Something like that, but without CMS:
https://vborg.vbsupport.ru/showthread.php?t=237884
Can someone help me? :)
BirdOPrey5
08-15-2011, 02:52 PM
That exact code will work fine in the forum sidebar, make a php block with that code and simply add this line to the very end:
return $output;
Tested and working.
Divvy
08-16-2011, 12:49 AM
Thank you for the fast fix BirdOPrey5 :)
I created the block with same code and added your code to the end.
The only problem that I have is that Im not getting a random picture though, no matter how many times I refresh the page the 'random' pic stays the same.
Note: every time that I click edit and then save the block (even without make any modification), the image changes... but always stays the same.
What could be? :P
BirdOPrey5
08-16-2011, 01:18 AM
In the block settings you need to change the Cache Time (in minutes) to a smaller number, the default is 60 minutes (1 hour) so the image will change once an hour.
If you bring it down to 0 it will be random each time. Probably 1 to 5 minutes would be best.
Divvy
08-16-2011, 09:00 AM
Perfect!!! Im always learning :)
Thank you again mate!
stained
12-07-2011, 09:12 AM
Many thanks Birdoprey5. Great to have that mod working as it should at last.
fxdigi-cash
01-29-2013, 03:30 AM
Thanks a lot, BirdO
It worked like a charm on vb4.2 pl3
Cheers
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.