I'm setting up a gallery in which there will be lots of art files stored by various artists. Some of the pictures will only be appropriate for viewers of a certain age. I've added some fields to the tables to reflect both the user's rating limit and the rating of the picture. How do I get the random image selector to select only images appropriate (i.e., if the user is a guest, only G-rated)?
In your toplist generator, where it asks for a condition to filter results by type contentrating='G'
if for example your field is named contentrating and contains G where you want it shown. Then paste that new toplist over the old one... or just replace the <CONFIG> line to keep if you like.
If they're distinct toplists, simply make the two toplists, using the contentrating='X' in the other one's condition line. I don't know why you're involving conditionals or how in the world member template variables became involved.
But wouldn't that just make two toplists, one that shows "general" images and one that shows "adult" images, and just display them both on the main page regardless of whether or not the member has been cleared to view the "adult" ones?
How do I display one toplist for members with a certain field set to one value and another toplist for members with a certain field set to another value without using conditionals?
Comments on Placing limits on random image
Beginner
Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR
Total Topics: 4
Total Comments: 8
I'm setting up a gallery in which there will be lots of art files stored by various artists. Some of the pictures will only be appropriate for viewers of a certain age. I've added some fields to the tables to reflect both the user's rating limit and the rating of the picture. How do I get the random image selector to select only images appropriate (i.e., if the user is a guest, only G-rated)?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
In your toplist generator, where it asks for a condition to filter results by type
contentrating='G'
if for example your field is named contentrating and contains G where you want it shown. Then paste that new toplist over the old one... or just replace the <CONFIG> line to keep if you like.
Beginner
Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR
Total Topics: 4
Total Comments: 8
Thanks! If I want to display one toplist for one type of user and another toplist for another type of user, what do I put in the template?
I tried this:
<IF {MEMBERCONTENT}='G'>
(...toplist 1...)
</IF>
<IF {MEMBERCONTENT}='X'>
(...toplist 2...)
</IF>
But it just shows both toplists no matter what the user is.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If they're distinct toplists, simply make the two toplists, using the contentrating='X' in the other one's condition line. I don't know why you're involving conditionals or how in the world member template variables became involved.
Beginner
Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR
Total Topics: 4
Total Comments: 8
But wouldn't that just make two toplists, one that shows "general" images and one that shows "adult" images, and just display them both on the main page regardless of whether or not the member has been cleared to view the "adult" ones?
How do I display one toplist for members with a certain field set to one value and another toplist for members with a certain field set to another value without using conditionals?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Well then I guess you do want conditionals, so please read the manual entry since the syntax you're using there isn't the WSN conditionals syntax: scripts.webmastersite.net/w...lery/manual/link.php?id=69
Also {MEMBER is improper if you mean to reference the person viewing, as the manual explains that's {THISMEMBER.