Author: Max Paint » Sat Aug 18, 2007 2:46 am
solved it!
[code] ##-----[ OPEN ]------------------------------------------#includes/bbcode.php##-----[ FIND ]------------------------------------------# // PHP MOD // [php] and [/php] for posting PHP code in your posts. $text = bbencode_first_pass_pda($text, $uid, '[php]', '[/php]', '', true, ''); ##-----[ REPLACE WITH ]------------------------------------------## Removing the above lines.# ##-----[ FIND ]------------------------------------------# if ($open_tag[0] == '[code]') { $between_tags = preg_replace('#&##', '&#', $between_tags); $between_tags = preg_replace('/:[0-9a-z:]+]/si', ']', $between_tags); } ##-----[ REPLACE WITH ]------------------------------------------# if ($open_tag[0] == '[code]') { $code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#[#', '#]#', '#(#', '#)#', '#{#', '#}#'); $code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}'); $between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags); } ##-----[ FIND ]------------------------------------------# // now Replace space occurring at the beginning of a line $after_replace = preg_replace("/^ {1}/m", " ", $after_replace); // Replace ":", "(" & ")" by their HTML codes to prevent smilies replacements $code_entities_match = array('#:#', '#(#', '#)#'); $code_entities_replace = array(':', '(', ')'); $after_replace = preg_replace($code_entities_match, $code_entities_replace, $after_replace); ##-----[ REPLACE WITH ]------------------------------------------# // now Replace space occurring at the beginning of a line $after_replace = preg_replace("/^ {1}/m", " ", $after_replace); [/code]
Last edited by
Max Paint on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.