Thread: Miscellaneous Hacks - Disable BBCodes/Smilies Per Users/Usergroups
View Single Post
  #46  
Old 12-17-2017, 12:49 PM
Peter Walker Peter Walker is offline
 
Join Date: Oct 2005
Location: Germany
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, your instructions are confusing. You tell people to upload the file into the server root directory. Many people put vBulletin in a subdirectory like /forum and they would be confused as to where to put it. After experimenting, I found you meant the forum root directory. For example, if vbulletin is installed in www.mywebsite.com/forum, then the directory and contents has to be uploaded to www.mywebsite.com/forum/markfl_disablebbcodes and NOT www.mywebsite.com/markfl_disablebbcodes which would be the server directory.

I am trying to set this up so that members of a premium secondary usergroup (30) can use the bbcodes and everyone else cannot. This is to restrict access to videos, etc. to those that have permission. I am still working out how to get this to work with your mod. It would therefore be much easier if an extra setting could be added to switch to enabling the bbcodes for just selected usergroups instead of disabling for all, but.
I originally installed the first version of this mod, before discovering version 1.4 that I have now installed under vBulletin 4.2.5.

This is how I setup the mod:
Set whether product is active or not.: Yes
BBCode Tag Names: audiop,videomp4p,videomp4vttp
Smilies:
Usergroups: Marked all usergroups except: None,All,Administrators,Premium
Usergroup Membership Type: I tested all three variants - see below.
Usernames:
Individual Restrictions:
Replace BBCodes/Smilies With Message? Yes, For BBCodes Only
Active Areas: All ticked
Suppression Type: Display

As far as I could see, this should work. Everybody who has the Premium group activated as a secondary group should be allowed to see the content, everyone else should see the error message.

I tried setting Usergroups: ALL
This blocked access for everyone.
- Primary Usergroups Only: Blocked
- Secondary Usergroups Only: Blocked
- Primary And Secondary Usergroups: Blocked

I tested this with three users:

User: Administrator
Usergroup Primary : Administrator
Usergroup Secondary: Premium
Expectation: Should by able to use the bbcode as he belongs to the premium group.

User: PremiumUser
Usergroup Primary : Registered Member
Usergroup Secondary: Premium
Expectation: Should by able to use the bbcode as he belongs to the premium group.

User: NormalUser
Usergroup Primary : Registered Member
Usergroup Secondary:
Expectation: Should by blocked from seeing the bbcode and shown an error message, instead.


Test 1:
Usergroups: All marked except: None, All, Administrators, Premium
User: Administrator (should always have access)
- Primary Usergroups Only: BBCode Displayed
- Secondary Usergroups Only: Blocked
- Primary And Secondary Usergroups: Blocked

User: NormalUser (should be denied access)
- Primary Usergroups Only: BBCode Displayed, although should be blocked
- Secondary Usergroups Only: Blocked
- Primary And Secondary Usergroups: Blocked

User: PremiumUser (should have access)
- Primary Usergroups Only: BBCode Displayed, OK
- Secondary Usergroups Only: Blocked, although member of premium usergroup!
- Primary And Secondary Usergroups: Blocked

Test 2:
Usergroups: Premium usergroup selected, ONLY (Administrator and PremiumUser have this as secondary group)
User: Administrator (should always have access)
- Primary Usergroups Only: BBCode Displayed
- Secondary Usergroups Only: Blocked
- Primary And Secondary Usergroups: Blocked

User: NormalUser (should be denied access)
- Primary Usergroups Only: BBCode Displayed, although should be blocked
- Secondary Usergroups Only: Blocked
- Primary And Secondary Usergroups: Blocked

User: PremiumUser (should have access)
- Primary Usergroups Only: BBCode Displayed, OK
- Secondary Usergroups Only: Blocked, although member of premium usergroup!
- Primary And Secondary Usergroups: Blocked


As you can see, there is no combination that works correctly. What am I doing wrong?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01138 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete