I have a random toplist to a specific cat and I want to put an extra condition that it only shows links with an image - how do I do that? So far, I have put....
<IF {SWITCH_MAINTOPLIST}> <!-- BEGIN TOPLIST 2 --> <CONFIG>links,rand(),1,catid=23</CONFIG> <IF {LINKFILEFIELD}> <!-- BEGIN LINK ATTACHMENTS --> <a href="{LINKDETAILSURL}"><img src="thumbnail.php?id={LINKID}&attachid={ATTACHID}" /></a> <!-- END LINK ATTACHMENTS --> </IF> <!-- END TOPLIST 2 --> </IF>
<CONFIG>links,rand(),1,catid=23 and filefield=1</CONFIG> should be mostly effective, though when attachments are removed I'm not sure filefield updates.
Wouldn't it make more sense to do an attachments toplist?
when a link has more than 1 attachment I only want 1 to show
Given you want that, I guess you have to go back to a links toplist. Didn't realize you wanted that restriction. I don't see any way to force link-uniqueness in an attachments toplist.
Comments on Filtered Top List - if image
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I have a random toplist to a specific cat and I want to put an extra condition that it only shows links with an image - how do I do that? So far, I have put....
<IF {SWITCH_MAINTOPLIST}>
<!-- BEGIN TOPLIST 2 -->
<CONFIG>links,rand(),1,catid=23</CONFIG>
<IF {LINKFILEFIELD}>
<!-- BEGIN LINK ATTACHMENTS -->
<a href="{LINKDETAILSURL}"><img src="thumbnail.php?id={LINKID}&attachid={ATTACHID}" /></a>
<!-- END LINK ATTACHMENTS -->
</IF>
<!-- END TOPLIST 2 -->
</IF>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
<CONFIG>links,rand(),1,catid=23 and filefield=1</CONFIG>
should be mostly effective, though when attachments are removed I'm not sure filefield updates.
Wouldn't it make more sense to do an attachments toplist?
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Thanks Paul!
OK - changed links to attachments but when a link has more than 1 attachment I only want 1 to show, how do I do that please?
I currently have: <CONFIG>attachments,rand(),1,catid=23</CONFIG>
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
when a link has more than 1 attachment I only want 1 to show
Given you want that, I guess you have to go back to a links toplist. Didn't realize you wanted that restriction. I don't see any way to force link-uniqueness in an attachments toplist.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
OK - thanks Paul