coloring of source code

Reply

Join Date: May 2005
Posts: 28
Reputation: ashishjha54 is an unknown quantity at this point 
Solved Threads: 0
ashishjha54 ashishjha54 is offline Offline
Light Poster

coloring of source code

 
0
  #1
May 18th, 2005
hello,
today i visited the source code section of daniweb and i was amazed to see that codes inside text box were colored according to their syntax.here is the url of the page.
http://www.daniweb.com/code/snippet25.html
in which language this is coded .can i do this in php .can anybody provide me some help.perhaps cscgal can help me out.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,053
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 130
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: coloring of source code

 
0
  #2
May 22nd, 2005
The color coding was accomplished by a perl syntax highlighter known as the beautifier (www.beautifier.org), later ported to php. Alternatively, there are two built-in php functions known as highlight_string() and highlight_file() which output syntax highlighted PHP. For example, [php]

<?php
highlight_string('<?php phpinfo(); ?>');
?> [/php]

For more information,
http://us4.php.net/manual/en/functio...ght-string.php
http://us4.php.net/manual/en/functio...light-file.php
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 28
Reputation: ashishjha54 is an unknown quantity at this point 
Solved Threads: 0
ashishjha54 ashishjha54 is offline Offline
Light Poster

Re: coloring of source code

 
0
  #3
May 22nd, 2005
i thought i will not get reply, thats why i started coding my own function.my function replaced all the keywords with custom colors and it also changed the colors of the comments, but it had some bugs.but now i know the site i will be able to complete my function easily.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: coloring of source code

 
0
  #4
May 23rd, 2005
also make sure to check out GeSHi

http://qbnz.com/highlighter/

this will highlight virtually any language you can think of and has sooo many options
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 11
Reputation: cputek2k is an unknown quantity at this point 
Solved Threads: 0
cputek2k's Avatar
cputek2k cputek2k is offline Offline
Newbie Poster

Re: coloring of source code

 
0
  #5
May 24th, 2005
I use PHP Coder Pro.... Nice utility with some built in functionality... Best of all... it is FREE!

www.phpide.com/go/downloads.htm
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 28
Reputation: ashishjha54 is an unknown quantity at this point 
Solved Threads: 0
ashishjha54 ashishjha54 is offline Offline
Light Poster

Re: coloring of source code

 
0
  #6
May 24th, 2005
Originally Posted by cputek2k
I use PHP Coder Pro.... Nice utility with some built in functionality... Best of all... it is FREE!

www.phpide.com/go/downloads.htm
hello cputek2k,
we are talking about highlighting source codes in web-pages not in IDE.if you know about it ,please tell me. the link u posted was down,but i guessed from the url that it could be IDE download site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC