Then in a custom template called submissions.tpl I have this toplist:
<CONFIG>links,time,10,descending,validated='no' and ownerid={MEMBERID},,,1,0,0,0</CONFIG>
WSN Links doesn't like the MEMBERID variable though. If I try to access that page, I get this error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/gamelinks.com/httpdocs/classes/database.php on line 226
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/gamelinks.com/httpdocs/classes/database.php on line 82
But when I place that toplist into a pre-existing template, like profile.tpl, the toplist works fine. Also, when I replace {MEMBERID} with a number, it also works correctly and creates a toplist of that member's ID. Therefore it doesn't seem like any variables are working properly in these custom pages the way I'm using them. Is this a bug, or is it supposed to not work this way, or am I doing something wrong? How do I work around this?
Ultimately, my goal is to have a page that'll show a member all his submitted links that are NOT validated yet - basically a pending submissions page.
The toplist of submitted links in the 'view profile' template uses {MEMBERID} and appears to be working fine. Are you perhaps outside the scope of the member?
Yes, I have already seen that MEMBERID works in the View Profile template. However, as per my post above, I created a new template and php file that has nothing to do with View Profile. Would that be out of the scope of the member, and if so, how to rememdy that?
What it seems is that if one makes a custom new page, you can't use variables like MEMBERID on that page.
Overlay the custom template onto the view profile page... or some other one where members apply. What member are you trying filter to, anyhow? If it's the viewer of the page, {MEMBER is not a proper way to refererence them, they're {THISMEMBER.
I'm just trying to create a page that a logged in member can go to to see their unvalidated links. I don't want this listed in the profile page or any other page, just in its own page.
I have the php file listed above (submissions.php) and a template called submissions.tpl that is:
The weird thing is, in the template that I make, if I just print the value of {MEMBERID}, it prints it fine, but when I try to use it in my toplist, that's where I get the error. Maybe it's userid that's not working rather than {MEMBERID}.
I got it to work. I saw {THISMEMBER and thought it was a typo there it just left the "}" off. Didn't know that variable was supposed to read {THISMEMBERID}.
Adam
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Variables not working properly
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I'm creating a custom page, but some of the variables that should work aren't.
First, I created a file called submissions.php that looks like this:
Then in a custom template called submissions.tpl I have this toplist:
WSN Links doesn't like the MEMBERID variable though. If I try to access that page, I get this error:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/gamelinks.com/httpdocs/classes/database.php on line 226
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/gamelinks.com/httpdocs/classes/database.php on line 82
But when I place that toplist into a pre-existing template, like profile.tpl, the toplist works fine. Also, when I replace {MEMBERID} with a number, it also works correctly and creates a toplist of that member's ID. Therefore it doesn't seem like any variables are working properly in these custom pages the way I'm using them. Is this a bug, or is it supposed to not work this way, or am I doing something wrong? How do I work around this?
Ultimately, my goal is to have a page that'll show a member all his submitted links that are NOT validated yet - basically a pending submissions page.
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The toplist of submitted links in the 'view profile' template uses {MEMBERID} and appears to be working fine. Are you perhaps outside the scope of the member?
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Yes, I have already seen that MEMBERID works in the View Profile template. However, as per my post above, I created a new template and php file that has nothing to do with View Profile. Would that be out of the scope of the member, and if so, how to rememdy that?
What it seems is that if one makes a custom new page, you can't use variables like MEMBERID on that page.
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Overlay the custom template onto the view profile page... or some other one where members apply. What member are you trying filter to, anyhow? If it's the viewer of the page, {MEMBER is not a proper way to refererence them, they're {THISMEMBER.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I had previously tried:
but it also didn't work.
I'm just trying to create a page that a logged in member can go to to see their unvalidated links. I don't want this listed in the profile page or any other page, just in its own page.
I have the php file listed above (submissions.php) and a template called submissions.tpl that is:
The weird thing is, in the template that I make, if I just print the value of {MEMBERID}, it prints it fine, but when I try to use it in my toplist, that's where I get the error. Maybe it's userid that's not working rather than {MEMBERID}.
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If it's the logged in member, {MEMBER is not appropriate, only {THISMEMBER is.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
I got it to work. I saw {THISMEMBER and thought it was a typo there it just left the "}" off. Didn't know that variable was supposed to read {THISMEMBERID}.
Adam