vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - CES Parser Permissions (https://vborg.vbsupport.ru/showthread.php?t=138476)

thincom2000 06-26-2008 12:36 AM

Quote:

Originally Posted by OsideRida06 (Post 1558885)
Also the vbadvance is also not allowing the bb code. These are the last two things and then this is installed perfectly. It would be great to a fast response again.

I am using vBadvanced CMPS.

The next version will support the blog. Until then (tomorrow-ish), I have looked briefly at the vbadvanced code and I assume you are talking about the news module?

If that is the case, this is the appropriate change (make a note of it in case of future vbadvanced updates).

In modules/news.php, find:
PHP Code:

$news['pagetext_html'] = $bbcode_parser->parse(
                        
$news['pagetext'],
                        
$news['forumid'],
                        
$news['allowsmilie'],
                        
true,
                        
$news['pagetext_html'],
                        
$news['hasimages'],
                        
true
                    
); 

Add before:
PHP Code:

global $post;

$post $news

Find:
PHP Code:

$news['message'] = $bbcode_parser->do_parse(
                        
$news['pagetext'],
                        
$mod_options['portal_news_enablehtml'],
                        
$news['allowsmilie'],
                        
$mod_options['portal_news_enablevbcode'],
                        
$mod_options['portal_news_enablevbimage']
                    ); 

Replace with:
PHP Code:

global $post;

$post $news;

$news['pagetext_html'] = $bbcode_parser->parse(
    
$news['pagetext'],
    
$news['forumid'],
    
$news['allowsmilie'],
    
true,
    
$news['pagetext_html'],
    
$news['hasimages'],
    
true
); 


OsideRida06 06-26-2008 01:00 AM

ok. Thanks! I will try this here in a bit, after I am done with what I am doing right now. The blog is a huge thing as well. So I look forward to that one as well.

I will post in here about the vbadvanced after I try it. Just to let every one know!

OsideRida06 06-26-2008 05:32 AM

Worked like a charm once again. Thanks for all the great help. Now, like I said, I am just waiting on the blog fix.

OsideRida06 06-27-2008 01:24 AM

Hey I read that you were guying to try and find a way to fix the blog problem. I also heard you say if some one wanted to give you full admin priv. to there forum you could do it faster. If you want I can give you full admin priv. on my test forum? That way you can figure out how to fix it. Let me know, and we can get on it!

thincom2000 06-27-2008 06:00 PM

Until I release an update (at which point you should remove this fix), you can fix the blog by creating a new bbcode_parse_start plugin.

PHP Code:

if ($forumid == 'blog_entry' OR $forumid == 'blog_user' OR $forumid == 'blog_comment')
{
$this->ces_options['skip_cpp'] = true;



OsideRida06 06-28-2008 04:48 PM

Quote:

Originally Posted by thincom2000 (Post 1560571)
Until I release an update (at which point you should remove this fix), you can fix the blog by creating a new bbcode_parse_start plugin.

PHP Code:

if ($forumid == 'blog_entry' OR $forumid == 'blog_user' OR $forumid == 'blog_comment')
{
$this->ces_options['skip_cpp'] = true;



Where do I set the hook location to?

thincom2000 06-28-2008 06:25 PM

Quote:

Originally Posted by OsideRida06 (Post 1561383)
Where do I set the hook location to?

See my above post.
Quote:

Originally Posted by thincom2000 (Post 1560571)
bbcode_parse_start


OsideRida06 07-02-2008 07:10 AM

I do not think this worked. I may have done it wrong though.

So I hit create new pugin? then set the hook location to bbcode_parse_start and paste the code in with any title?

Or

Am I some how changing the current bbcode_parse_start?

thincom2000 07-02-2008 11:41 AM

Ah, that's true. Because of the Execution order, you should modify the product's bbcode_parse_start plugin. Place the code at the top (do not replace anything).

OsideRida06 07-02-2008 05:29 PM

Quote:

Originally Posted by thincom2000 (Post 1564738)
Ah, that's true. Because of the Execution order, you should modify the product's bbcode_parse_start plugin. Place the code at the top (do not replace anything).

It still didnt work. Here is all the code after I added that. I thought it may help ya out for some reason, because I know you do not have a blog yourself.

Code:

if ($forumid == 'blog_entry' OR $forumid == 'blog_user' OR $forumid == 'blog_comment')
{
$this->ces_options['skip_cpp'] = true;
}

if (!empty($this->parse_userinfo['permissions']))
{
        switch($forumid)
        {
                case 'blog_entry':
                case 'blog_user':
                        $dohtml = ($this->parse_userinfo['permissions']['vbblog_entry_permissions'] & $this->registry->bf_ugp_vbblog_entry_permissions['blog_allowhtml']);
                        $dobbcode = ($this->parse_userinfo['permissions']['vbblog_entry_permissions'] & $this->registry->bf_ugp_vbblog_entry_permissions['blog_allowbbcode']);
                        $dobbimagecode = ($this->parse_userinfo['permissions']['vbblog_entry_permissions'] & $this->registry->bf_ugp_vbblog_entry_permissions['blog_allowimages']);
                        $dosmilies = ($allowsmilie AND ($this->parse_userinfo['permissions']['vbblog_entry_permissions'] & $this->registry->bf_ugp_vbblog_entry_permissions['blog_allowsmilies']));
                        break;
                case 'blog_comment':
                        $dohtml = ($this->parse_userinfo['permissions']['vbblog_comment_permissions'] & $this->registry->bf_ugp_vbblog_comment_permissions['blog_allowhtml']);
                        $dobbcode = ($this->parse_userinfo['permissions']['vbblog_comment_permissions'] & $this->registry->bf_ugp_vbblog_comment_permissions['blog_allowbbcode']);
                        $dobbimagecode = ($this->parse_userinfo['permissions']['vbblog_comment_permissions'] & $this->registry->bf_ugp_vbblog_comment_permissions['blog_allowimages']);
                        $dosmilies = ($allowsmilie AND ($this->parse_userinfo['permissions']['vbblog_comment_permissions'] & $this->registry->bf_ugp_vbblog_comment_permissions['blog_allowsmilies']));
                        break;
        }
}

here is one of my blogs!
http://calistyle101.com/forums/blog.php?b=10


All times are GMT. The time now is 09:17 AM.

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.01479 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete