My First Serendipity Plugin
I've exploring the Serendipity API by writing an "event" plugin wrapper around GeSHi. GeSHi is an extremely cool php class that does color syntax highlighting for any computer language you want. Since I hop from language to language, this is exactly the type of capability I want. So without further ado, here's a test of my plugin, currently in alpha state:
First some PHP
function generate_content(&$title) {
$title = PLUGIN_EVENT_GESHI_NAME;
}
Now some SQL
SELECT * FROM temptable WHERE USER= 10
and how about a hot cup-o...
Java
I have a lot to do (and learn about Serendipity) before I feel the plugin will be ready to release in beta state, but at least I thought I'd try it out and show a proof of general concept.
First some PHP
function generate_content(&$title) {
$title = PLUGIN_EVENT_GESHI_NAME;
}
Now some SQL
SELECT * FROM temptable WHERE USER= 10
and how about a hot cup-o...
Java
- /**
- * Java example for GeSHi
- */
- import javax.swing.JOptionPane;
- public class Foo {
- int n = args[0];
- for ( int i = 0; i < n; i++ )
- {
- }
- }
- }
I have a lot to do (and learn about Serendipity) before I feel the plugin will be ready to release in beta state, but at least I thought I'd try it out and show a proof of general concept.