Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

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
  #62  
Old 05-23-2007, 04:58 PM
Sychev_S Sychev_S is offline
 
Join Date: Oct 2005
Location: Toronto
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get it on the profile page. Version of vb is 3.6.4
There is a possibility that it might be conflicting with psionic vision's interactive profiles, but I am not sure. When that hack is on, it givers me 8+ strings of above mentione error in the same profile, when I turn it off it gives me only one.
Plus for some reasons it varies from profiel to profile, on some profiles I do not get error at all...
Reply With Quote
  #63  
Old 05-23-2007, 05:04 PM
BlackNovaYZFR1 BlackNovaYZFR1 is offline
 
Join Date: Jun 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After my upgrade to 1.2.7, I started getting random bbcode disables within threads. User would randomly have their bbcodes disabled within threads. The thing I found to fix this is to put
Code:
$this->set_parse_userinfo($userinfo, $userinfo['permissions']);
at the end of the
Code:
if (THIS_SCRIPT != 'member')
block. Is this proper?

BTW, the version number is still 1.2.6 in the file.
Reply With Quote
  #64  
Old 05-23-2007, 05:24 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The fact that you were getting that error was probably a result of the version number not being updated, so none of the plugins were replaced with the new versions.

I will be uploading a new file with a little cleaner code and that fixed a bug in the new plugin code that wasn't installed anyway thanks to the version number.
Reply With Quote
  #65  
Old 05-23-2007, 05:26 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sychev_S View Post
I get it on the profile page. Version of vb is 3.6.4
There is a possibility that it might be conflicting with psionic vision's interactive profiles, but I am not sure. When that hack is on, it givers me 8+ strings of above mentione error in the same profile, when I turn it off it gives me only one.
Plus for some reasons it varies from profiel to profile, on some profiles I do not get error at all...
You are probably right about the conflict since this has already had conflicts with other hacks. If PV's Interactive Profiles is a free hack I will look into this later.

EDIT: Apparently the fix I wrote way back for what I think may have been a conflict with this same hack was broken somewhere along the line. I have fixed the fix. Let me know if you still get this error.
Reply With Quote
  #66  
Old 05-25-2007, 08:36 PM
BlackNovaYZFR1 BlackNovaYZFR1 is offline
 
Join Date: Jun 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've had to make some modifications to get the member and private scripts to display properly:

Code:
global $vbulletin;

