vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I stop parsing of BB code? (https://vborg.vbsupport.ru/showthread.php?t=103152)

merk 12-23-2005 02:20 AM

Can you paste the code around 799 in class_postbit.php?

Nm, parse_bbcode() has a typo.

PHP Code:

function parse_bbcode()
{
if(
is_member_of($this->postX))
{
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie'], true);
}
else
{
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);
}



kau 12-24-2005 01:01 AM

Nope:

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /home/httpd/vhosts/jeepforum.com/httpdocs/forum/includes/class_postbit.php on line 812

Fatal error: Cannot instantiate non-existent class: vb_bbcodeparser in /home/httpd/vhosts/jeepforum.com/httpdocs/forum/showthread.php on line 982

I am replacing the first parse_bbcode:

function parse_bbcode()
{
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);
}

.... There is also ....

function parse_bbcode()
{
$this->bbcode_parser->attachments =& $this->post['attachments'];
$this->bbcode_parser->unsetattach = true;

$this->post['message'] = $this->bbcode_parser->parse(
$this->post['pagetext'],
$this->forum['forumid'],
$this->post['allowsmilie'],
false,
$this->post['pagetext_html'],
$this->post['hasimages'],
$this->cachable
);
$this->post_cache =& $this->bbcode_parser->cached;
}

Andreas 12-24-2005 01:08 AM

Quote:

Originally Posted by Psionic Vision
Really? I didn't know. Thanks for pointing that out :) It's not really an "array", though. Rather an expanded list of parameters.

You can pass a scalar value (the usergroupid), and array (containing the usergroupids) - or each usergroupid as a single parameter.

merk 12-24-2005 02:25 AM

Did you replace it with the code i pasted with the fixed typo?

kau 12-24-2005 02:26 AM

Yes I did ...

merk 12-24-2005 03:59 AM

Interesting, you were replacing the entire function as well?

The second function belongs to a seperate class, so dont worry about that one.

Can you paste what you've done with 3 or 4 lines either side?

kau 12-24-2005 06:15 AM

Yes I copied and pasted your function over parse_bbcode() the orginal. That error comes out when viewing a thread.

Have you tested the code?

merk 12-24-2005 07:28 AM

No, but the error you are getting indicates a typo/error in pasting :\

You're running PHP5?

kau 12-24-2005 05:37 PM

PHP 4.3

I am guessing that code just doesn't work for some reason if you haven't tested it.

Are you sure if(is_member_of($this->post, X)) works in a PHP file? That variable works in plugins but in PHP files?

merk 12-24-2005 09:01 PM

Its available everywhere. Ill look into it furthur after the xmas stuff is over :)


All times are GMT. The time now is 06:20 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.01217 seconds
  • Memory Usage 1,739KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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