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 02-19-2008 04:37 PM

Okay I have fixed this on the dev version. The problem was that $forumid wasn't getting passed through the function. To fix it temporarily on your site, you can add $forumid to the argument list for the function call in the bbcode_parse_start plugin. The code should be:

PHP Code:

$text ces_permissions_parse($this$text$forumid$dosmilies$dobbcode$dobbimagecode$dohtml); 

In includes/ces_permissions.php, find:

PHP Code:

function ces_permissions_parse(&$parser$text$dosmilies$dobbcode$dobbimagecode$dohtml

Replace with:
PHP Code:

function ces_permissions_parse(&$parser$text$forumid, &$dosmilies, &$dobbcode, &$dobbimagecode, &$dohtml

The fact that none of the "do" vars were not passed by reference before means that no vB functionality was broken, but that basically this mod did nothing. Apply this fix and it should be working. I will upload a new patch as soon as I fix the Quick Edit bug.

nerofix 02-19-2008 06:58 PM

Hello thincom,

I just installed the 2.0.1 and it's still not parsing [IMG] code in profile fields or visitor messages. I'm tinking about if something else is blocking this, but it's the first time I use your mod, so I'm not sure if it's meant to work there.

Quote:

Please confirm that Posts and postbits are parsing correctly.
Where should I look, or better, what exactly should I do to test.
I also have project tools installed and of course your special xml therefor. (Just for info, don't know if it's important for you to know that).


Edit: I also got a 3.6.5 board, after installing CES_parser I get a database error when I go to the profiles:

Invalid SQL:

SELECT COUNT(*) AS count
FROM infraction AS infraction
LEFT JOIN post AS post ON (infraction.postid = post.postid)
LEFT JOIN thread AS thread ON (post.threadid = thread.threadid)
WHERE infraction.userid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5


Perhaps this could help you too.

thincom2000 02-19-2008 08:22 PM

Okay, as [IMG] code seems to be the only malfunctioning code on your board, it would appear that vBulletin is hardcoded in some way to circumvent its use on the profile. I will see if there is a possible workaround for this.

I will also look at the 3.6.5 member.php to see why that may occur, although I know these permissions don't touch infractions at all. At first glance, it looks like $userinfo might be cleared for some reason.

nerofix 02-19-2008 10:04 PM

Okay sorry, but I got 2 more things in 3.7

The inline-edit in about me doesnt show up anymore (which is less important)

.. but I have a major problem: when posting a visitor message on foreign profiles, the message is showing up in my profile only .. can you reproduce this?

Sorry to report you so many things, but I'd really like to help you and get your mod working because I've waited for a mod like yours. =)

thincom2000 02-20-2008 01:56 AM

Quote:

Originally Posted by nerofix (Post 1446925)
The inline-edit in about me doesnt show up anymore (which is less important)

Sorry but I am not experiencing this issue.

Quote:

Originally Posted by nerofix (Post 1446925)
I have a major problem: when posting a visitor message on foreign profiles, the message is showing up in my profile only .. can you reproduce this?

I can think of a possible cause for this without looking at the code, but I probably won't be able to look into this until tomorrow.

Quote:

Originally Posted by nerofix (Post 1446925)
Sorry to report you so many things, but I'd really like to help you and get your mod working because I've waited for a mod like yours. =)

Thanks for that. I actually prefer more bug reports because I like being able to list a lot of things in the changelog between versions :p

thincom2000 02-20-2008 02:19 AM

Quote:

Originally Posted by nerofix (Post 1446925)
I have a major problem: when posting a visitor message on foreign profiles, the message is showing up in my profile only .. can you reproduce this?

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

That may even solve the 3.6.5 DB error. But then again I just thought of this a few minutes ago.

Thug 02-20-2008 02:55 AM

i get a blank white profile page after install for vbulletin 3.7 beta 4

thincom2000 02-20-2008 02:15 PM

Did you try the solution in my last post?

cheesegrits 02-20-2008 04:59 PM

Quote:

Originally Posted by thincom2000 (Post 1446359)
Well I promised a new version a few months back, and rather than wait for 3.7 to go GOLD, I thought I would give everyone a Presidents' Day present.

This mod has been completely rewritten for the pending release of vBulletin 3.7.0. Permissions are now faster and more reliable. It is much easier for other coders to add support for their own mods or new vBulletin products.

Ah, I was wondering about that. I was working on a hack last week to provide an HTML-enabled "About Me / Home Page" tab on the profile (replacing the default About Me), and it took a while to work how how the heck the $bbfoo variables I was setting were getting blown away! I presume handling of that stuff in bbcode_parse_start is what you mean by that last sentence. I'll load the new version this week and have another go at it.

Quote:

cheesegrits directed me to HTMLPurifier in order to integrate it into this mod. This has been flagged for the next version.
The hack I mentioned above is basically a test for the HTMLpurifier. They've now added semi-sensible support for CSS as well, with the ability to restrict the scope of any CSS directives to a specific block ID. So far it's looking good. 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.

My only real concern about using HTMLpurifier is convincing people who install it to keep it updated. All we can really do is put a big note in the mod description reminding people how important it is to mark the product "installed" so they can be informed of any security updates.

-- hugh

Thug 02-20-2008 06:12 PM

Quote:

Originally Posted by thincom2000 (Post 1447040)
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

That may even solve the 3.6.5 DB error. But then again I just thought of this a few minutes ago.

Yes thincom2000 i treid this. blank profile page still.


All times are GMT. The time now is 06:17 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.01250 seconds
  • Memory Usage 1,766KB
  • 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
  • (7)bbcode_php_printable
  • (8)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