vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Xenon's gone- can someone please help? (https://vborg.vbsupport.ru/showthread.php?t=118210)

agiacosa 06-10-2006 09:51 AM

Xenon's gone- can someone please help?
 
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:

Code:

// 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.


All times are GMT. The time now is 03:05 PM.

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.00966 seconds
  • Memory Usage 1,719KB
  • 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
  • (6)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