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

thincom2000 07-02-2008 08:07 PM

By "the product's plugin", I meant the one this thread is for.

OsideRida06 07-02-2008 09:18 PM

Quote:

Originally Posted by thincom2000 (Post 1565177)
By "the product's plugin", I meant the one this thread is for.

Oh yeah I knew that!. LMFAO! Thanks bro. It is now working perfectly. Thanks for the custom code!

7lanet 07-05-2008 03:46 PM

But it is known to cause html security vulnerability to penetrate??

What is the solution

thincom2000 07-06-2008 06:20 PM

In truth, the danger is always there, but with this mod you can allow HTML to your trusted Usergroups only.

Leo Brazil 07-07-2008 07:03 PM

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.

Gee....I should have read this after busting my brains out trying to find out what was happening to my forum.

In my case, everything was running fine but when I upgraded from 3.6.8 to 3.7.2 and upgraded vBadvanced from 3.0.0 to 3.0.1 all BB Codes and Smilies was showing un-parsed on the News Module.
Even checking the original thread this News Module are linked to, BB Codes and Smilies were un-parsed to visitors. Even if I disable CES Parser Permissions I could see BB Codes parsed correctly, I had to edit and save (withou changing anything) for BB Codes to be parsed correctly.

I'm still trying to figure out a way to fix this because this hack is great and my site can't live without it.

thincom2000 07-07-2008 11:50 PM

In all honesty, the permissions used should be the poster's permissions and not the current user's permissions. These can be easily confused, but it's an important point to remember.

Leo Brazil 07-08-2008 01:15 PM

Quote:

Originally Posted by thincom2000 (Post 1569632)
In all honesty, the permissions used should be the poster's permissions and not the current user's permissions. These can be easily confused, but it's an important point to remember.

I have to confess this is confusing for me. I got your idea but still a little confused. Do you mind in streching this thing up a little more just to make everything clear ?

Tks

marcossalazar 07-08-2008 01:31 PM

Hello,

I have created an RSS feed from my blog to be posted in a forum and the HTML (such as hyperlinks) are not being parsed when the thread is being created. However, when I go in and edit the post and simply resave it, it parses. I disabled the mod and it is working fine that is, the

More... in the rss manager is parsing with the mod turned off, but not when turned on. Looks like a bug.


Thanks,

Marcos

thincom2000 07-08-2008 08:00 PM

I cannot reproduce this behavior on my forum, seems to work fine. What are the mod's permissions for the user you selected to post the RSS feed to the forum?

marcossalazar 07-08-2008 08:35 PM

Yes on all CES Profile / Social Message Permissions except Allow HTML in Profile Fields and No on all project tool permissions.

marcossalazar 07-20-2008 08:37 PM

Hey thincom2000,

I just installed the VB Blog on my forum and the BB Code was not parsing even though I had all the setting for it to. I then disabled your Mod and the BB Code in the Blog works. So there is something within the mod that is preventing BB Code in the VB Blog from parsing when it is enabled. :eek:

Marcos

thincom2000 07-21-2008 04:20 AM

For blog issues, please see the previous page in this thread.

marcossalazar 07-21-2008 01:57 PM

Quote:

Originally Posted by thincom2000 (Post 1580336)
For blog issues, please see the previous page in this thread.

Worked perfectly! You are great!

Spank 07-31-2008 12:52 AM

Hi I want to be able to parse html for a custom field in my staff.php page, any ideas how I go about this?

thincom2000 07-31-2008 04:57 AM

Quote:

Originally Posted by Spank (Post 1587911)
Hi I want to be able to parse html for a custom field in my staff.php page, any ideas how I go about this?

I would need some (or a lot) more details about how you are doing this.

Spank 07-31-2008 09:01 AM

I'm using meet the staff hack, which is a better staff page, I've got it set to call field5 to display on the page.

Code:

<if condition="$user['field5']">
<span class="shade">$vbphrase[field5_title]</span> $user[field5]
</if>

So I want html used in field 5 to be parsed.

thincom2000 07-31-2008 04:45 PM

