PDA

View Full Version : Males can't access Femals Fourm


inshad
08-02-2006, 08:07 PM
HI,
I wrote a hook with VB3.5.1 that allow only females gender to access a certain forum (Which was for the ladies only).
and it's working fine.

but when I upgrade the forum to the version 3.5.4 , it's not working, and Males can access the forum normaly !

Would you please assist me on that ?


<?xml version="1.0" encoding="ISO-8859-1" ?>
- <plugins>
- <plugin active="1" product="vbulletin">
<title>Females Forums acess</title>
<hookname>forumbit_display</hookname>
- <phpcode>
- <![CDATA[
if(($foruminfo[forumid]==4)&&($vbulletin->userinfo['usergroupid']==2)&&($vbulletin->userinfo['field6']==Male)){
standard_error(fetch_error('cantMale'));
}

]]>
</phpcode>
</plugin>
</plugins>

Thug
08-23-2006, 12:56 PM
bump cause im realy want this :)

Erox
08-31-2006, 07:23 PM
Interesting. What we did on our board is make usergroups for males and females, and then forum permissions that NO ONE (including Admins) can see those forums unless they're in that gender group.

Perhaps you can write a hook based on that usergroup instead?

But isn't it a bit risky doing it the way you did? I mean anyone can "claim" they're a male or female in their profile.

Freesteyelz
09-01-2006, 03:56 AM
Unless you get hard copies of personal records of each user you won't really know if your users are telling the truth. Though, I'd go with Usergroups or custom profile fields to do what you want. :)