Page 8 of 8

Posted: Wed Apr 25, 2007 5:41 pm
by ziggy3000
so it should be this?

Code: Select all

$code_count = preg_match_all( '#\[php\](.*?)\[\/php\]#si', $matches[1], $matches);

     $matches[1]= hc( htmlspecialchars2($matches[1]));
         return $matches[1];
    }

Posted: Wed Apr 25, 2007 5:42 pm
by John Cartwright
Try it.

Posted: Fri Apr 27, 2007 4:20 pm
by ziggy3000
it only echoing
Array 1
when i am telling it to parse other stuff

Posted: Sat May 12, 2007 11:36 am
by ziggy3000
since no one would REALLY help me in my bbcode function :roll: , i searched on Google more, and found the solution my self! :D

the code is only 25 lines long, and it does whatever the pear version does! :D

ps. i didn't need preg_replace_callback()

Posted: Sat May 12, 2007 1:24 pm
by John Cartwright
Glad you got it.

P.S, this thread is 8 pages long, there is only so much patience someone has. :wink:

Posted: Sat May 12, 2007 1:38 pm
by aaronhall
ziggy3000 wrote:i searched on Google more, and found the solution my self! :D
Wow, you would have saved yourself a lot of time had you done that in the first place.

Posted: Sat May 12, 2007 8:37 pm
by ziggy3000
i tried for a long time, and i read the comments and i found the answer in the comments!

Posted: Wed May 16, 2007 9:14 pm
by ziggy3000
now i got it to work as good as the bbcode editor in the phpbb forum

:drunk: :drunk: :drunk: :teach: :D :D

and i will try for it to highlight all sorts of languages, and make it work as good as the IPB bbcode edior

Posted: Thu May 17, 2007 10:41 am
by RobertGonzalez
If you are going to do that, why not just use GeSHi?

Posted: Thu May 17, 2007 9:25 pm
by ziggy3000
i think that geshi makes the whole page look awful. i prefer to use a highlighter like the built in php highlighter. if you know any other highlighters(NOT GESHI), please let me know

Posted: Thu May 17, 2007 9:26 pm
by John Cartwright
You realize that Geshi is extemely customizable?