Yes it becomes a problem when you start using the "field" versions. vBulletin has a nice method of cleaning these values and preparing them that also calls the hook member_customfields.

If you know what you're doing I would recommend modifying your mod to clean these values in this way before outputting them to the page.

Spank 07-31-2008 04:50 PM

oic, unfortunately I'm still a noob when it comes to coding. Thanks for the advice anyway. =)

Warlord 08-12-2008 03:40 PM

I'm running vBulletin? Version 3.6.8 and this hack doesn't seem to work for me.

My bbcode and html does not parse.

I've entered the profile field id's I want to parse in vBulletin Options-->CES Profile Fields, and updated usergroup settings. I can't figure out why it's not working. :(

Warlord 08-12-2008 04:25 PM

Just disabled it, seems it was stopping html in posts to stop working too.

I just want a few profile fields to allow bbcode. I thought this might work for me. :(

Any suggestions?

Warlord 08-15-2008 02:00 AM

Ok, I saw the fix in post #58 here which describes my problem, but I don't have anything called Advanced BB-Code Permissions hack installed and the closest thing I have to bbcode_parse_complete is bbcode_parse_start.

Any suggestions would be greatly appreciated, as I'd really like to get bbcode working in a couple of my profile fields.

Warlord 08-15-2008 02:25 AM

Well I went ahead and created a plug-in and just named it bbcode_parse_complete and dropped the fix code in there to see if that would work. No dice. :(

Warlord 08-15-2008 09:32 PM

I know thincom2000 already posted the problem it has with the vs-Interactive Profiles Hack in the first post but I just thought I would also mention that it seems to have a problem with vBAdvanced as well.

No html or bbcode work in the news threads it pulls from the forums for some reason.

Warlord 08-16-2008 08:09 PM

Quote:

Originally Posted by Warlord (Post 1599587)
I know thincom2000 already posted the problem it has with the vs-Interactive Profiles Hack in the first post but I just thought I would also mention that it seems to have a problem with vBAdvanced as well.

No html or bbcode work in the news threads it pulls from the forums for some reason.

I'm an idiot. thincom2000 already posted the fix for this here.

Great hack thincom!

thincom2000 08-17-2008 03:16 PM

Quote:

Originally Posted by Warlord (Post 1599587)
... it seems to have a problem with vBAdvanced as well.

No html or bbcode work in the news threads it pulls from the forums for some reason.

I have attached a patch to the first post. Let me know if this works for you.

Warlord 08-17-2008 04:04 PM

Well my site is down at the moment, but I applied the fix in post 241 and it seemed to work just before my site went down. Cool that you have it as a product now though.

I did notice though that I had to enable html in profiles for any usergroup that I wanted to allow html in posts for though.

Again though since my site is down I won't be able to test your updated fix to see if it corrects this little quirk.

Bottom line though, your hack does what I wanted it to do. Thanks again. :)

thincom2000 08-17-2008 07:43 PM

The patch in post 250 is for vBulletin Blog. It wouldn't make any sense if it worked for vBa.

Warlord 08-18-2008 11:57 AM

Sorry I meant post 241 here. (Edited previous post to reflect the correct post)

thincom2000 08-18-2008 03:15 PM

Okay. I'm glad you found that, because I couldn't XD

nerofix 08-24-2008 09:55 PM

Hello thincom2000 my friend :)
I still love your mod and now I got a question again =)

I am trying to put a custom profile field (multiple line textbox) directly into the memberinfo template (not into the about_me-block) and the BB-Code is not parsed then I saw.

Do you see a possibility to update your mod so BB-Code may be parsed outside blocks too?

Here's an example of the code I put into the memberinfo template:

Code:

<if condition="$userinfo[field13] != ''">
<div>
                                        $userinfo[field13]
</div>
</if>

Would be very nice if you could do something to make parsing possible :)

And there's another thing I think you might be experienced enough to fix: The custom profile field also don't line-break in memberinfo template. You have a solution?


All times are GMT. The time now is 02:37 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.01569 seconds
  • Memory Usage 1,857KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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