Log in

View Full Version : conditional to give forum access based on profile field


moonclamp
09-08-2006, 01:01 PM
I'm thinking of creating a "battle of the sexes" group of forums.

I want a mens forum and a womens forum ... however I want access to be based on a custom profile field (gender, id=5) .. so that only men can post in their forum and only women in theirs ... not yet decided about visibility though ... I might even want the forums only visible to the relevent gender.

Also I'd maybe want a custom "you cannot post in here because you are a man" type message,

Any idea how I could go about doing it?

I'd also want to make it so once a user has entered their gender in their profile they cannot change it later.

I found this (https://vborg.vbsupport.ru/showthread.php?t=119399)similar request, however, I don't want this to be usergroup based as I already have a lot of promotion stuff going on ... plus I already have a load of registered members so they would all need to be added to the group manually

ericgtr
09-08-2006, 05:09 PM
Hmm.. I see what you are after and why you want it this way. Let me peak into this for you, it may be possible with conditions alone but I can't be positive without digging a little. The forum conditional shouldn't be difficlut but we'll need to see if we can also set a conditional in User CP that says something like IF they've chosen a gender THEN don't display the options. I'll let you know.

moonclamp
09-08-2006, 05:32 PM
Thank you.

I was thinking something along the lines of a simple FORUMHOME edit using a forum ID and field ID conditional to prevent the forum being seen ... but I then realised I'd have to take searches and the forum dropdown into account too.

So then my next idea was to have the forums readonly, so that men and women could read but not post in their respective forums ... alas either of these would be beyond my skills.

ericgtr
09-08-2006, 05:44 PM
Removing the forums from searches will take a bit more. To be honest, not using usergroups for this makes it much more difficult than it needs to be. As stated in the post that you cited, Amy has already put something together for this and it uses secondary groups as well which should make it much easier for you https://vborg.vbsupport.ru/showthread.php?t=82993

I do understand what a pain it can be managing many groups and access but in the end it can be worth it if it fits your need.

moonclamp
09-08-2006, 06:14 PM
Yeah I'm beginning to think that ... but with a couple of thousand members, sorting and adding all the existing ones to that group seems like a thankless task.

ericgtr
09-08-2006, 06:25 PM
True, I have become very close with the Forums & Moderators > View Permissions interface, it makes life so much easier ;)