|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Articles
Join Date: Apr 2001
Posts: 0
|
Article Discussion
This is an article discussion thread for discussing the SitePoint article, "Highlight Source Code in Your PHP Application"
|
|
|
|
|
|
#2 | ||
|
Test cases complete. 0 fails.
![]() Join Date: Feb 2001
Location: Melbourne Australia
Posts: 6,721
|
Quote:
Quote:
|
||
|
|
|
|
|
#3 |
|
SitePoint Community Guest
Posts: n/a
|
See http://planetxml.de/highlighter/ for another highlighting script. Its a new Driver for PEARs highlighter that uses the syntax descriptions of the KDE editor. The first two files in the list show the source code and the usage.
|
|
|
|
#4 |
|
SitePoint Community Guest
Posts: n/a
|
Regarding the posting by mmj...
Use of the <span> tag as opposed to <font> is not intended to provide semantics, it is to describe the code as device independent. Consequently, there is in fact a large difference between <span> and <font>. <font> is exclusively related visual presentation, whereas <span> is a delineation that can be rendered by any form of user agent, including a screen reader, based on the associated css. While this is not necessarily an important consideration to a script that is intended to display based on color-coding, by using <span>, one could apply an aural css with different vocal emphasis representing the different tokens, and thus make reading a php script accessible to a visually impaired programmer. Similarly, any future technologies relating to Web access will be able to apply relevant CSS information to the classes, and render the code appropriately. One other note: while you stated that <font> is valid in HTML 4.01 and XHTML 1.0, in both of these specifications, it is flagged as deprecated, meaning that its existence will not be guaranteed in future versions of either spec. Preparing for the future is an important tool of any responsible Web professional! |
|
|
|
#5 |
|
SitePoint Zealot
![]() ![]() Join Date: Sep 2003
Location: Bratislava, Slovakia
Posts: 185
|
Check out this one http://hvge.sk/scripts/fshl/
Supports multiple and mixed languages and compared to GeSHi it's really fast. I mean REALLY FAST. Online example is at http://hvge.sk/scripts/fshl/online/ |
|
|
|
|
|
#6 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Nov 2004
Location: New Jersey
Posts: 302
|
This is just what I've been looking for. Thanks.
|
|
|
|
|
|
#7 |
|
SitePoint Community Guest
Posts: n/a
|
It's worth noting that future versions of GeSHi will support multiple languages in the same source - e.g. HTML, PHP, Javascript and CSS all in one - see the demo at http://geshi.org/.
Although it's slower than other solutions, good highlighting will always be an intensive process and you'd be advised to use some form of caching for highlighted text if you are not already -- Pear::Cache_Lite is just one example of a good caching solution. |
|
|
|
#8 | |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2003
Location: Andromeda Galaxy
Posts: 4,596
|
Quote:
![]() Looks like in his haste to write this article, Mr.Stoyan Stefanov overlooked a point or two as well a standard or two. ![]() Anyway, its a good starter for someone starting out on syntax highlighting & doesn't know where to begin. Also I'd like to highlight a point that Mr.Stoyan Stefanov overlooked. The Enscript utility mentioned at the end of the article is a *NIX only, that is, it runs only on UNIX & LINUX. so unless you are not on one of those platforms, ... Also, I don't think its extendable, the plugin I mean, you are restricted with the languages that are supported by Enscript & unless you have root permissions to your server, you can't mod it. This thing is what bugged me when I wanted syntax highlighting for a bit or two of code that I post on my blog. B'coz I needed to test it locally as well. Then GeSHi crossed my path & I based my syntax-hiliting plugin for WordPress on it. If anyone is interested, its link is in my signature. ![]() |
|
|
|
|
|
|
#9 |
|
SitePoint Member
Join Date: Jul 2005
Posts: 2
|
thanks !very beautifully!
|
|
|
|
|
|
#10 |
|
SitePoint Member
Join Date: Jul 2004
Location: Rehovot
Posts: 12
|
helps - thanks
|
|
|
|
|
|
#11 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Oct 2005
Location: in front of my computer
Posts: 570
|
this is great!
|
|
|
|
|
|
#12 |
|
SitePoint Community Guest
Posts: n/a
|
thanks 4 helps,
very great!! |
|
|
|
#13 |
|
SitePoint Community Guest
Posts: n/a
|
good introduction, help me much
|
|
|
|
#14 |
|
SitePoint Community Guest
Posts: n/a
|
Great article !
What if you want to hilight a file where php and html coexist ? |
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 18:11.













Linear Mode
