PHP Highlighter

Hi everyone,
Like you could have read in previous post, the current version of my code highlighter has some trouble with celecting PHP on servers running PHP version 4. I’ve added I should try to fix the problem and include a better PHP highlighter in the next version when it gets finished.
I worked very hard last night to get this PHP code to work properly, and I’m proud to announce that PHP is almost working the way it should. That means: including servers running PHP4.
You want an example? Sure, here it is:

PHP Code Like It Should

{code type=php}
mysql_connect ($host, $user, $password);
$result = mysql_db_query (‘Database’, ‘select * from table’);
while ($row = mysql_fetch_assoc ($result))
{
echo $row[‘user_id’];
echo $row[‘fullname’];
}
mysql_free_result ($result);
?>
{/code}

So, What’s Next?

After this highlighter is finished, I create one for JavaScript and properly one for Java. As soon as they all work the way it should, I will release version 1.1.

See you.

FV Code Highlighter Plugin (About)

The major topic of this site is web development and discuss of some interesting articles and tutorials ranging from PHP and jQuery ; HTML and CSS ; Software & applications tutorials and so. The problem I was facing when I built this theme was the lack of amazing code highlight plugin. I just couldn’t find one that was working for me.
I thought maybe more people were looking for a plugin that simply publish codes that looks great. I started to write my own, and the FV Code Highlight plugin was born and now open for the public. The features are plain and simple, read on.
Description
This plugin supports the highlighting of PHP, HTML, CSS and XML. The default tag-highlighter color scheme uses the same colors Adobe’s Dreamweaver is using. This makes it easy for your visitors to recognize what type of codes you wrote. These colors can be changed to your liking in the WPadmin section of your blog.
Features
Easy to use
Renders XHTML, CSS, XML, Javascript and PHP
Default look: Dreamweaver style
Customizable look of the code boxes
How to use this plugin?
1. Upload the folder fv-code-highlighter to the /wp-content/plugins/ directory.
2. Activate the plugin through the ‘Plugins’ menu in WordPress.
code
3. Place in your pages to use the highlighter.
Example
CSS Code
[code type=css]
/* Comment */
@import url(“main.css”);
h3, .head2 {
font-family: “Sans-Serif”;
font-weight: bold;
color: #336699 !important;
}
@media screen, print {
pre { margin: 0px 10px 10px; }
h1 { font-size: 14px; padding-top: 10px; }
}
[/code]
JavaScript Code
[code type=javascript]
/* JavaScript */
function displayWords(arrayWords) {
for (i=0; i < arrayWords.length; i++) {
// inline comment
alert(“Word ” + i + ” is ” + arrayWords[i]);
}
}
var tokens = new Array(“Hello”, “world”);
displayWords(tokens);
[/code]
PHP Code
[code type=php]
mysql_connect ($host, $user, $password);
$result = mysql_db_query (“database”,”select * from table”);
while ($row = mysql_fetch_assoc ($result))
{
echo $row[“user_id”];
echo $row[“fullname”];
}
mysql_free_result ($result);
?>
[/code]
Bugs
If you find any bug in the latest version of this plugin, I hope you’d be so kind to tell me about it. This will only improve the plugin, which is better for the users! You can do this on the bug reports forum.
Help Needed?
If you need any help, or have problems with this plugin, please create a post on the support forums.
Plugin Info
AUTHOR: Frank Verhoeven
AUTHOR URL: http://www.frank-verhoeven.com/
WORDPRESS VERSION: 3.2+
TESTED UP TO: 3.4
CURRENT VERSION: 1.8
Download
DOWNLOAD: FV Code Highlighter
Support
If this plugin is helpful to you, please consider supporting it! You can help it’s development by making a small donation (Contact me), or promote it by putting a link to this page on your site. Appreciate it!