Hello.
On my site, we previously had the ability (via a very simple custom vB plug-in) to allow posting in a male or female-specific forum.
If you were male, you could post in the male forum but only read in the female forum.
If you were female, you could post in the female forum but only read in the male forum.
If you were undisclosed (gender not chosen), you could read in both but not post in either.
We had added this plug-in to the old vB hook "newreply_start" and "newthread_start"
Here was the code we had used, anyway to get it to function via XF?
On my site, we previously had the ability (via a very simple custom vB plug-in) to allow posting in a male or female-specific forum.
If you were male, you could post in the male forum but only read in the female forum.
If you were female, you could post in the female forum but only read in the male forum.
If you were undisclosed (gender not chosen), you could read in both but not post in either.
We had added this plug-in to the old vB hook "newreply_start" and "newthread_start"
Here was the code we had used, anyway to get it to function via XF?
PHP:
if ($foruminfo['forumid'] == 34 or $foruminfo['forumid'] == 35)
{
// yes, it is
if ($foruminfo['forumid'] == 34 and $vbulletin->userinfo['field5'] == 'Female')
{
print_no_permission();
}
if ($foruminfo['forumid'] == 35 and $vbulletin->userinfo['field5'] == 'Male')
{
print_no_permission();
}
if ($vbulletin->userinfo['field5'] != 'Male' and $vbulletin->userinfo['field5'] != 'Female')
{
print_no_permission();
}
}