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 |
#42
|
|||
|
|||
Quote:
Original pictures are fine. Great widget otherwise. |
#43
|
|||
|
|||
For those who want better quality on their images, remove "&thumb=1" without the quotes from the widget code and it should be fine. The reason for the low quality images are that original code retrieves the thumbnail for the image and then resize this thumbnail.
|
#44
|
|||
|
|||
nice thank you
|
#45
|
||||
|
||||
Thanks for figuring that one out. This was a complaint a few people had early on and I could never figure out what they were talking about since mine looked perfect. Apparently it has to do with what size your thumbnails are.
|
#46
|
|||
|
|||
Hello, you have to take into consideration that removing &thumb=1 will drastically increase the amount of data transferred and the page load time, since you will always load the full image and not its thumbnail.
The solution would be to configure the album's images thumbnails size, so they exactly match the widget thumbnail size, but as far as i know, the option to configure album thumbnail size is still missing in vB4.0.3 PL1... Regards. |
#47
|
|||
|
|||
Very helpful stuff. Thanks for sharing.
|
#48
|
||||
|
||||
Very nice mod! Im not getting a random picture though. Maybe because of the upgrade to 4.0.5
|
#49
|
||||
|
||||
Well, aren't you the little spoilsport! Confirmed - in 405 no matter how many times I refresh the page the 'random' pic stays the same.
Oddly, FF and IE8 show one pic, but Chrome and Safari show another. But none of them are changing. |
#50
|
|||
|
|||
works 100%
thanks |
#51
|
|||
|
|||
Tagged this... want to install in vB 4.0.5
Thanks for the work!! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|