Webmastersite.net
Register Log In

Filtered Top List - if image

Comments on Filtered Top List - if image

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Mar 04, 2006 - 6:51 AM:

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}&amp;attachid={ATTACHID}" /></a>
<!-- END LINK ATTACHMENTS -->
</IF>
<!-- END TOPLIST 2 -->
</IF>


Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 05, 2006 - 12:34 AM:

<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?
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Mar 05, 2006 - 8:14 AM:

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>



Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 06, 2006 - 3:43 AM:

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.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Mar 06, 2006 - 6:52 AM:

OK - thanks Paul
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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