![]() |
Widget: display random image thumbnail from public albums
1 Attachment(s)
What it does ?
This widget displays a thumbnail image, taken randomly from any public albums and adds a "More..." link redirecting to albums. Clicking on the thumbnail opens full sized picture in its current album. Version history : 1.0: Initial release 1.1: Style can now be independant of template modification / Added option to display more than one thumbnail / Added option to define a custom size for the thumbnails. 1.2: You can now restrict picture fetching to a list of albums / Added fixes to the request. Install instructions : 1- Go in to your AdminCP > vBulletin CMS > Widgets > Create new widget 2- Choose type 'PHP direct execution' 3- Give it a name (i.e: Random Picture) 4- Give it a description (i.e Random picture from public albums) 5- Save it 6- Configure it with the following code (copy/paste) PHP Code:
PHP Code:
define a list of albums IDs (coma-separated list) to use, when taking a picture randomly. You can also specify only one ID. note: if you leave this variable empty, ALL public albums will be used. $use_vB_thumbnail_size : false = the widget will use $twidth to set up the width of the thumbnail. true = default vBulletin thumbnail size will be used. $twidth: Width of a thumbnail (in pixel.) will only be used if $use_vB_thumbnail_size is set to false. $limit: # of thumbnails you want to display in the widget. $use_custom_css false = the styling of widget elements will be performed inside the widget itself (using style="" html tag.) true = the styling will be performed by CSS, thus a template needs to be manually edited : vbcms.css Code:
.pthumb { Screenshot : see below. |
could you make it so that it's possible to display more than 1 pictures?
|
I was fascinated up to the point I read about having to edit a template. I'd sure hate to have to do that every time I updated and reverted templates.
|
installed
thanxxxx |
This is nice, is there a way to make the images bigger?
|
Demo?
|
yes , we want demo if there is ?
even screen shot thank you so much |
Is there any way you could make it display from 1 certain album ?
|
Hello and thanks for your quick feedback !
As a result, i just updated this mod to v1.1 : v1.1 :
Quote:
|
you need to check for empty albums in your sql statement, it is running lots of users with no albums
|
possible to show them horizontal (e.g. 3 pictures in a row) instead of vertical?
|
thank you
i have e a sql error: Table 'dbname.album' doesn't exist |
New version (v1.2) is out.
Quote:
Quote:
Quote:
|
I have installed this mod. Now, how do I get the album to identify? I have one album only I want it to select from (gallery is the folder name).
And once again, I add a php direct execution widget and get a parsing error of: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/rat10541/public_html/forum2010/includes/class_core.php(4033) : eval()'d code on line 14 |
1-Finding the album IDs may be painfull if you are using custom mod rewritted URLs on your website. You can try to navigate to your albums and have a look at the displayed URL in your browser. Most of the time there will be the album ID in it.
Example : album.php?albumid=3 <- 3 is what you are looking for. 2-Regading your error, are-you using the template modification in vbcms.css ? |
All my images are stored in images/gallery folder
Error - I've not touched a css file, do I need to? I get the same error with all PHP Direct Execution Widgets. |
<a href="http://ratbags.org.au/forum2010/images/gallery/" target="_blank">http://ratbags.org.au/forum2010/images/gallery/</a>
That is my Gallery folder, I can't see an album id anywhere. |
thank you its works for me!
|
Quote:
|
Quote:
On a side note : if you get the same error with every widget using direct php execution, it may be a compatibility issue with some custom module. You may try to disable all the custom modules you've added to your forum and see if widgets are now working. Then re-enable your modules all by one, checking if it's still working at each module you re-activate. And you'll find the one that is causing you compatibility pbr. |
it would be great if photos can be displayed in multiple rows & columns :)
|
so good thank you so much for this
|
Any chance to have better quality of the thumbnail ? TIA
|
Thumbnails here are perfect, no need to raise quality. None are showing at your link so I'm not sure what your problem may be. Perhaps the original photos are low quality?
|
I don't have custom modules, so what else could be causing the parsing error?
|
Quote:
Really, you may need to take it to vb.com after you try again, as it doesn't sound like a problem with a modification. |
Can this be made to work with vbadvanced ??
|
Can this be used in the sidebar?
|
can i use this as forum block ?
how to do that can anybody help please |
can this be made to display left to right instead of up and down?
|
Great mod, installed thanks! How would one go about deleting the more.. link? What code do I need to remove? Thanks in advance.
|
Can you make it show pictures similar/related to thread/content tags or title? Thx.
|
Thanks
|
Any chance to have better quality of the thumbnail like the other guy said
Quote:
quality is set to low somewhere Also look at the demo image his images look low setting also |
Quote:
Love this mod, thanks |
Nice one. Thanks.
|
How can I make these pics horizontal rather than vertical?
Basically like: xxx rather than: x x x |
can we have forum block as well?
|
yeah, a forum block would be nice :)
|
Thanks for such a great widget. a+
|
All times are GMT. The time now is 12:41 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|