Webmastersite.net
Register Log In

Slideshow showing just 5 pictures

Comments on Slideshow showing just 5 pictures

bertran
Beginner

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

Total Topics: 1
Total Comments: 3
bertran
Posted Mar 23, 2010 - 2:43 AM:

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.
bertran
Beginner

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

Total Topics: 1
Total Comments: 3
bertran
Posted Mar 25, 2010 - 2:21 AM:

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

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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 25, 2010 - 12:42 PM:

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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 25, 2010 - 12:58 PM:

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. (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 Comments: 3
bertran
Posted Mar 26, 2010 - 2:07 PM:

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}&thumbwidth=164&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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 27, 2010 - 2:20 PM:

{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).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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