<!-- BEGIN LINK ATTACHMENTS --> <a href="download.php?id={LINKID}&amp;amp;attachid={ATTACHID}">{ATTACHFILETITLE}</a> ({ATTACHKB} {LANG_GENERAL_KB}, {ATTACHDOWNLOADS} {LANG_DETAILS_DOWNLOADS})<br> <IF {ATTACHISIMAGE}> <a href="link.php?action=detail&amp;amp;amp;id={LINKID}"><img src="thumbnail.php?id={LINKID}&amp;amp;attachid={ATTACHID}"></a> </IF> <!-- END LINK ATTACHMENTS -->
Is there some sort of conditional which will allow me to not display the ({ATTACHKB} {LANG_GENERAL_KB}, {ATTACHDOWNLOADS} {LANG_DETAILS_DOWNLOADS}) for image filetypes? That is, I don't mind it for .doc files, but I don't want it for .jpg...
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..'
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:
2. I don't see one presently, so for 3.3.18 I'll add a {LINKNUMATTACHMENTS} which gives you the number of attachments so you can do an <IF {LINKNUMATTACHMENTS} is greater than 3>
Comments on controlling attachments display....
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
Hi Paul, this code is from my displaylinks.tpl
- Is there some sort of conditional which will allow me to not display the ({ATTACHKB} {LANG_GENERAL_KB}, {ATTACHDOWNLOADS} {LANG_DETAILS_DOWNLOADS}) for image filetypes? That is, I don't mind it for .doc files, but I don't want it for .jpg...
- 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!Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
1. <IF not {ATTACHISIMAGE}>html here</IF> doesn't seem to work...?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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:
2. I don't see one presently, so for 3.3.18 I'll add a {LINKNUMATTACHMENTS} which gives you the number of attachments so you can do an <IF {LINKNUMATTACHMENTS} is greater than 3>
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
cool, that is exactly what I wanted and in fact, it was working...
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...
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Had to change this to {LINKNUMBEROFATTACHMENTS} in order to fix a conflict on the suggest link page.