Toon posts:

[php] highlight

Pagina: 1
Acties:
  • 32 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik werk met het systeem phpnuke.

Ik zit al 2 dagen te prutsen om het om te gooien zodat de colorcoding goed word weergegeven

Hier de Orginele functie van PhpNuke

Kan iemand mij helpen

Mijn dank is Groot
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
<?
function bbencode($message) {

        // [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts.
        $matchCount = preg_match_all("#\\[code\](.*?)\\[/code\]#si", $message, $matches);
        for ($i = 0; $i < $matchCount; $i++)
        {
                $currMatchTextBefore = preg_quote($matches[1][$i]);
                $currMatchTextAfter = htmlspecialchars($matches[1][$i]);
                $message = preg_replace("#\\[code\]$currMatchTextBefore\\[/code\]#si", "<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class=content>Code:</font><HR></TD></TR><TR><TD><font class=content><PRE>$currMatchTextAfter</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->", $message);
        }
?>

  • chem
  • Registratie: Oktober 2000
  • Laatst online: 27-08 13:53

chem

Reist de wereld rond

1) wel een vraag stellen svp
2) betere topictitle
3) vraag het aan de makers van phpnuke
4) scriptrequest
affijn: dicht.

Klaar voor een nieuwe uitdaging.


Dit topic is gesloten.