Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CES Parser Permissions Details »»
CES Parser Permissions
Version: 2.2.3, by thincom2000 thincom2000 is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 02-04-2007 Last Update: 11-07-2010 Installs: 59
DB Changes Uses Plugins Auto-Templates
Additional Files  
No support by the author.

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 - 3.8.x.

*** NEWS ***
11/8/2010 - 2.2.3 released
5/15/2010 - 2.2.2 released
4/12/2009 - 3.6.x thread separated

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: https://vborg.vbsupport.ru/showthread.php?p=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.3
  • non-forum messages don't parse
  • poll options don't parse

As of Version 2.2.2
  • several bug fixes
  • compatible with VaultWiki 2.5.7 PL 1 & 3.0.0 RC 3

* This mod is offered for free here. Please donate if you like this mod *

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 02-20-2008, 06:59 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cheesegrits View Post
The cleaning process is pretty intense, lots of memory and CPU, and on larger sites I'm not sure it would be workable for common things like forum posts ... but for stuff like profiles, I think it's a winner.
I thought this might be the case, so I was thinking of only running it when the post / profile is saved, and not on each post on showthread during run time.
Reply With Quote
  #113  
Old 02-20-2008, 08:04 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently there is some conflict with one of the modules available for vBadvanced. I'm not a vBa user, and since I don't have the time to go through all the addons for it, could someone experiencing the white page bug PM me login details for a test board with this issue? It has been reported by multiple users, so I would like to post a fix. Thanks.
Reply With Quote
  #114  
Old 02-20-2008, 08:57 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have any idea which module? I'm a CMPS user, be happy to debug it for you.

-- hugh
Reply With Quote
  #115  
Old 02-20-2008, 10:25 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thincom2000 View Post
I haven't tested this, but just thought of it while I was out.

In includes/ces_permissions.php, find:
PHP Code:
global $vbulletin$post$userinfo$nuwiki
Replace with:
PHP Code:
global $vbulletin$post
Just to confirm this does fix the issue with posting visitor messages to the wrong userid.

-- hugh
Reply With Quote
  #116  
Old 02-21-2008, 01:56 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's good to know. Thanks for confirming. Hard to believe that such a crazy bug could be caused by that. I'm still trying to figure out why IMG tags are completely stripped from Profile Fields.
Reply With Quote
  #117  
Old 02-21-2008, 08:52 AM
nerofix nerofix is offline
 
Join Date: Mar 2006
Location: Saarland
Posts: 219
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I can also confirm this. Thanks for this fix!

Another question, what about custom BB-Code? When trying to post a visitor message with custom bb-code it always says:



The following errors occurred when this message was submitted

1. BB code yt is not allowed.




Is there a way to allow it? Its also ignored in "about me".
Reply With Quote
  #118  
Old 02-21-2008, 01:29 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah the reason for this was the way Visitor Messages were hardcoded. I suspect that the developers thought we wouldn't want users embedding videos and images and such on people's profiles. Of course it's always possible to block individual codes and not kill the whole list.

I have implemented a workaround for this in my dev version, so that IMG and custom BB-Codes are working. I just have to figure out why HTML and IMG aren't parsed immediately following the AJAX edit pencils (until page refresh).
Reply With Quote
  #119  
Old 02-21-2008, 03:27 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thincom2000 View Post
I just have to figure out why HTML and IMG aren't parsed immediately following the AJAX edit pencils (until page refresh).
That's because of this code in ces_permissions_customfields():

PHP Code:
    if (FILE_VERSION >= '3.7.0')
    {
        global 
$blockobj;

        
$userinfo =& $blockobj->profile->userinfo;
    } 
Sllight variation of the same bug I mentioned in a previous post. When coming in through AJAX, a lot of the data structures that exist on a normal page load aren't there ... including $blockobj; I changed the above to just use $vbulletin->userinfo instead, and it works.

But I do need to test and make sure this doesn't screw up display perms when not using AJAX ...

EDIT - yup, it does need another change to work right in both cases:

PHP Code:
    if (FILE_VERSION >= '3.7.0')
    {
        if (
$_REQUEST['ajax'] == 1)
        {
            
$userinfo =& $vbulletin->userinfo;            
        }
        else
        {
            global 
$blockobj;
            
$userinfo =& $blockobj->profile->userinfo;
        }
    } 
This seems to work. The assumption being if it's AJAX, we know we are editing the profile for the logged on user, so we can use $vbulletin->userinfo. If not AJAX, we can use the $blockobj->profile->userinfo, which will be whoever the profile belongs to.

-- hugh
Reply With Quote
  #120  
Old 02-21-2008, 05:48 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cheesegrits View Post
The assumption being if it's AJAX, we know we are editing the profile for the logged on user, so we can use $vbulletin->userinfo. If not AJAX, we can use the $blockobj->profile->userinfo, which will be whoever the profile belongs to.
Right. Using $vbulletin->userinfo is still a problem, however. The function you have modified is also called in the postbits. Say an admin Quick Edits a post by someone with different profile field permissions. Using $vbulletin->userinfo when only checking that this is an AJAX request would result in the very minor bug that upon saving the edit, the admin would see the profile fields for that post parsed with the admin's permissions until he/she refreshed the page. Therefore, the fix I have implemented is similar, but slightly more specific in the criteria for setting $userinfo to $vbulletin->userinfo.

Thanks for your fix, though. It saved me some time looking this afternoon.
Reply With Quote
  #121  
Old 02-21-2008, 07:41 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I figured there'd be some other gotchas.

I'd like to get my hands on your latest fixes ASAP. I have a different issue - profile fields will display correctly after an AJAX edit, but not on a regular profile page load. I'm working on a semi-related hack, which replaces the regular About Me tab (but shows the same About Me profile field info by default unless you crate an HTML profile). And I'm not sure if it's a bug in my code, or some weird interaction between mine and yours, but the default field display isn't parsed. Except when loaded via AJAX ... *sigh* ...

-- hugh
Reply With Quote
Reply


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 11:19 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.04854 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete