vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Display random images from specific album (https://vborg.vbsupport.ru/showthread.php?t=268565)

Divvy 08-15-2011 09:40 AM

Display random images from specific album
 
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:
Code:

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


All times are GMT. The time now is 03:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01006 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete