WebmasterSite.net

Slideshow showing just 5 pictures

Version: Classifieds 5.0.77
URL:

PrintPrint


Slideshow showing just 5 pictures
bertran
Beginner

Usergroup: Customer
Joined: Aug 01, 2003
Location: Barcelona

Total Topics: 1
Total Posts: 2
quote post #1
Posted 03/22/10 - 11:43 PM:

I may have an issue with slideshow as I just can see the first 5 images but I have uploaded 10 instead.

Another question for slideshow: how to set a main image to show just this one on listings.

Edited by bertran on 03/23/10 - 6:34 AM
bertran
Beginner

Usergroup: Customer
Joined: Aug 01, 2003
Location: Barcelona

Total Topics: 1
Total Posts: 2
quote post #2
Posted 03/24/10 - 11:21 PM:

Found the first question on display.tpl in this configuration:

<!-- BEGIN TOPLIST -->
<CONFIG>attachments,time,10,ascending,type='link' AND ...


Edited by bertran on 03/24/10 - 11:33 PM
Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7614
quote post #3
Posted 03/25/10 - 9:42 AM:

So you're talking about the listing slideshow, not the category slideshow then.

I'll fix the template to show up to 50.
Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7614
quote post #4
Posted 03/25/10 - 9:58 AM:

Another question for slideshow: how to set a main image to show just this one on listings.

Well, it's possible to show the most recently or least recently attached image. But if that's not a sufficient way to set a main image for you, the only way I can see is to add a custom file attachment field to collect the main image. (http://scripts.webmastersite.net/w...attachment-fields-161.html)

Custom file attachment fields aren't included in the slideshow by default, so you'd need to add it in as a slideshow option by placing

<IF {LINKFIRSTATTACHFILENAME}><option value="{DIRURL}/thumbnail.php?id={LINKID}&field=firstattach&thumbwidth=500&thumbheight=500">{LINKFIRSTATTACHFILETITLE}</option>

(changing FIRSTATTACH and firstattach to whatever you name your field) right below
<select name="Oneslide" onChange="Onechange();"> 
bertran
Beginner

Usergroup: Customer
Joined: Aug 01, 2003
Location: Barcelona

Total Topics: 1
Total Posts: 2
quote post #5
Posted 03/26/10 - 11:07 AM:

Thank you Paul,

to show the most recently attached image would be enough. I could do it on itemdetails and on displaycat, but not on main index:

I could manage to see the last image on display.tpl like this:
<!-- BEGIN TOPLIST -->
<CONFIG>attachments,id,10,descending


On displaycat I could see the last attachment via itembit.tpl placing this:
<!-- BEGIN TOPLIST -->
<CONFIG>attachments,time,1,ascending,type='link' AND objectid={ITEMEFFECTIVEID} AND (filetitle LIKE '%.jpg' OR filetitle LIKE '%.gif' OR filetitle LIKE '%.png'),,,0,0,0,0,0,0,,0</CONFIG>
<a href="javascript:Onetransport()"><img src="{DIRURL}/thumbnail.php?attachid={ATTACHID}&amp;thumbwidth=164&amp;thumbheight=164" name="Oneshow" border="0"></a>
<!-- END TOPLIST -->



But I couln't manage to see it in main index, as I get error when trying to nest link toplist and attachment toplist, any solution for that besides adding another field?

<!-- BEGIN TOPLIST 1 -->

<CONFIG>links,time,5,descending</CONFIG>
{NUMBER}. <a href="{TRACKLINKURL}" class="newlinks" {EXTERNALLINKS}>{ITEMTITLE}</a>

<IF {ITEMNUMATTACHMENTS}> <tr>
<a href="{TRACKLINKURL}" class="newlinks" {EXTERNALLINKS}><img src="{ITEMTHUMBURL}" border="0" alt="" />
</IF>

<!-- END TOPLIST 1 -->



Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7614
quote post #6
Posted 03/27/10 - 11:20 AM:

{ITEMTHUMBURL} is a shortcut to automatically get the oldest attachment, not the newest. To get the newest, I believe you could use a nested toplist:
<!-- BEGIN TOPLIST 1 -->
<CONFIG>links,time,5,descending</CONFIG>
{NUMBER}. <a href="{TRACKLINKURL}" class="newlinks" {EXTERNALLINKS}>{ITEMTITLE}</a>

<IF {ITEMNUMATTACHMENTS}>
<!-- BEGIN TOPLIST 1{ITEMNUMBER} -->
<CONFIG>attachments,time,1,descending,type='link' AND objectid={ITEMID}</CONFIG>
<tr>
<a href="{TRACKLINKURL}" class="newlinks" {EXTERNALLINKS}><img src="{ATTACHTHUMBURL}" border="0" alt="" />
<!-- END TOPLIST 1{ITEMNUMBER} -->
</IF>
<!-- END TOPLIST 1 -->


(though I'm not positive if the 5.0 series allowed toplist numbers above 100 yet -- 5.1 does).

Edited by Paul on 03/30/10 - 12:59 PM
 
Search thread for
Download thread as


Sorry, you don't have permission to post. Log in, or register if you haven't yet.