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 |
#72
|
|||
|
|||
hmmm, when not logged in the thumbnails are just white boxes - any way to make it so that thumbnails show on when not logged in. Have it on homepage of www.thewoollybacks.co.uk
|
#73
|
|||
|
|||
or.... is it possible to create a user account with complex password and specify that account in the code to only be used for displaying the images?
|
#74
|
|||
|
|||
|
#75
|
|||
|
|||
I was being a bit thick - changed usergroup permissions on not logged in to be able to view public albums and now works like a charm at www.thewoollybacks.co.uk
|
#76
|
|||
|
|||
I would like to figure out how to stack the images horizontally. I was playing with the CSS and was able to get them to stack with float:left, but the widget content area would not expand with the series.
I tried to add in a DIV to consolidated the widget into one box, but I lack the skills to add that int he PHP code. I played with this for 4 hours. Example: http://fordstnation.com/content.php?120-gallery Maybe there is a quick fix to the .cms_widget_content class in the CSS? |
#77
|
||||
|
||||
Quote:
If you want to remove the 'by [username]' from the caption, then just find and remove Code:
by {$pic[username]} |
#78
|
|||
|
|||
I got the code to work with horizontal.
_ _ _ _ _ _ Minor HTML edit in the php output, and some CSS work did the trick. This is a great script, suites my needs well. |
#79
|
|||
|
|||
become 4.17 Patch 2 the following Error:
Parse error: syntax error, unexpected T_STRING in /srv/www/vhosts/once-board.de/httpdocs/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 1 |
#80
|
|||
|
|||
just now it works fine on 4.17 P2. i have too many uncoment line have copy/paste to code block.
|
#81
|
|||
|
|||
Hi Chadwicksracing,
please, can you explain me, where I have to edit the code to get the pictures horizontal? Thanks |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|