View Full Version : BB Code Enhancements - CES Parser Permissions
thincom2000
01-07-2010, 10:00 PM
CES Parser Permissions
vBulletin 3.6.x, 3.7.x, 3.8.x, 4.0.x supported
Version: 2.2.3
If you encounter what you think may be a bug, please include your vBulletin version number when reporting it, since code and fixes differ greatly from 3.6.4 - 4.0.x.
*** NEWS ***
6/25/2014 - 2.2.5 released
11/8/2010 - 2.2.3 released
5/15/2010 - 2.2.2 released
4/25/2010 - 2.2.1 released
4/9/2010 - 2.2.0 Patch Level 1 released
1/8/2010 - 4.0.x thread created
Known Issues:
- If you are using the Advanced BB-Code Permissions hack, conflicts can arise when profile fields are parsed in the postbit, causing nothing be parsed. The fix is described here: 1252480
What It Does:
Allows you to grant only certain usergroups the ability to use HTML, BB-code, smilies, and IMG-code in their profile fields, posts, PMs, and in Project Tools.
Mod Features:
- parse profile fields on user profiles using Usergroup Permissions
- parse profile fields in postbits using Usergroup Permissions
- parse posts using Usergroup Permissions
- parse calendar events using Usergroup Permissions
- parse private messages using Usergroup Permissions
- parse Project Tools issues and replies using Usergroup Permissions
- parse Social Messages and usernotes using Usergroup Permissions
- complete Forum Rules integration
- disallow certain HTML tags
Products to Install: 1
Files to Upload: 3
Files to Edit: 0
Template Edits: 0
*** Changelog ***
As of Version 2.2.5
compatible with PHP 5.4+
compatible with vBulletin 4.1.4+
compatible with VaultWiki 4.x
As of Version 2.2.3
non-forum messages don't parse
poll options don't parse
As of Version 2.2.2
compatible with VaultWiki 2.5.7 PL 1 & 3.0.0 RC 3
As of Version 2.2.1
edit permissions check disables post cache
* This mod is offered for free here. Please donate if you like this mod *
Kolbi
01-08-2010, 03:18 PM
Will have a look at it. :)
Zaiaku
01-09-2010, 01:13 AM
Will have to give this one a test. Greak work!
DCX000
01-10-2010, 05:01 PM
I think this might be what I have been searching for. I have a couple of basic or obvious questions but want to make sure I understand what this can do. I am considering using this on a 4.0 Suite.
Does this allow me to have a "Newbie" usergroup that cannot post any active clickable links in forum posts? THEN after I promote them to the "Members" usergroup I can allow them to start posting parsed or clickable links?
Can this stop usergroups from posting parsed links in blog posts or cms article comments?
If I apply the "Do Not Allow to Parse" rule to an existing usergroup, will it un-parse links they already posted?
If I move a user out of the usergroup that allowed parsed links, and into a usergroup that does not allow parsed links, will it un-parse links they already posted?
Are there any screenshots?
And last, what does C.E.S. stand for?
Thank you for making this and any help with my questions!
thincom2000
01-11-2010, 04:48 PM
Yes, you can create a Newbie usergroup that cannot post BB-Code. Please note that this mod affects all BB-Code at once - (B, I, URL, INDENT, LIST, etc), you cannot specify the URL tag only.
If you apply the rule to an existing usergroup or move the user to a usergroup so they cannot post BB-Code, their BB-Code will become unparsed the next time your post cache empties.
Not much to show screenshots of, except the settings pages.
CES stands for the web site where the mod is developed - http://www.crackedeggstudios.com/
DCX000
01-12-2010, 01:22 AM
Please note that this mod affects all BB-Code at once - (B, I, URL, INDENT, LIST, etc), you cannot specify the URL tag only.
I see, that might be a showstopper for me. I was just trying to stop new users from posting links. I still want them to be able to use images, format font, all other stuff. Thank you for the response.
BTW - I like the flash intro to your site. It's the first one in a long time I didn't skip. Had to see what happens when the egg hatches.
thincom2000
01-14-2010, 04:09 AM
There's another mod on here called "Advanced BB-Code Permissions" that might be closer to what you want. It hasn't been officially updated for vBulletin 4 but I haven't had problems with the old version yet on my vB4 site.
thincom2000
04-10-2010, 03:27 PM
Existing users should update immediately if you were already running vBulletin 4.0.3.
thincom2000
05-15-2010, 04:35 AM
Posted the 2.2.2 update. Users who are also running VaultWiki (full (http://www.vaultwiki.org/) or lite (https://vborg.vbsupport.ru/showthread.php?t=239377)) need to update to this version.
RustyDogma
08-18-2010, 02:51 PM
I just downloaded this mod and just love it. Unfortunately, I'm running into a conflict with:
Easy Forms (https://vborg.vbsupport.ru/showthread.php?t=234385)
None of the BBCode in my forms created with that mod will parse when I have CES installed.
I'm using the latest version of both, and am hoping there's a way around this, as everything else is working perfectly.
From what I can tell, the shared hook is cache_templates
thincom2000
08-19-2010, 06:46 AM
Looks like Parser Permissions needs to be updated so that 'nonforum' messages are parsed using the forum default settings.
RustyDogma
08-19-2010, 01:16 PM
Aha.. well I feel better then, I messed bunch of forum permissions, thinking maybe it was me and still couldn't get it working :P
RustyDogma
08-25-2010, 08:33 AM
Looks like Parser Permissions needs to be updated so that 'nonforum' messages are parsed using the forum default settings.
Is an update like that in the works? If not, no worries.. I just wanted to check with you, as I need to find another solution to my parsing issues that Parser Permissions solved for me if not :)
thincom2000
11-08-2010, 07:50 PM
Posted the 2.2.3 update, which includes fixes for poll options and 'nonforum' messages.
I'll probably need to be updating this again for vBulletin 4.0.9 when the new editor comes out.
RustyDogma
11-08-2010, 08:12 PM
Works wonderfully.. thank you soooo much!
UncoderMom
01-29-2011, 02:07 PM
I used your 3.x version of this and love it! Glad to see you keeping up with it! :)
Thank you!
Yes, put your newbies in a different usergroup. Promotions are great!
fxwoody
10-30-2011, 11:46 AM
Ok thincom, your hack works fine in my 4.1.3 but i end up with a massif problem in post page when using my thanks button whit "Hide Hack Ressurection" , every bbcode dissapear when clicking it and we need to refresh page in order to get images and all back :(
I tried to pinpoint the problem but i'm not a coder like you so , if you could help out on this i would appreciate a lot ;)
As soon as i disable you hack, it comes back to normal, so, my gues would be related to a parse_permission in it that conflicts with other hack?!?!
Tks a lot and yes, you hack is perfect as i use a Prez generator in my registration page for the members to make their intro but with out it, nothing works and first post would only show the bbcode in HTML format.
Cheers
aucrawford
10-05-2012, 05:21 PM
I'm running 4.1.10 and when I install this hack I get this error.
Warning: require_once([path]/includes/ces_permissions.php): failed to open stream: No such file or directory in [path]/includes/functions_bigthree.php(416) : eval()'d code on line 3
Fatal error: require_once(): Failed opening required '/var/www/php/releases/20120927085620/forums/includes/ces_permissions.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/php/releases/20120927085620/forums/includes/functions_bigthree.php(416) : eval()'d code on line 3
It looks like I'm missing functions_bigthree.php
Should I get a copy and put it in or was it removed for a reason in this vB version?
thincom2000
10-07-2012, 07:49 AM
EDIT: Nope, functions_bigthree.php exists. It looks like you forgot to upload the files that came with this mod. You need to upload includes/ces_permissions.php from the ZIP.
aucrawford
10-09-2012, 01:14 AM
includes/ces_permissions.php is definitely there. Along with the other two xml files.
I'm supposed to keep the structure as it is in the zip right? for instance ces_permissions.php should go in the includes folder etc.
I still get that error whenever I try to install the product-xml. I always allow overwrite also.
thincom2000
10-09-2012, 04:54 PM
True, the directory structure in the ZIP should remain intact, but the correct location for ces_permissions.php is also the same folder with functions_bigthree.php. If they aren't in the same folder, then you have uploaded the ZIP outside of your forum directory.
aucrawford
10-09-2012, 10:12 PM
I see now that I was not putting the files in the correct place. It appears to be working now. Do you have any recommendation about how I can do this kind of thing for not just images but for video and each other code?
serhwee
08-01-2013, 12:19 PM
I installed in VB 4.2, found that when editing a post it cannot use WYSIWYG mode. Any solution?
thincom2000
08-02-2013, 12:55 PM
I will have to upgrade to 4.2 today and let you know. Right now the site where I use this still has 4.1. I will post again when I know more.
serhwee
08-03-2013, 02:43 AM
I will have to upgrade to 4.2 today and let you know. Right now the site where I use this still has 4.1. I will post again when I know more.
Thanks, could you add a function to disable only the website link BB code?
thincom2000
09-10-2013, 07:30 PM
I installed in VB 4.2, found that when editing a post it cannot use WYSIWYG mode. Any solution?
I have not had this issue in 4.2 as long as WYSIWYG editing controls are enabled for the specific editor in question. I thought I had the same problem but then soon found out I had WYSIWYG disabled for Quick Edit in vBulletin's settings.
If you still have problems, the product uploaded here might not be up-to-date with some changes I've made.
Check the plugin for this product at hook editor_toolbar_end. Look for a line like:
$forumid .= '&p=' . $post['postid'];
The very next line should be:
if (is_object($cke))
{
$cke->setEditorParseType($forumid);
}
If it's not, then add it.
Pocket Aces
06-25-2014, 01:20 AM
I installed in VB 4.2, found that when editing a post it cannot use WYSIWYG mode. Any solution?
we have similar issues, we can't try the fix since we dont have this line in the plugin...
$forumid .= '&p=' . $post['postid'];here's the code...
global $permissions, $ces_forumrules, $forumrules;
global $htmlcodeon, $bbcodeon, $smilieson, $imgcodeon;
ces_permissions_toolbar2($forumid, $editor_template_name);
if ($savebbcodecache)
{
$vbulletin->bbcodecache = $savebbcodecache;
}
thincom2000
06-25-2014, 12:11 PM
Okay, I just uploaded the version I've been using for the past 4 years with vBulletin 4. Please let me know if it resolves your issue.
Pocket Aces
06-25-2014, 03:54 PM
works perfectly with WYSIWYG now, thanks Ted
grey_goose
08-15-2016, 01:03 PM
Got a head scratcher.
Mod works beautifully, except Guest posts don't parse post content. Unregistered (group 1) and Awaiting (group 3) both have "Allow BB-Code" set to YES in Posts & Profile Fields.
I know it's this mod, because as soon as I disable it, guest bb-code parses.
Is there some setting/configuration I'm missing other than Usergroup Manager?
p.s. Am not used Advanced BBCode mod, but a ton of other mods.
thincom2000
08-15-2016, 03:34 PM
I have reviewed the code and it looks like you are correct. There is no handling for guest users.
Try this. In includes/ces_permissions.php, find:
if (!empty($parser->ces_options["$forumid"][$parser->ces_options['current_userid']]))
{
$dohtml = $parser->ces_options["$forumid"][$parser->ces_options['current_userid']]['can_html_' . $parser->ces_options['check_type']];
Before it, add:
if (empty($parser->ces_options['current_userid']))
{
// user is a guest
$userinfo = array(
'userid' => 0,
'usergroupid' => 0,
'membergroupids' => ''
);
if (empty($parser->ces_options["$forumid"][0]))
{
if (empty($post['permissions']))
{
$grab = true;
}
else
{
$userinfo['permissions'] = $post['permissions'];
}
}
}
grey_goose
08-15-2016, 04:19 PM
AHA!
Thank you so much! And again, great mod!
What It Does:
Allows you to grant only certain usergroups the ability to use HTML, BB-code, smilies, and IMG-code in their profile fields, posts, PMs, and in Project Tools.
hmm... I only see "CES Profile Permissions" group in "AdminCP -> Usergroups -> Usergroup Manager -> Edit Usergroup"
Also would be nice to disallow to use TABLE bb code for usergroups!
It also in CONFLICT with [CKEditor] MARCO1 Advanced Quick Reply And Edit :(
Pocket Aces
08-29-2018, 03:23 AM
This mod prevents inline image (attach tag) from showing in posts.
after uninstall blogs are still messed up and I don't know how to fix
terrible mod, do not use, you've been warned
brandon515
12-23-2019, 04:48 PM
I'm getting these warnings filling up my error log, any ideas?
PHP Warning: Use of undefined constant value - assumed 'value' (this will throw an Error in a future version of PHP) in /home/mysite/public_html/includes/ces_permissions.php(588) : eval()'d code on line 1
Hostboard
12-23-2019, 09:37 PM
The PHP call is depreciated in the version of PHP you are running. Did you or your host recently update PHP? While VB 4.2.5 is compatible with PHP 7.1.x many of the plugins were not written for this version and will throw warning messages. This does not mean they will not work and you can just add:
php_flag display_errors off
to your .htaccess file to suppress the warning message(s). Eventually you might want to have hire a coder to bring the code up to date.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.