Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Widget: display random image thumbnail from public albums Details »
Widget: display random image thumbnail from public albums
Mod Version: 1.2, by XManuX (Member) XManuX is offline
Developer Last Online: Nov 2013 I like it Show Printable Version Email this Page

vB Version: 4.0.2 Rating: (26 votes - 4.62 average) Installs: 202
Released: 09 Mar 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code Translations Is in Beta Stage  

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)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

7- There are 5 variables you can edit in this code, to configure the widget behavior :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

$albums_list :
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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

8- Your widget is ready to be added to your CMS with AdminCP > vBulletin CMS > Widgets > Layout Manager

Screenshot : see below.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	widgetdemo.jpg
Views:	3640
Size:	100.2 KB
ID:	113786  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
vBulletin CMS Widgets Photopost Pro Random Image Widget ZippySLC vBulletin 4.x Add-ons 78 26 Jan 2014 00:28

Comments
  #2  
Old 09 Mar 2010, 23:17
kevinfx kevinfx is offline
 
Join Date: Jan 2006
could you make it so that it's possible to display more than 1 pictures?
Reply With Quote
  #3  
Old 10 Mar 2010, 01:43
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
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.
Reply With Quote
  #4  
Old 10 Mar 2010, 03:05
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Real name: Dr.osama
installed

thanxxxx
__________________
Reply With Quote
  #5  
Old 10 Mar 2010, 04:51
Juggernaut's Avatar
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
This is nice, is there a way to make the images bigger?
Reply With Quote
  #6  
Old 10 Mar 2010, 05:45
MrBig's Avatar
MrBig MrBig is offline
 
Join Date: May 2005
Demo?
Reply With Quote
  #7  
Old 10 Mar 2010, 05:54
ahmedipa ahmedipa is offline
 
Join Date: Feb 2009
yes , we want demo if there is ?

even screen shot

thank you so much
Reply With Quote
  #8  
Old 10 Mar 2010, 09:29
sean-zigster sean-zigster is offline
 
Join Date: Jun 2008
Is there any way you could make it display from 1 certain album ?
Reply With Quote
  #9  
Old 10 Mar 2010, 10:02
XManuX XManuX is offline
 
Join Date: Feb 2007
Hello and thanks for your quick feedback !

As a result, i just updated this mod to v1.1 :

v1.1 :
  • The widget no longer requires template edit of vbcms.css (actually, adding the styling in vbcms.css is an option)
  • More than one thumbnail can be displayed
  • Using the standard vBulletin thumbnail size is also an option : you can use a custom width.

Originally Posted by sean-zigster View Post
Is there any way you could make it display from 1 certain album ?
Yes, i plan to add this as a new feature soon.
Reply With Quote
  #10  
Old 10 Mar 2010, 14:11
odonel odonel is offline
 
Join Date: Sep 2006
you need to check for empty albums in your sql statement, it is running lots of users with no albums
Reply With Quote
  #11  
Old 10 Mar 2010, 16:35
abroad abroad is offline
 
Join Date: Mar 2007
possible to show them horizontal (e.g. 3 pictures in a row) instead of vertical?
Reply With Quote
  #12  
Old 10 Mar 2010, 19:08
kho91 kho91 is offline
 
Join Date: Dec 2007
thank you

i have e a sql error:
Table 'dbname.album' doesn't exist
Reply With Quote
  #13  
Old 11 Mar 2010, 09:38
XManuX XManuX is offline
 
Join Date: Feb 2007
New version (v1.2) is out.

Originally Posted by sean-zigster View Post
Is there any way you could make it display from 1 certain album ?
Done in v1.2.

Originally Posted by kho91 View Post
thank you

i have e a sql error:
Table 'dbname.album' doesn't exist
You probably configured vBulletin to add a prefix to the table names in your database, let me know if version 1.2 solved your problem.

Originally Posted by abroad View Post
possible to show them horizontal (e.g. 3 pictures in a row) instead of vertical?
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.
Reply With Quote
  #14  
Old 11 Mar 2010, 10:02
Chrissy_Ratbag Chrissy_Ratbag is offline
 
Join Date: Dec 2009
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
Reply With Quote
  #15  
Old 11 Mar 2010, 10:58
XManuX XManuX is offline
 
Join Date: Feb 2007
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 ?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 17:42.

Layout Options | Width: Wide Color: