Webmastersite.net
Register Log In

Toplist question

Comments on Toplist question

webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Nov 13, 2007 - 7:45 PM:

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?

webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Nov 13, 2007 - 7:57 PM:

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=bannerattach&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

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

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 13, 2007 - 8:34 PM:

when generating a toplist have the filter: type='featured' AND fieldname='bannerattach'
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Nov 13, 2007 - 8:41 PM:

Hi babrees

I just tried that...

<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG

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

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

Total Topics: 391
Total Comments: 1303
babrees
Posted Nov 13, 2007 - 8:59 PM:

jayweb wrote:
I just tried that...

<CONFIG>links,rand(),1,ascending,type='featured' AND fieldname='bannerattach',,,0,0,0,0,0,0,,0</CONFIG

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
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 13, 2007 - 9:37 PM:

I'm guessing the field is actually named bannerattach, so he wants
type='featured' AND bannerattach != ''
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Nov 14, 2007 - 8:48 AM:

Paul, you are a diamond.

Support here is brilliant, thanks.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.