WebmasterSite.net

controlling attachments display....

Version: 3.3.17
URL:

PrintPrint
locked


controlling attachments display....
capitaine
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Posts: 273
quote post #1
Posted 05/17/06 - 4:35 PM:

Hi Paul, this code is from my displaylinks.tpl


<!-- BEGIN LINK ATTACHMENTS -->
<a href="download.php?id=6461&amp;amp;amp;amp;attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} , {ATTACHDOWNLOADS} )<br>
<IF {ATTACHISIMAGE}>
<a href="link.php?action=detail&amp;amp;amp;amp;amp;id=6461"><img src="thumbnail.php?id=6461&amp;amp;amp;amp;attachid={ATTACHID}"></a>
</IF>
<!-- END LINK ATTACHMENTS -->


  1. Is there some sort of conditional which will allow me to not display the ({ATTACHKB} , {ATTACHDOWNLOADS} ) for image filetypes? That is, I don't mind it for .doc files, but I don't want it for .jpg...

  2. If a user uploads 7 images. I only want to display 3 thumbnails, with a message saying 'more images available...'. I know you can limit the display of attachments by using <!-- BEGIN 3 LINK ATTACHMENTS --> to show just 3 but how to output a message saying 'more..'
Thanks!


Edited by capitaine on 05/18/06 - 7:13 AM
Truth don die
capitaine
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Posts: 273
quote post #2
Posted 05/18/06 - 8:37 AM:

1. <IF not {ATTACHISIMAGE}>html here</IF> doesn't seem to work...?
Truth don die
Paul
developer
Avatar

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

Total Topics: 65
Total Posts: 7614
quote post #3
Posted 05/18/06 - 12:18 PM:

It works, that's just not what you want unless you want to show the stuff only for non-images. To show something only when it's an image attachment, the code is already there in what you quoted:
<IF {ATTACHISIMAGE}> <a href="link.php?action=detail&id=6461"><img src="thumbnail.php?id=6461&attachid={ATTACHID}"></a> </IF> 


2. I don't see one presently, so for 3.3.18 I'll add a 0 which gives you the number of attachments so you can do an <IF 0 is greater than 3>

Edited by Paul on 05/18/06 - 12:23 PM
capitaine
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 05, 2005

Total Topics: 94
Total Posts: 273
quote post #4
Posted 05/18/06 - 4:10 PM:

It works, that's just not what you want unless you want to show the stuff only for non-images.

cool, that is exactly what I wanted and in fact, it was working... grin

2. You do have it: see the Misc section here: http://scripts.webmastersite.net/wsnlinks/wsnmanu...
but I tried it and not sure it works... it doesn't limit it to just three attachments...


Edited by capitaine on 05/18/06 - 4:40 PM
Truth don die
Paul
developer
Avatar

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

Total Topics: 65
Total Posts: 7614
quote post #5
Posted 05/20/06 - 6:16 AM:

capitaine wrote:
2. You do have it:


I added that to the manual entry at the time of my post. It's not in 3.3.17.

1. <IF not {ATTACHISIMAGE}>html here</IF> doesn't seem to work...?

Perhaps you're editing the wrong spot.
Paul
developer
Avatar

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

Total Topics: 65
Total Posts: 7614
quote post #6
Posted 05/21/06 - 5:49 AM:

Had to change this to 0 in order to fix a conflict on the suggest link page.
 
Search thread for
Download thread as
locked


This thread is closed, so you cannot post a reply.