My First Serendipity Plugin Thu, Oct 28. 2004
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 {
- public static void main ( String[] args ) {
- JOptionPane.showMessageDialog(null, "hello, world!");
- int n = args[0];
- for ( int i = 0; i < n; i++ )
- {
- System.out.println(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.
Related entries by tags:
- SQL UPDATE for strings in MongoDB
- Profile of the GB4k.com launch -- Joomla reborn
- Get files from subversion without creating a sandbox using svn export
- Centos Virtual LAMP server -- Part II
- Too much information about the MySQL TIMESTAMP
- Mysql Update: Null + 1 is Null!
- Lampsig 2008 Presentation on Subversion for Lamp Developers
- LAMP Tutorial Series originally published on PHPFreaks.com
« previous page
(Page 1 of 1, totaling 1 entries)
next page »


