Developers: Two Sample Applications


Friday, January 11, 2008  

To celebrate the recent updates to EditMe's API and Development Support, here are two sample applications to play with. These are intended for developers as examples of how to write applications for EditMe sites. Non-programmer users can paste them into their sites and use them, but these are not supported applications. Both are stand-alone one page applications that can be easily deployed to any EditMe site using the new JavaScript layouts (if you still have an XSL layout, see the upgrade help). Here's how to install the sample applications:

  1. Open one of the links below, select and copy all the code. 
  2. Log into your site as an Administrator and create a new page. Select HTML Source Editor mode.
  3. Switch to Page Properties and change the MIME Type dropdown to "EditMe Scripted Page". 
  4. Select the appropriate security setting for the application (see below).
  5. Switch back to the page editor, paste in the code and save. 

Data Viewer 

The Data Viewer is an indispensable tool if you're programming with EditMe's name/value pair data storage mechanism. It allows you to see what data entries exist on your site and provides add/modify/delete capability for data entries. Since this application shows all the stored name/value pair data on your site, you should set the security setting for this page to Administrator View / Administrator Edit.

Get the DataViewer code

Captain's Log

The Captain's Log is a Twitter-style mini blog. It's handy for any situation where quick notes need to be posted to a site. The application displays the 10 most recent entries with linked page numbers for additional pages of 10 entries each. I've found it handy for posting to our intranet from my smart phone. The application limits posting to users who can edit the page. Everyone else sees a read-only list of entries. Editors can click an entry date to edit an existing entry. Erasing the content of an existing entry and saving deletes the entry. Nothing fancy, but it shows how something useful can be created without a lot of code. Another handy feature is that you can paste this script into multiple pages on your site and have multiple separate logs without changing the code. This application provides a nice example of the DOM4J library in action. 

Be sure to set the page security to a setting that only allows trusted users to edit for security reasons. Who can view the page is entirely up to you.

Get the CaptainsLog code

 

 

Stay Connected with EditMe

Subscribe via Email

Your Email:

Delivered by FeedBurner