MyBB Hacks

Full Version: Cool Codes (Syntax Highlighter)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
Funny, none of those files changed it seems.  Why would it come up now?
And also, PHP is seriously bizarre.  It typically ignores additional parameters, (possibly for func_get_args), but it doesn't with ob_end_flush

PHP Code:
ob_end_flush(1); //warning
flush(1); //okay
ob_end_clean(1); //warning


Anyway, thanks for reporting - see v1.23 works for you.

No errors anymore. However, it seems that it's not parsing it correctly:
http://forums.consoleaddicted.com/Thread-C-C-Snippets

Any idea why? Another thing I've just noticed is that this error shouldn't even happen since I was not viewing the thread above in archive mode. There are not other plugins that make use of ob_end_flush() (at least I've searched all plugins and the only entries were inside the Cool Codes plugin - and I got an error whenever I visited the thread above - no longer though).
That's weird.

When I get home, I'll install a copy of 1.6.1 and see if I can figure it out.

Hmm, it seems that $parser->options has now become public:
http://dev.mybb.com/projects/mybb/reposi...http://dev.mybb.com/projects/mybb/repository/entry/branches/1.6-stable/inc/class_

That'll probably cause an issue for the workaround I made when it was private:

PHP Code:
                if($GLOBALS['mybb']->version_code >= 1500) {
                        $p = (array)$parser;
                        $opts =& $p["\0postParser\0options"];
                } else
                        $opts =& $parser->options;

Maybe change the above to:

PHP Code:
                if($GLOBALS['mybb']->version_code >= 1500 && $GLOBALS['mybb']->version_code <= 1600) {
                        $p = (array)$parser;
                        $opts =& $p["\0postParser\0options"];
                } else
                        $opts =& $parser->options;

Yeap that should fix it.

By the way, just in case you may want to look:
http://dev.mybb.com/projects/mybb/reposi...http://dev.mybb.com/projects/mybb/repository/revisions/5179/diff/branches/1.6-stable/inc/class_
http://dev.mybb.com/issues/1148
Actually it doesn't.

Code:
Warning [2] preg_match_all() expects parameter 2 to be string, array given - Line: 515 - File: inc/class_parser.php PHP 5.2.14 (Linux)

/inc/class_parser.php 	515 	preg_match_all
/inc/plugins/coolcode.php 	49 	postParser->parse_badwords
[PHP] 	  	coolcode_start
/inc/class_plugins.php 	101 	call_user_func_array
/inc/class_parser.php 	100 	pluginSystem->run_hooks
/inc/functions_post.php 	570 	postParser->parse_message
/showthread.php 	949 	build_postbit

Alright, can you try v1.24?
Thanks.
Will try it once I manage to get FTP working on my new VPS box.
Works Smile What was the problem?
(12-19-2010 01:28 AM)Pirata Nervo Wrote: [ -> ]Will try it once I manage to get FTP working on my new VPS box.
You can just use SFTP instead.  FTP just increases the attack vectors on your box...

(12-19-2010 03:21 AM)Pirata Nervo Wrote: [ -> ]Works Smile What was the problem?
Some bad code I think.  You can do a diff if you're interested.
(12-19-2010 11:22 AM)ZiNgA BuRgA Wrote: [ -> ]
(12-19-2010 01:28 AM)Pirata Nervo Wrote: [ -> ]Will try it once I manage to get FTP working on my new VPS box.
You can just use SFTP instead.  FTP just increases the attack vectors on your box...

(12-19-2010 03:21 AM)Pirata Nervo Wrote: [ -> ]Works Smile What was the problem?
Some bad code I think.  You can do a diff if you're interested.

Yeah I had to switch to SFTP, we are using proFTPD and FTP is kinda buggy there. The CEO of the company tried to install pureFTPD with DA but it had many problems during the installation and I agreed to install proFTPD again, so we're using SFTP now, no problems Tongue

How can I download an earlier version to do a diff?
Dunno, I'm lazy and don't keep earlier versions myself.
Just a small bug with calling parse badwords from memory anyway.
Pages: 1 2 3 4 5 6 7 8 9 10
Reference URL's