vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Males can't access Femals Fourm (https://vborg.vbsupport.ru/showthread.php?t=122851)

inshad 08-02-2006 08:07 PM

Males can't access Femals Fourm
 
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 ?


Code:

  <?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. :)


All times are GMT. The time now is 08:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01090 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete