January 22, 2008
Writing My First Extension
coreyg @ 4:35 pm
Among the many strong suits of Deki Wiki is the ability to make virtually any application/widget reusable. All it takes is a few lines of Deki Script, and voilà, you have your own custom extension that others can use.
A perfect example of this occurred a week ago when I was working on implementing a new feature management application for the growth and development of Deki Wiki using FeVote. Initially I embedded the script onto a wiki page just to see how it worked. Once I was able to confirm that the application displayed nicely in a wiki page I decided to take the next step and add it as an extension.
The reason why I wanted to add it as an extension was because it made it much easier to invoke the board and to change parameters such as the name of the board, size, etc.
The writing of the script was very simple following the instructions here.
Here are a couple of tips for writing, testing, and implementing your extension:
- Make sure you check that the script can be copy and pasted in a normal wiki page first. If this doesn’t work then there may be an issue with the script itself.
- Use previous examples of similar scripts - starting off I always try to compare the outcome of my extension to a similar extension to make sure I am on the right track.
- Make sure when you setup the service to add debug as a config value as this will allow the service to refresh every time so that you don’t have to login to the control panel anytime you make changes to the XML file
I was able to add the FeVote extension in a matter of minutes and had time to throw together another one.
Here is the documentation for the two extensions I wrote: FeVote and Add This Social Bookmarking
Feel free to use the extensions I created as examples to compare to your extensions.
categories: MindTouch





No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment