1 (edited by thuankkk 2009-01-21 07:31)

Topic: [php]BBcode[/php]

Hi,

I think you should add BBcode [php] [/php] to punbb, as it can highlight source code, eg php, javascript, etc.

just use the php function highlight_string to do that big_smile

Re: [php]BBcode[/php]

    $pattern[] = '#\[php\](.*?)\[/php\]#ms';
    $replace[] = '<div class="codebox"><pre>[php]$1[/php]</pre></div>';
    
    $pattern[] = '#\[php\](.*?)\[/php\]#e';
    $replace[] = 'highlight_string(html_entity_decode(\'<?php'."\n\n".'$1'."\n\n".'?>\', ENT_COMPAT, \'UTF-8\'), true)';

on line 706 of 'include/parser.php'.

Re: [php]BBcode[/php]

Where would add this?

Re: [php]BBcode[/php]

on line 706 of 'include/parser.php'. ???

Sorry. Unactive due to personal life.