Latest Register Log In

+ Advanced Search

Member Slideshows

Member Slideshows
By
02/17/13 (Edited 03/11/14)

WSN has slideshows for categories and slideshows for article details pages, but suppose you want to display a slideshow of all images uploaded by a particular member. You could place the slideshow in their view profile template (Admin Panel -> Themes -> Manage Templates -> "View Profile") or in a custom template. Just insert this code in the template at the desired location:

<!-- BEGIN TOPLIST -->
<CONFIG>attachments[,]time[,]1[,]descending[,]deleted=0 AND memberid={MEMBERID} AND (filetitle LIKE '%.jpg' OR filetitle LIKE '%.jpeg' OR filetitle LIKE '%.png' OR filetitle LIKE '%.gif')[,][,]0[,]0[,]0[,]1[,][,]0[,]0[,][,]0[,][,][,]</CONFIG>
<a href="{ATTACHSLIDEURL}" title="{ATTACHLABEL}" rel="lightbox[member{MEMBERID}attachments]" id="firstslide">Start {MEMBERNAME}'s Slideshow</a>
<!-- END TOPLIST -->

<div class="lightboxgallery" style="display: none; height: 0;">
<!-- BEGIN TOPLIST -->
<CONFIG>attachments[,]time[,]500[,]descending[,]deleted=0 AND memberid={MEMBERID} AND (filetitle LIKE '%.jpg' OR filetitle LIKE '%.jpeg' OR filetitle LIKE '%.png' OR filetitle LIKE '%.gif')[,][,]0[,]0[,]0[,]1[,][,]0[,]0[,][,]0[,][,][,]</CONFIG>
<IF {NUMBER} is greater than 1><a href="{ATTACHSLIDEURL}" title="{ATTACHLABEL}" rel="lightbox[member{MEMBERID}attachments]"></a></IF>
<!-- END TOPLIST -->
</div>


You can customize the "Start {MEMBERNAME}'s Slideshow" link as you like. If you want to have the slideshow launch by clicking on a 500x300 thumbnail of the first image, just replace Start {MEMBERNAME}'s Slideshow with <img src="{ATTACHTHUMBURL[500 <,> 300]}">

If you want to display all of the slideshow's thumbnails in advance to let the viewer launch it in the middle, delete style="display: none; height: 0;" and then change rel="lightbox[member{MEMBERID}attachments]"></a> to rel="lightbox[member{MEMBERID}attachments]">{ATTACHTHUMBURL}</a> (of course, with a member slideshow this could be a very large number of thumbnails so not normally recommended).

If you want to automatically launch the slideshow when the page loads, without waiting for a click, just go to Admin -> Themes -> Manage Templates -> "Additional Document Ready Function Content" and insert
$("#firstslide").click();
there to simulate a click as soon as the page is loaded.




Description How to add a slidehow of a member's images to their profile.
Rating
Views 260 views. Averaging 0 views per day.