if (THIS_SCRIPT == 'private')
{
	$tempuser=fetch_userinfo($pm['fromuserid']);
	$tempuser['permissions'] = cache_permissions($tempuser);
	$check_ugp = convert_bits_to_array($tempuser['permissions']['ces_parser_permissions'], $vbulletin->bf_ugp['ces_parser_permissions']);
}
elseif (THIS_SCRIPT != 'member')
{
	global $newpost, $postinfo, $post;

	// newthread, newreply uses $newpost
	// editpost uses $postinfo
	// showthread uses $post

	$postusername = '';

	if (THIS_SCRIPT == 'editpost')
	{
		$postusername = $postinfo['username'];
	}

	if (in_array(THIS_SCRIPT, array('newreply', 'newthread')))
	{
		$post = $newpost;

		if ($post['username'] AND ($vbulletin->userinfo['username'] != $post['username']))
		{
			$postusername = $post['username'];
		}
	}

	if (!$post['usergroupid'] AND $postusername != '')
	{
		$userinfo = $vbulletin->db->query_first("
			SELECT userid, usergroupid, membergroupids 
			FROM " . TABLE_PREFIX . "user
			WHERE username = '" . $vbulletin->db->escape_string($postusername) . "'
		");

		if (empty($post['permissions']))
		{
			$grab = true;
		}
		else
		{
			$userinfo['permissions'] = $post['permissions'];
		}
	}
	else if (($post['usergroupid'] > 0))
	{
		$userinfo['userid'] = $post['userid'];
		$userinfo['usergroupid'] = $post['usergroupid'];
		$userinfo['membergroupids'] = $post['membergroupids'];

		if (empty($post['permissions']))
		{
			$grab = true;
		}
		else
		{
			$userinfo['permissions'] = $post['permissions'];
		}
	}
	else if (in_array(THIS_SCRIPT, array('newreply', 'newthread')))
	{
		$userinfo['userid'] = $vbulletin->userinfo['userid'];
		$userinfo['usergroupid'] = $vbulletin->userinfo['usergroupid'];
		$userinfo['membergroupids'] = $vbulletin->userinfo['membergroupids'];

		if (empty($vbulletin->userinfo['permissions']))
		{
			$grab = true;
		}
		else if (empty($userinfo['permissions']))
		{
			$userinfo['permissions'] = $vbulletin->userinfo['permissions'];
		}
	}

	if ($grab)
	{
		$userinfo['permissions'] = cache_permissions($userinfo);
	}


	if ($this->parse_userinfo['permissions'] != $userinfo['permissions'])
	{
		$this->set_parse_userinfo($userinfo, $userinfo['permissions']);
	}

	$check_ugp = convert_bits_to_array($this->parse_userinfo['permissions']['ces_parser_permissions'], $vbulletin->bf_ugp['ces_parser_permissions']);
} else {
	$tempuser=fetch_userinfo($vbulletin->GPC['userid']);
	$tempuser['permissions'] = cache_permissions($tempuser);
	$check_ugp = convert_bits_to_array($tempuser['permissions']['ces_parser_permissions'], $vbulletin->bf_ugp['ces_parser_permissions']);
}
$bad_tags = explode(',', $vbulletin->options['bad_tags']);

$dobbcode = $do_bbcode ? $do_bbcode : $dobbcode;
$dosmilies = $do_smilies ? $do_smilies : $dosmilies;
$dobbimagecode = $do_smilies ? $do_bbimagecode : $dobbimagecode;
$dohtml = $do_html ? $do_html : $dohtml;

$dobbcode = ($check_ugp['can_bbcode_post'] AND $dobbcode);
$dosmilies = ($check_ugp['can_smilies_post'] AND $dosmilies);
$dobbimagecode = ($check_ugp['can_imgcode_post'] AND $dobbimagecode);

$do_bbcode =& $dobbcode;
$do_smilies =& $dosmilies;
$do_bbimagecode =& $dobbimagecode;
$do_html =& $dohtml;

if ($check_ugp['can_html_post'] AND $do_html)
{
	$do_html = true;
	foreach ($bad_tags AS $badtag)
	{
		$badtag = html_entity_decode($badtag);
		$text = str_replace( '<' . trim($badtag), htmlspecialchars('<' . trim($badtag)), $text);
		$text = str_replace( '</' . trim($badtag), htmlspecialchars('</' . trim($badtag)), $text);
	}
	unset($badtag, $badtags);
}
else
{
	$do_html = false;
}
I'm not sure that this is entirely correct, but it's a start for me.
Reply With Quote
  #67  
Old 05-26-2007, 01:06 AM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the PM bit, I completely forgot about that, although I think I would add another permissions set to make the hack a little more flexible there.

Did you find that it was necessary to add the permissions on the member page or did you do that for the sake of completeness? In my case I had not had any problems with the original code for permissions on member.php.
Reply With Quote
  #68  
Old 05-26-2007, 03:00 PM
BlackNovaYZFR1 BlackNovaYZFR1 is offline
 
Join Date: Jun 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thincom2000 View Post
Thanks for the PM bit, I completely forgot about that, although I think I would add another permissions set to make the hack a little more flexible there.

Did you find that it was necessary to add the permissions on the member page or did you do that for the sake of completeness? In my case I had not had any problems with the original code for permissions on member.php.
The member script gave me a bunch of invalid eval()'s, I don't have the exact error messages anymore, sorry. I think it was looking at the fields at the time.
Reply With Quote
  #69  
Old 05-26-2007, 05:49 PM
BlackNovaYZFR1 BlackNovaYZFR1 is offline
 
Join Date: Jun 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, I was able to find the error:

Code:
( ! ) Parse error: syntax error, unexpected '"' in /usr/www/sites/www.parrotforums.com/member.php(607) : eval()'d code on line 28Call Stack#TimeMemoryFunctionLocation10.0122786432{main }( )../member.php:0


( ! ) Parse error: syntax error, unexpected '"' in /usr/www/sites/www.parrotforums.com/member.php(607) : eval()'d code on line 28Call Stack#TimeMemoryFunctionLocation10.0122786432{main }( )../member.php:0


( ! ) Parse error: syntax error, unexpected '"' in /usr/www/sites/www.parrotforums.com/member.php(607) : eval()'d code on line 28Call Stack#TimeMemoryFunctionLocation10.0122786432{main }( )../member.php:0


( ! ) Parse error: syntax error, unexpected '"' in /usr/www/sites/www.parrotforums.com/member.php(607) : eval()'d code on line 28Call Stack#TimeMemoryFunctionLocation10.0122786432{main }( )../member.php:0


( ! ) Parse error: syntax error, unexpected '"' in /usr/www/sites/www.parrotforums.com/member.php(607) : eval()'d code on line 28Call Stack#TimeMemoryFunctionLocation10.0122786432{main }( )../member.php:0
Reply With Quote
  #70  
Old 05-28-2007, 04:21 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds like I overlooked something before the eval()s. When I get back home I'll look into this.

UPDATE: The next build will be 1.3.0 and will include the eval() fix, as well as have the added permissions for PMs (the code is a bit simpler than BlackNova posted above).

let me know if there's anything else I should include since this is a major (feature) update.
Reply With Quote
  #71  
Old 06-06-2007, 07:51 AM
Sychev_S Sychev_S is offline
 
Join Date: Oct 2005
Location: Toronto
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this error:

Quote:
Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77

Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77

Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77

Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77

Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77

Parse error: syntax error, unexpected '"' in /home/talkint/public_html/testboard/forums/member.php(595) : eval()'d code on line 77
Reply With Quote
Reply

Thread Tools

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 08:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12588 seconds
  • Memory Usage 2,321KB
  • 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_code
  • (3)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
  • (1)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