PDA

View Full Version : Xenon's gone- can someone please help?


agiacosa
06-10-2006, 09:51 AM
Hi,

vB.org has the ability to hide certain forums if the user chooses through the UserCP. Xenon kindly told us how to do it here: https://vborg.vbsupport.ru/showthread.php?t=110344. Unfortunately, it doesn't work for me but I may be doing something wrong.

Would someone be willing to lend a quick hand? I'm sure for a coder this is baby stuff as Stefan already posted the code for the plugin.

What happened when I activated the plug in was that when you clicked on a URL on forumhome, it redirected back to home or gave an error.

Thanks!

KW802
06-10-2006, 11:12 PM
If you post the code you came up with I'm sure somebody can point you in the right direction.

akanevsky
06-11-2006, 12:39 AM
Try this:
https://vborg.vbsupport.ru/showthread.php?t=98360

agiacosa
06-11-2006, 11:00 AM
Thanks.

Anthony that is almost perfect for me except I don't have control over which forums you can hide.

This was the plugin code Xenon posted that doesn't work for me:

// Exclude Forums except direct link to thread
if ($vbulletin->userinfo['fieldxx'] != 0 AND THIS_SCRIPT != 'showthread' AND THIS_SCRIPT != 'attachment')
{
$excludeforums = array();
if ($vbulletin->userinfo['fieldxx'] & (1 << 0)) // first checkbox
{
$excludeforums = array_merge($excludeforums, array(xy, xy, xy, xy));
}
if ($vbulletin->userinfo['fieldxx'] & (1 << 1)) // second checkbox
{
$excludeforums = array_merge($excludeforums, array(za, za, za, ta));
}
...
foreach ($excludeforums AS $fid)
{
$vbulletin->userinfo['forumpermissions']["$fid"] = 0;
}
}

akanevsky
06-11-2006, 11:49 AM
To have control over which forums you can hide, you would simple have to modify the html code a bit and also add a simple verification on the php end.

agiacosa
06-11-2006, 02:47 PM
I can handle the html but the php verification is over my head. Do you or anyone have an example of that?

Thanks.