FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Test Forum » test
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: test [message #22622 is a reply to message #19410] Tue, 08 February 2005 16:39 Go to previous messageGo to previous message
FUDchild is currently offline  FUDchild   United States
Messages: 49
Registered: February 2002
Location: Mulberry, Florida
Karma:
Member
Laertes wrote on Thu, 15 July 2004 17:07

<?php
  class my_highlight_string
  
{ function my_highlight_string ($html='#0000ff',
                  $default='#0000BB',
                  $keyword='#000080',
                  $string='#b60033',
                  $comment='#008000',
                  $tag_open_close='#ffffcc'
                  ) //constructor
       {     echo "<style>\n";
             echo ".source span.html    { color: $html; }\n";
             echo ".source span.default { color: $default; }\n";
             echo ".source span.keyword { color: $keyword; font-weight: bold;}\n";
             echo ".source span.string { color: $string; }\n";
             echo ".source span.comment { color: $comment; font-style: italic; }\n";
             echo ".source span.tag_open_close { color: $default; background-color: $tag_open_close; }\n";
             echo "</style>\n"; }
         
    function PrintCode
($code)
    {    echo '<pre class="source">';
         $source = highlight_file($code, TRUE);
             
             
// search style.
             
       $search
[0] = '<font color="'.ini_get('highlight.html').'">';
       $search[1] = '<font color="'.ini_get('highlight.default').'">';
       $search[2] = '<font color="'.ini_get('highlight.keyword').'">';
       $search[3] = '<font color="'.ini_get('highlight.string').'">';
       $search[4] = '<font color="'.ini_get('highlight.comment').'">';
       $search[5] = '</font>';
       $search[6] = '<br />';
       $search[7] = '\r';
       $search[8] = '&nbsp;';
             $search[9] = '<?';
             $search[10] = '?>';
             
             
// replace style.
             
       $replace
[0] = '<span class="html">';
       $replace[1] = '<span class="default">';
       $replace[2] = '<span class="keyword">';
       $replace[3] = '<span class="string">';
       $replace[4] = '<span class="comment">';
       $replace[5] = '</span>';
       $replace[6] = "\n";
       $replace[7] = '';
       $replace[8] = ' ';
             $replace[9] = '<span class="tag_open_close"><?</span>';
             $replace[10] = '<span class="tag_open_close">?></span>';
             
       echo str_replace
($search, $replace, $source);
             
           echo
'</pre>';
         }
  } ;
?>



how do i get code to show up on my forum area like this is with the colors... do I use this code or is there a tutorial somewhere that I could use to add this to my FUD forum.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon6.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon10.gif
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: prova
Next Topic: Imtopen Wallaskprom
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 06:30:46 GMT 2024

Total time taken to generate the page: 0.05084 seconds