The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Widget: display random image thumbnail from public albums Details »» | |||||||||||||||||||||||||||||
Widget: display random image thumbnail from public albums
Developer Last Online: Nov 2013
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 { text-align:center; } .pthumb img { border: 1px solid black; padding:4px; background: white; } .pcaption { text-align:center; font-style:italic; font-family: "Times New Roman", Times, serif; margin-bottom:10px; } .pmore { text-align:right; display:block; } Screenshot : see below. Screenshots
Show Your Support
|
Благодарность от: | ||
Haponing |
Comments |
#12
|
|||
|
|||
possible to show them horizontal (e.g. 3 pictures in a row) instead of vertical?
|
#13
|
|||
|
|||
thank you
i have e a sql error: Table 'dbname.album' doesn't exist |
#14
|
|||
|
|||
New version (v1.2) is out.
Quote:
Quote:
I released v1.2 quickly, in order to add some fixes to the database request, so i had little time to add this in the current version. The row/column feature will probably be in the next release of this widget. |
#15
|
|||
|
|||
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 |
#16
|
|||
|
|||
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 ? |
#17
|
|||
|
|||
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. |
#18
|
|||
|
|||
<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. |
#19
|
|||
|
|||
thank you its works for me!
|
#20
|
|||
|
|||
Quote:
|
#21
|
|||
|
|||
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|