logo
WSN Links PHP Directory Software
Features Showcase Reviews Demos Purchase Manual Support
 

Toplist question

Version:


Toplist question
jayweb
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 37
Total Posts: 112
Posted 11/13/07 - 07:45 PM:
quote post
#1
Hello

How do I create a toplist that only shows links that are of a particular link type, and only links that have a particular field filled in?

jayweb
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 37
Total Posts: 112
Posted 11/13/07 - 07:57 PM:
quote post
#2
Her's what I tried...

<!-- BEGIN TOPLIST 7 -->
<CONFIG>links,rand(),,ascending,fieldname = 'bannerattach',,,0,0,0,0,0,0,,0</CONFIG>
<IF {LINKTYPE} is featured>
<div class="bannerad">
<img src="thumbnail.php?id={LINKID}&field=banner attach&thumbwidth=468&thumbheight=60">
</div>
</IF>
<!-- END TOPLIST 7 -->

But I am clearly well off the mark with this.

Here's what I am trying to do...

I am allowing members who purchase a featured link the chance to upload a banner (Via a custom attachment field) which will be dispolayed at random along with other members banners. I thought a toplist would be the way to do this. Not every member who purchases a featured link will upload a banner so the top list needs to filter out those that dont.
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 263
Total Posts: 836
Posted 11/13/07 - 08:34 PM:
quote post
#3
when generating a toplist have the filter: type='featured' AND fieldname='bannerattach'
jayweb
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 37
Total Posts: 112
Posted 11/13/07 - 08:41 PM:
quote post
#4
Hi babrees

I just tried that...

<CONFIG>links,rand(),1,ascending,type='feature d' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFI G

But I get...

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/ mysql.php on line 26


when I try to load any page
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 263
Total Posts: 836
Posted 11/13/07 - 08:59 PM:
quote post
#5
jayweb wrote:
I just tried that...

<CONFIG>links,rand(),1,ascending,type='featured& #39; AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFI G

But I get...

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/click4localbusiness.co.uk/public_html/databases/ mysql.php on line 26

when I try to load any page


hmm, looking at it again - is the field's name really fieldname?

----
Jill

PS Are you up late or an early riser too? <G>


Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5726
Posted 11/13/07 - 09:37 PM:
quote post
#6
I'm guessing the field is actually named bannerattach, so he wants
type='featured' AND bannerattach != ''
jayweb
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 37
Total Posts: 112
Posted 11/14/07 - 08:48 AM:
quote post
#7
Paul, you are a diamond.

Support here is brilliant, thanks.
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

Admin Control Panel

   
Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support
© 2008 Paul Knierim. All rights reserved.