Webmastersite.net
Register Log In

Placing limits on random image
How to exclude certain images from the randomizer

Comments on Placing limits on random image

lepus
Beginner

Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR

Total Topics: 4
Total Comments: 8
lepus
Posted Jul 04, 2005 - 4:47 PM:

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)?
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Jul 05, 2005 - 12:23 AM:

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.
lepus
Beginner

Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR

Total Topics: 4
Total Comments: 8
lepus
Posted Jul 05, 2005 - 6:19 PM:

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.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Jul 06, 2005 - 3:15 PM:

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.
lepus
Beginner

Usergroup: Member
Joined: Jul 04, 2005
Location: Portland, OR

Total Topics: 4
Total Comments: 8
lepus
Posted Jul 06, 2005 - 3:35 PM:

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?
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Jul 06, 2005 - 4:56 PM:

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.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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