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)

Wayne Luke 02-29-2008 03:27 AM

When I don't have HTML enabled (the preferred setting) for profiles, I get <br /> after every line in my profile fields and pre-formatted fields show as a block of HTML with no formatting. I'll try blocking them from being processed. If you want I can show screen shots.

thincom2000 02-29-2008 04:05 AM

I find it strange that line breaks would parse as <br /> that would then get htmlspecialchars()'d before the end of the parse. I'll see if I can find what causes this. A screenshot would be helpful since I don't quite know what a pre-formatted field would be other than a field that has been wrapped with the <pre> tag.

Wayne Luke 02-29-2008 11:25 AM

Quote:

Originally Posted by thincom2000 (Post 1453406)
I find it strange that line breaks would parse as <br /> that would then get htmlspecialchars()'d before the end of the parse. I'll see if I can find what causes this. A screenshot would be helpful since I don't quite know what a pre-formatted field would be other than a field that has been wrapped with the <pre> tag.

Here you go:

Profile with CES Parser disabled:

Attachment 76504

Profile with CES Parser enabled but no HTML:

Attachment 76505

Profile with CES Parser enabled with HTML:
Attachment 76506

The World of Warcraft character list is what I mean by a preformatted profile field. It has a hook that takes a plain text list and expands it into an array and updates it.

You can see the <br /> in an attachment by Nerofix on vBulletin.com as well:
http://www.vbulletin.com/forum/attac...4&d=1204215040

Finally, I don't want to ignore parsing on particular BBCodes. I want to ignore parsing on specific Profile Fields where there are already hooks doing the parsing for me.

thincom2000 02-29-2008 04:18 PM

Okay, for the next update I have fixed:

- multiplied (in html-enabled) and visible (in html-disabled) line breaks
- added a field to define which fields get parsed in the profile page
- forum announcement permissions are redundant (default permissions are on per-announcement basis)
- signatures in PMs
- a bunch of other profile field related bugs
- all forum rules

Still working on:
- extensive vbulletin blog testing

marcossalazar 03-02-2008 08:13 PM

I am getting the </br> problems that Wayne mentioned above. Anytime I put a return to make a space (like creating paragraphs) the </br> shows up (and I just downloaded the latest version) :eek:

thincom2000 03-02-2008 08:17 PM

The <br /> fix has not officially been released yet. I am still working on fixing the blog and external issues.

marcossalazar 03-02-2008 08:25 PM

Quote:

Originally Posted by thincom2000 (Post 1453304)


I'm not sure what you mean by this. Are you saying that BB-Code won't work unless HTML is also enabled in profile fields? Regarding your reference to "decent formatting" - that's basically why I couldn't live without HTML turned on in my own forum, and one reason I created this mod. Regarding ignoring specific BB-Codes, 2.0.2 has a "no parse list" for each of profile fields and visitor messages. Or did you mean something else?

I am running beta 5 and the only way that the bb-code works in the profile fields is if I allow HTML :eek:. But when I do allow HTML permissions, the </br> disappear. Looks like a bug.

marcossalazar 03-02-2008 08:26 PM

Quote:

Originally Posted by thincom2000 (Post 1455417)
The <br /> fix has not officially been released yet. I am still working on fixing the blog and external issues.

Awesome! Thanks for the quick reply. And thanks for all the hard work. You have done an amazing job here! :)

thincom2000 03-06-2008 03:36 AM

As of tonight I fixed the problems with external feeds and printable threads (fixes still not public). If anyone can find any more bugs before I finish the blog fix, let me know. Also let me know about query counts. The mod has a query fallback if the usergroup info is still unavailable after every other check. Let me know if you have noticed query inflation anywhere.

thincom2000 03-06-2008 06:44 AM

Okay, after a few hours, I decided to post the fixes so far even though I have yet to cover the conflict with the blog. Remember that it's possible to bypass the permissions at a hook after the parser is created by setting:

PHP Code:

$parser->ces_options['skip_cpp'] = true

This update contains fixes for a lot of bugs that have been overlooked in the past, mainly because people just didn't notice. This update fixes forum rules in non-editor pages, as well as a number of bugs where profile fields weren't parsing or were parsing too many times, and fixes the parsing in external feeds, printable versions of threads, and non-forum previews.

Wayne Luke 03-06-2008 05:30 PM

When installing 2.0.10 into a 3.6.8 PL2 live forum I get the following error:


XML Error: XML_ERR_NAME_REQUIRED at Line 300

thincom2000 03-06-2008 07:46 PM

