I've Just Figured that the Previous Code for the BBCodes is for Disabling the Parsing Options when the BBCode is Being Posted, but Not to Avoid Viewing it; to Disable the Display of Custom BBCodes on Posts you should do the Following.
There should be some Extra Code that can be Removed from the Following Code Lines, but as I'm Not a Coder I Can't Optimize it; if You Find a Way to Remove the Extra Code that isn't needed, it'll be Just Great that You Post Your Solution Here for Everybody to Benefit.
First Step:
First You Need to
Add at the Beginning of Each
Custom BBCode You Wish to Restrict Viewind/Displaying the Following Text
Quote:
<div id="private_bbcode">
|
and
Add at the End of Each
Custom BBCode You Added the Previous "
div" Opening Tag Code.
to Close the "
div" Tag.
Again, this Uses a small part of the Code of the Mod from
Cybernetec "Advanced Permissions Based on Post Count", and Found on the Plugin "Cyb - APBOUPC - P2 (PB)", the Code needed to Disable Images and Links in Posts and in Signatures; I Edited the Code to Leave Only the Code Lines to Remove BBCodes, (it was an Test and Error process because I'm not a Coder), and I Found that it can be done with the Help of that Useful Code from
Cybernetec, (
all Credits are His).
This Can be Included in the Plugin I Posted Just Above "BBCode Permissions For Usergroups - IMG - postbit_display_complete", because it uses the same vBulletin Hook.
Second Step:
Create a Plugin.
Product: vBulletin
Hook Place: postbit_display_complete
Title: BBCode Permissions For Usergroups - Custom BBCodes - postbit_display_complete
(or the Title that you wish)
Plugin Active: Yes
PHP Code:
Code:
if (is_member_of($this->registry->userinfo, 1,3,4,8))
{
$this->post['message'] = preg_replace('!(<div id="private_bbcode">)(.*)(<\/div>)|[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\b!siU', construct_phrase('<br />[[To See BbCodes in Posts You Must Register and Activate Your Account]]<br />', $forum[linkview_nb], $cyb_apboupc_viewlinks_userpostsnr), $this->post['message'].' ');
}
-1. Edit the usergroups
1,3,4,8 for the Ones You Wish that Can't See Custom BBCodes.
-2. Edit the Text of
[[To See BBCodes in Posts You Must Register and Activate Your Account]], to the One you Wish Users of those Usergroups to See instead of the Custom BBCodes.
That's it. Enjoy.
My Best Regards.