PDA

View Full Version : Advice for "restricted content"


Hex_legend
10-22-2009, 02:31 PM
I own a model agency that deals with "adult" material.
I need it so that if the fields that say "does your profile contain nudity" says Yes, that anyone under the age of 18 cannot view the profile of that particular user.
How would I do this? Is there an IF condition to check for birthdate?

TheLastSuperman
10-22-2009, 02:34 PM
Yeap, compliments of Loco.M/Brandon shelley, Michael Biddle, and others ;)

<if condition="$bbuserinfo['birthday_search'] > '1980-01-01'">Your code here if born after 1-1-1980</if>

<if condition="$bbuserinfo['birthday_search'] < '1980-01-01'">Your code here if born before 1-1-1980</if>

So wrap the member profile template with this if statement ;)

http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html

Hex_legend
10-22-2009, 02:41 PM
Compliments to you for finding it and for the author of the code :)
Thank you

--------------- Added 1256226320 at 1256226320 ---------------

Also, just a thought..
This code would only be needed IF the user of that profile states in the registration that their profile contains nudity as not all profiles will contain nudity.

I don't want to do it so that they can't view ANY profile

TheLastSuperman
10-22-2009, 03:14 PM
Compliments to you for finding it and for the author of the code :)
Thank you

--------------- Added 1256226320 at 1256226320 ---------------

Also, just a thought..
This code would only be needed IF the user of that profile states in the registration that their profile contains nudity as not all profiles will contain nudity.

I don't want to do it so that they can't view ANY profile

Then simply add in a new profile field and condition it with something similar to this:

<if condition"$post['field10']">
<if condition="$bbuserinfo['birthday_search'] < '1980-01-01'">Your code here if born before 1-1-1980 i.e. cut and paste entire member profile to here</if>
<else />
Member profile code here too so it will show even if they did not enter in a value into your field!
</if>

Might need to change $post to $user or $userinfo etc see the conditional list and whip it up real quick!

Hex_legend
10-22-2009, 03:19 PM
How my profile system is set up now is:

Do your profile images contain Nudity? Yes | No
Does your profile contain information not viewable by under 18? Yes | No

I just use those profile field Id's?

--------------- Added 1256228656 at 1256228656 ---------------

Again, It still doesn't seem to make sense for me..
The content I have will be the same, so I cant use the <else /> condition.
But if someone says they have nudity or profanity, then I want the whole page to give an error message.

If I use the <else /> command and make a new profile layout for that one, then they will still be able to see images, as I always want the profile pics to be visible, so its much easier to restrict profiles totally for people under 18 who show nudity.

TheLastSuperman
10-22-2009, 04:06 PM
How my profile system is set up now is:

Do your profile images contain Nudity? Yes | No
Does your profile contain information not viewable by under 18? Yes | No

I just use those profile field Id's?

--------------- Added 1256228656 at 1256228656 ---------------

Again, It still doesn't seem to make sense for me..
The content I have will be the same, so I cant use the <else /> condition.
But if someone says they have nudity or profanity, then I want the whole page to give an error message.

If I use the <else /> command and make a new profile layout for that one, then they will still be able to see images, as I always want the profile pics to be visible, so its much easier to restrict profiles totally for people under 18 who show nudity.

Yes use those field ID #'s to set your conditions and YES you do want to use an <else /> otherwise it won't show the profile of the member to anyone but if it says hmm they have something, anything entered in that value do NOT show the profile and you can even throw in a message or redirect after the else before the end if ;)

It might require another if for the other profile field so two if's one else and 3 end if's. Also you can hide the entire profile or parts of it by wrapping the codes associated in if's ;).

Don't get lost PM me I'll have time later to reply need to hunt down a mod but you ought to know this by looking at your mods released by viewing your profile good sir :p

Mike

Edit: Now I remember you and the reason for you not knowing this already - micheal332001 (https://vborg.vbsupport.ru/member.php?u=53956) & https://vborg.vbsupport.ru/showthread.php?t=196819&page=8 I would rather you not pm me, simply saying it was a pleasure helping as always but I have internal rules and regulations I must abide by.

Sometimes you have to speak up even if others do not want to hear it, otherwise your not being true to yourself.