Chào mừng bạn đến với ITVNN FORUM - Diễn đàn công nghệ thông tin.
Nếu đây là lần đầu tiên bạn tham gia diễn đàn, xin mời bạn xem phần Hỏi/Ðáp để biết cách dùng diễn đàn. Để có thể tham gia thảo luận bạn phải đăng ký làm thành viên, click vào đây để đăng ký.
Level: 49 [?]
Experience: 8,813,356
Next Level: 10,000,000
Cảm ơn 597
Cảm ơn 530 lần / 370 Bài viết
Widget: display random image thumbnail from public albums
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:
// Display random images thumbnails taken from any public albums.
// Author : Sulquendi
// Version: 1.2
$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
Bookmarks