Topic: ...
...
You are not logged in. Please login or register.
...
mmmmm work to do, nice these colors but a hell of a job if you ask me
$code = highlight_string($code, true);
that`s it
if you want perfect line number <-> code alignment then use this one:
<?php
function phpHighlight($code){$code = "<?php\n".$code."\n?>";
$code = stripslashes($code);
$code = highlight_string($code, true);
$code = explode('<br />', $code);
$text = "<div style='margin:0px 5% 0px 5%;'>PHP:<hr /><table
style='padding:0px; border-spacing: 0px 0px;'>";
for($x=0;$x<sizeof($code);$x++)
$text .= "<tr><td style='font-family:Verdana; font-size:10px;
vertical-align:middle; background-color:#FFFFE1;'>".
($x+1)."</td><td><div style='margin:0px 5px 0px 5px;'>".
$code[$x]."</div></td></tr>";$text .= "</table><hr /></div>";
return $text;
}
?>
(C)Malcolm
Do you want all posted text to be parsed like that or only the one in the \[code\] block?
If the code block:
Open:
include/parser.php
Find (line 276):
$message = pun_htmlspecialchars($message);
Replace with:
$message = highlight_string(pun_htmlspecialchars($message), true);
You shouldn't run both highlight_string and htmlspecialchars. Try this:
$message = highlight_string($message, true);
Oops :P
Powered by PunBB, supported by Informer Technologies, Inc.