Fixed the XML. Sorry about that. I prefer to write the XML by hand rather than exporting and I forgot to put the exclamation point in one of the <![CDATA[

nerofix 03-11-2008 06:05 PM

Hello thincom, sorry for my long abstence, had to work outside my home for some days.

I see that after the update of 3.7 beta 6, there are problems with visitor messages and so on, I guess you got to update your mod too for the beta 6. IMG doesnt work together with beta 6 in example.

thincom2000 03-12-2008 12:42 AM

Yes I suspect there are problems now because the vBulletin staff have decided to turn off the restrictions in VMs as of B6 and implement a Disallow which BB-Codes in VMs?-type option in the AdminCP. (Sound familiar? :cool:)

I have been busy this week and have not had a chance to upgrade to Beta 6 yet, but almost as soon as I do I should be releasing another update.

nerofix 03-12-2008 11:27 AM

Yes I think that your work with this mod was a good aspect to move the vbdevs to allow bb code in VMs, but your mod is still needed for the "about me" corner.

marcossalazar 03-15-2008 04:12 PM

Quote:

Originally Posted by nerofix (Post 1462924)
Yes I think that your work with this mod was a good aspect to move the vbdevs to allow bb code in VMs, but your mod is still needed for the "about me" corner.

Indeed. I think the about me use of bb code is one of the most important and it is extremely sad that the vb team has not implemented it (it should have been ages ago)

Andrew 03-19-2008 06:01 PM

I'm get the following error message when enabling this plugin, and I have no idea why. All of the files have been uploaded properly, so I know that everything it should need is there. Any ideas?

Quote:

Fatal error: Call to undefined function: ces_permissions_toolbars2() in /home/chelseah/public_html/forum/showthread.php(1963) : eval()'d code on line 3
(BTW - This is on a forum running vBulletin 3.6.8 Patch Level 2.)

mwilke 03-20-2008 02:53 AM

Forums Running:vBulletin® v3.6.8 Patch Level 2
using your version 2.1.0

I have no errors when I install the product and the product parses the profile fields correctly. However, my posts disappear..I get a white screen.

thincom2000 03-20-2008 04:23 PM

Quote:

Originally Posted by Andrew (Post 1468904)
I'm get the following error message when enabling this plugin, and I have no idea why. All of the files have been uploaded properly, so I know that everything it should need is there. Any ideas?

(BTW - This is on a forum running vBulletin 3.6.8 Patch Level 2.)

Quote:

Originally Posted by mwilke (Post 1469308)
Forums Running:vBulletin? v3.6.8 Patch Level 2
using your version 2.1.0

I have no errors when I install the product and the product parses the profile fields correctly. However, my posts disappear..I get a white screen.

The only reason I can see this happening is if the code at line 1928 isn't executing fully. To fix this issue until my next update, edit the showthread_complete plugin included in this product, and add the following line to the beginning:

PHP Code:

require_once(DIR '/includes/ces_permissions.php'); 


Andrew 03-20-2008 05:36 PM

Quote:

Originally Posted by thincom2000 (Post 1469812)
The only reason I can see this happening is if the code at line 1928 isn't executing fully. To fix this issue until my next update, edit the showthread_complete plugin included in this product, and add the following line to the beginning:

PHP Code:

require_once(DIR '/includes/ces_permissions.php'); 


That didn't fix the problem - Any other ideas?

thincom2000 03-20-2008 06:47 PM

If that didn't fix the problem, that would imply that the function really doesn't exist...

Oops! Typo.

Edit the showthread_complete plugin. The call should be to
PHP Code:

ces_permissions_toolbar2 

Note that "toolbar" should be singular.

mwilke 03-22-2008 05:37 AM

The typo correction works. Thanks!

However now I am getting trouble when I am pasting my code into the profile field. All it is is a simple table created at http://www.1stsfss.com/pages/inputAward.html When you choose your awards and it creates the working table. However when I paste it into the profile field there are a lot of page breaks and pushes the start of the table waaaay down. And then the table is stretched vertically. I have other fresh eyes looking at the table code to see if i missed something. I didn't know if there was a style that i was unaware of or if the CES Parser had anything to do with it..

Appreciate the help..

thincom2000 03-22-2008 06:11 AM

I have tried that table creator you posted, and not only does it generate non-standards-complaint XHTML, but you'll notice between lines 22 - 31 (I put a comment there so you can see it) that a problem exists. I modified the code only by adding tabs (and the comment) to investigate the tag nesting (the issue you describe is usually caused by improper nesting).

HTML Code:

<table width="466" cellpadding="0" cellspacing="0" border="0">
<tr>
        <td colspan="3">
                <img src="images/case/top.jpg" width="466" height="35" />
        </td>
</tr>
<tr>
        <td width="38">
                <img src="images/case/left.jpg" width="38" height="317" />
        </td>
        <td width="390" height="317" background="images/case/center.jpg" align="center">
                <table width="390" height="317" border="0">
                <tr>
                        <td width="45" ></td>
                        <td  align="center"></td>
                        <td width="50" ></td>
                </tr>
                <tr>
                        <td align="center"></td>
                        <td  align="center">
                                <table>
                                <!-- nesting problems start here -->
                                <tr>
                                        <td height="14" width="53">
                                                <td height="14" width="53">
                                                        <td background="images/ribbons/commander1st.gif" align="center" height="14" width="53">
                                                        </td>
                                                        <td background="images/ribbons/commander2nd.gif" align="center" height="14" width="53">
                                                        </td>
                                </tr>
                                <!-- / nesting problems end here -->
                                <tr>
                                        <td background="images/ribbons/soldiers.gif"align="center"  height="14" width="53">
                                        </td>
                                        <td background="images/ribbons/silverStar.gif" height="14" align="center" width="53">
                                        </td>
                                        <td background="images/ribbons/goodConduct.gif" height="14" align="center" width="53">
                                        </td>
                                        <td background="images/ribbons/tra.gif" height="14" width="53" >
                                        </td>
                                </tr>
                                <tr>
                                </tr>
                                </table>
                        </td>
                        <td> </td>
                </tr>
                <tr>
                        <td width="45" ></td>
                        <td align="center">
                                <img src="images/badges/sharpshooter.jpg">
                        </td>
                        <td width="50" ></td>
                </tr>
                </table>
        </td>
        <td width="38">
                <img src="images/case/right.jpg" width="38" height="317" />
        </td>
</tr>
<tr>
        <td colspan="3">
                <img src="images/case/bottom.jpg" width="466" height="38" />
        </td>
</tr>
</table>

As you can see, this is an issue with the tool you mentioned and not with this mod.

mwilke 03-22-2008 02:21 PM

Thank you very much, I corrected that it still didn't work. So what i ended up doing is deleting all spaces and formatting tabs that was apart of the code when I pasted it into the edit profile field textbox. Apparently it takes all of that literal and doesn't ignore the whitespace so it was stretching out the box and moving it down because spaces and tabs were in the tables..

thincom2000 03-22-2008 03:01 PM

Yes, the same thing would happen if you used the table in a post. This is how vBulletin's BB-Code parser works by default, by converting newlines into HTML line breaks.

thincom2000 03-22-2008 06:26 PM

Update: Compatibility with vBulletin 3.7 Beta 6 and RC1 has been fixed. The Social Messages stock vBulletin feature in which an error message is displayed when using a disabled BB-Code is also working again. Fixed some fatal errors due to typos, and gave Social Messages their own bitfields (inclusive for VMs, GMs, PCs, and usernotes - which I always considered to be vB's old profile comment system).

marcossalazar 03-22-2008 06:39 PM

Quote:

Originally Posted by thincom2000 (Post 1455417)
The <br /> fix has not officially been released yet. I am still working on fixing the blog and external issues.

Has this issue been fixed in the update? This problems makes the mod unusable for profile fields if a user wants users return to create a space between lines of text.

Thanks.

thincom2000 03-22-2008 07:07 PM

That issue was fixed about a month ago (3/6). I'm sorry you missed it.

marcossalazar 03-22-2008 07:15 PM

Quote:

Originally Posted by thincom2000 (Post 1471866)
That issue was fixed about a month ago (3/6). I'm sorry you missed it.

Ooops! Sorry about that. Awesome. This is such a great mod. Thank you so much for creating it as well as updating it so frequently!

Gio~Logist 04-25-2008 02:19 PM

Hm, after this mod... bbcode in events do not work

Gio~Logist 04-25-2008 03:18 PM

Fixed it, just make sure the bbcode start plugin isn't called on the calendar page via a conditional.

thincom2000 04-27-2008 02:48 AM

If bb-code in events doesn't work then that is a bug, and I should fix it in the next build. Disabling the mod in the calendar really shouldn't be an acceptable alternative, so I will make sure to fix this.

marcossalazar 04-30-2008 10:36 PM

After installing, if you have Allow HTML set to Yes within Signature Permissions of the Usergroup in the ACP, you are not able to put HTML into your signature. Is this a bug? I played around with the mod within the plugin system and was able to make it work if only

BBCode - Parse by Permissions
Member - Globalize the Parser
Profile Fields - Parse by Permissions

but then this means all the other parts of the mod don't work. Will this be fixed?

Thanks,

Marcos

marcossalazar 04-30-2008 10:43 PM

Quote:

Originally Posted by marcossalazar (Post 1503938)
After installing, if you have Allow HTML set to Yes within Signature Permissions of the Usergroup in the ACP, you are not able to put HTML into your signature. Is this a bug? I played around with the mod within the plugin system and was able to make it work if only

BBCode - Parse by Permissions
Member - Globalize the Parser
Profile Fields - Parse by Permissions

but then this means all the other parts of the mod don't work. Will this be fixed?

Thanks,

Marcos

Scratch that, this doesn't work with those checked off. HTML doesn't work in signature if this is installed.

thincom2000 05-01-2008 04:17 AM

I believe that the way the mod is designed, if HTML is not allowed in a user's profile, then HTML cannot be in their signature. HTML is working fine under my test install, I would recommend checking this mod's Usergroup Permissions for profiles.

marcossalazar 05-01-2008 11:14 AM

Quote:

Originally Posted by thincom2000 (Post 1504143)
I believe that the way the mod is designed, if HTML is not allowed in a user's profile, then HTML cannot be in their signature. HTML is working fine under my test install, I would recommend checking this mod's Usergroup Permissions for profiles.

Thanks for the reply! But they are two separate permissions. I think that the mod should allow for members to not be able to use HTML in the profile fields, but allow HTML in the signature.

marcossalazar 05-01-2008 02:56 PM

Quote:

Originally Posted by marcossalazar (Post 1504405)
Thanks for the reply! But they are two separate permissions. I think that the mod should allow for members to not be able to use HTML in the profile fields, but allow HTML in the signature.

I did some more playing around and I do not want to have members allowed to put HTML in any other parts of the forum, i.e., a yes to Allow HTML in Non Forum Specific Areas within the BB Code Settings in the VB Options of the ACP. I just want to have them be allowed to put HTML in the signature while still getting all the benefits of this great mod (I actually only want them to be able to put BB Code in the profile fields of the About Me section). But right now if you sent Allow HTML in Non Forum Specific Areas to no and Allow HTML in signature to Yes, this mod does not work.

Or am I missing something? Thanks.

thincom2000 05-01-2008 05:28 PM

Your issue sounds like it is related to how vBulletin functions by default, coupled with a misunderstanding of the way this mod is designed.

1. HTML, BB-Code, etc. always has to be enabled globally, or the parser just won't bother with it.
2. This mod checks what is globally enabled, and makes sure the individual user is not prohibited from using it (this would be a NO in the mod's settings).
3. If the individual user doesn't have permission, this mod will then disable it.

You should not worry about enabling HTML, or anything else for that matter, everywhere, as long as this is installed. Think of the standard vBulletin Options regarding this as simple ON/OFF switches, and this mod for tweaking if ON.

That said, if you want a separate permission set for signatures, you would either have to wait for another update of this mod, or modify it yourself until such a supported update.

marcossalazar 05-01-2008 08:08 PM

Quote:

Originally Posted by thincom2000 (Post 1504812)
Your issue sounds like it is related to how vBulletin functions by default, coupled with a misunderstanding of the way this mod is designed.

1. HTML, BB-Code, etc. always has to be enabled globally, or the parser just won't bother with it.
2. This mod checks what is globally enabled, and makes sure the individual user is not prohibited from using it (this would be a NO in the mod's settings).
3. If the individual user doesn't have permission, this mod will then disable it.

You should not worry about enabling HTML, or anything else for that matter, everywhere, as long as this is installed. Think of the standard vBulletin Options regarding this as simple ON/OFF switches, and this mod for tweaking if ON.

That said, if you want a separate permission set for signatures, you would either have to wait for another update of this mod, or modify it yourself until such a supported update.

Thanks for the email. So I turned on HTML on the BBcode section of VB options as well as in the signature permissions and the mod is enabled and everyone has the right permissions (well, me since it is on a test forum) and still when I insert HTML into the signature is not working.

Sorry to ask this again, but is there something with the signature section when everything is set up properly?

Thanks,

Marcos

Detomah 05-01-2008 09:57 PM

Is this hack anywhere near having the "extensive vbulletin blog testing" part being added so that blogs will parse bbcode properly? Or am I missing something?

BBcode appears to parse fine for the blog bits in the tab on the memberinfo page, but nothing at all in the actual blog section itself.


All times are GMT. The time now is 12:05 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.01702 seconds
  • Memory Usage 1,880KB
  • 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_html_printable
  • (4)bbcode_php_printable
  • (14)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