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 |
#62
|
|||
|
|||
Thanks
One question: Can I manage to get the pictures not vertically but horizontally shown. I would like to have them in the Center |
#63
|
||||
|
||||
LOVE this mod! In case anyone was wondering, it works great as a CMS Widget and a Forum Block (vB 4.0.8).
I have it running on my forum and CMS to display the winner of our Monthly Photo Contest. I have one album for the winner of the month (which is what this mod looks at) and when we get a new winner, I move the old one to a Past Winners album. Just in case anyone else is looking to use it this way..... Thanks XmanuX! |
#64
|
|||
|
|||
Is it possible to change how often the image is randomized? I've noticed that the same image is loaded for approximately two to three minutes before another random image is loaded.
Edit: I had to remove this widget from our page. It seems after a short period of time it has developed a random database error. We were unable to save articles due to this error. If anyone could point out why it's happening I'd be most appreciative. HTML Code:
Database error in vBulletin 4.1.1: Invalid SQL: SELECT alb.albumid, att.attachmentid, att.userid, att.caption, att.dateline, att.state, fdt.filesize, IF(fdt.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fdt.thumbnail_dateline, fdt.thumbnail_width, fdt.thumbnail_height, u.username FROM album AS alb LEFT JOIN attachment AS att ON alb.albumid = att.contentid LEFT JOIN filedata AS fdt ON att.filedataid = fdt.filedataid LEFT JOIN user AS u ON att.userid = u.userid WHERE alb.state = 'public' AND att.contenttypeid = '8' AND alb.albumid IN (2) ORDER BY rand (16470) LIMIT 1; MySQL Error : FUNCTION gunnook_vb4.rand does not exist Error Number : 1305 Request Date : Tuesday, February 1st 2011 @ 09:57:43 AM Error Date : Tuesday, February 1st 2011 @ 09:57:44 AM Script : http://xxxxxxxxxxxxxxxxxx.com/content.php?182-Nebraska-FFL-Dealers Referrer : http://xxxxxxxxxxxxxxxxxx.com/content.php?139-ffl-dealers IP Address : xx.xx.xx.xx Username : Admin Classname : vB_Database MySQL Version : 5.0.91-community |
#65
|
|||
|
|||
Appreciate the way how to make the pictures in horizontal mode
anyway, great mods! |
#66
|
|||
|
|||
Thank you very much. I'd like to know how to display newest pictures?
|
#67
|
|||
|
|||
Thanks for this mod, only thing is that it would look much much better if they displayed like :
xxx xxx instead of : x x x x besides that, this mod is perfect. Thanks again. |
#68
|
|||
|
|||
how can I get 2 thumbnails next to each other so its like this
X X X X X X etc |
#69
|
|||
|
|||
Is there a way that I could use this to simply grab and resize the actual image itself and not the thumbnail?
*edit: Simply edit the Widget's config and search for "&thumb=1" and change it to "&thumb=0" in case anyone else was curious. |
#70
|
|||
|
|||
Why we do not get any reply , the same queation was made in the 5 pages who can we make this work and show the pictures Horisozontal mode
Its a great mode but please someone can help on this issue |
#71
|
||||
|
||||
Assuming you've carefully searched the entire thread and haven't found a solution, then the reason you aren't getting a reply is that nobody has figured it out yet. Consider hiring someone.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|