Will display PHP source-code in colour without giving a DISALLOWED (text) warning. Write your PHP code between [phpcode] and [/phpcode]
| General Plugin info | |
|---|---|
| Author: | Edelpils / OM3EGA / www.ditnetwel.nl |
| Current Version: | 1.0 |
| Download: | np_codeviewer_v1.0.zip |
| Code: | NP_CodeViewer_code |
| Demo: | - |
| Forum Thread: | Thread 4246 |
I wrote a little plugin that display’s the sourcecode of a PHP file with the coloured highlighting. This plugin is in v1.0 stage at this moment and when I have more time I will develop it further.
It works nice , however you should take some care when you use fancytext. In any way you can install the plugin and enable or disable it within the admin menu.
You can use it with :
[phpcode] your [[PHP]] sourcecode here [/phpcode]
For example
[phpcode]<?php function init()
{
// include language file for this plugin
$language = ereg_replace( '[\\|/]', '', getLanguageName());
if (file_exists($this->getDirectory().$language.'.php'))
include_once($this->getDirectory().$language.'.php');
else
include_once($this->getDirectory().'english.php');
} ?>[/phpcode]
The syntax highlighting only works if you have done your PHP code into PHP brackets <?php ... ?>.
If you have any questions , remarks or improvements please post them at the nucleus forum here
NP_CodeViewer version 1.0 works with Nucleus CMS version 3.31 - 2007-10-27 ftruscot
Please take a look also at NP_GeSHi2.