Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 03-14-2006, 12:01 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default OK How did you do it? - Exclude categories in UserCP

To the powers that be here at vb.org,

I love the option to hide categories. Can you share how you did it with the membership?

Thanks!
Reply With Quote
  #2  
Old 03-14-2006, 12:30 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that's very easy to do

just set up a new profilefield with select boxes

and then put a small plugin into global_start check if a chackbox is checked, and if yes, just change the permission cache for that forum/category to 0
Reply With Quote
  #3  
Old 03-14-2006, 01:35 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Stefan,

Thanks.

I do understand what you said and how it's done. However, not being a coder, I have no idea how to write the small plugin. Would you share the one you wrote?
Reply With Quote
  #4  
Old 03-14-2006, 02:26 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, it's not very much

the plugin looks like that:

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

Reply With Quote
  #5  
Old 03-26-2006, 11:36 AM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*clicks install*


Dang it, where's the install?
Reply With Quote
  #6  
Old 04-23-2006, 11:43 PM
mikeylikesitz's Avatar
mikeylikesitz mikeylikesitz is offline
 
Join Date: Apr 2002
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i take it there is something to change to make that work?
Reply With Quote
  #7  
Old 04-24-2006, 11:22 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the xes and xyes... of course
Reply With Quote
  #8  
Old 06-08-2006, 10:02 AM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

It isn't working for me for some reason. I set up new profile field with multiple checkboxes. Each checkbox is for each category that I want the option to exclude.

I then built the plugin you mentioned above. Fieldxx was changed to Field12 (the field I created). I then changed the xy with the forum ID for each forum within the category I want to hide if the box is checked.

Is that correct? Don't know what I'm doing wrong.
Reply With Quote
  #9  
Old 07-11-2006, 02:37 AM
Mysticales's Avatar
Mysticales Mysticales is offline
 
Join Date: Oct 2005
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know on VB3.0x when you wanted to use a checkbox to do a option for "Save sent PM" choice.. you also had to make a SQL table by hand.

On 3.5x the plugin did that all for you, and it worked for the save sent PM.
My guess... the SAME plugin with renamed variables for the "Exclude Forums" options" would allow users to SAVE the options.
https://vborg.vbsupport.ru/showthread.php?t=98551

The question is.. how would it be applied to the user in the forums? "FORUMSHOME" template or what?

Also I would love to hear more about how this could be done.. is there a chance this could be done on a 3.0.9 vB without ftp access?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04081 seconds
  • Memory Usage 2,240KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete