Anonymoose Inline Editor (AIE. Wordpress Plugin)

28 October 2006 Tags  ,

Edit 3: Added screencast because Will is annoying.

Edit 2: updated, and fixed. Edit: Warning, I found a pretty bad bug, it disables comments and pings when you edit a post with this. I don’t recommend you use this until I’ve fixed it

Not to be outdone by Will, I started investigating some neato AJAXy stuff I’d read about awhile ago.

First up, block commenting using YahooUI (YUI) - personally, I prefer Prototype/Script.acul.us (particularly since WordPress already makes usage of this) and it was waaay too complicated (I don’t want block commenting).

Then, all I could find were theme specific hacks at getting it to work. Which (at the time) I thought was silly.
Then I looked at Inline Editing (that is, the ability to edit a post, without having to go through the administration section).
I’m a big fan of inline editing, infact, I developed an inline editor for ANZGW…you simply double click, and voila, you can edit your own posts on the spot.

So I developed a plugin of my own, Anonymoose Inline Editor, or AIE for short. Or you can call it AJAX Inline Editor, that works as well.

I’d say ‘beta’ stage, but I don’t honestly expect anybody to use this, but it isn’t very advanced (or well coded!)
Wordpress’ customisability actually makes it difficult to make a proper ‘plugin’.
Themes vary a great deal, which normally shouldn’t effect a plugin…unless, of course, its a Javascript plugin that edits the DOM. With every themes structure varying, it’d require modification of the script (or theme) to work.

For example, on Will’s Blog, he’d have to edit both the theme and script to get it to work well (no ‘post-id’ readily available), whereas InTheHut’s blog would only need a couple of values tweaked (actually, they might not need anything, its a little hard to tell when I can’t pull it apart easily ;) )

About

Anonymoose Inline Editor is designed to negate the need to go into the wordpress admin panel every time you want to edit an existing post.

Why? Sometimes you need one letter or word changed, and to go all the way through wordpress can be a little time consuming

How? AIE uses Scriptaculous for effects, and Prototype for AJAX(/AJAH actually)

AIE includes both Scriptaculous and Prototype, and makes all the needed calls, so (if you have a ‘compatible’ theme), it’ll work out of the box

In Action

[flash]http://aeoth.net/wp-content/uploads/2006/10/aie.swf,600,450[/flash]

Installation and Usage

Step 1. Download
Anonymoose Inline Editor 0.6

Step 2. Install
Unzip, upload to /wp-content/plugins/aie

Go to ‘plugins’ in the admin panel, and activate Anonymoose Inline Editing

Additional: If your 'edit' link isn't infact, 'edit', and is something like 'edit this', you'll need to change a value.
Open up /wp-content/plugins/aie/aie.php, and change:
$aie_config["editLink"] = "Edit" to whatever your edit link is.

Step 3. Editing
Click ‘Edit’ on a post, to see it transform into a textarea (HTML mode. No WYSIWYG editor…yet)

Step 4. Saving
Click outisde of the text area, and it’ll automagically save

Problems

  • Requires a fairly specific layout structure to work
  • If there is anything else attached to Window.onload, problems will arise
  • Depending on the theme, the width of the editor is really screwed up
  • Turns off Allow Comments/Allow Pings

Things to do

  • Make it more flexible
  • Add WYSIWYG editor so its much prettier
  • Add a ’save’ button so that its a bit more obvious
  • Add various Scriptaculous effects
  • Better javascript event attachment

Comments

6 Comments

  1. Will says:

    Where's the screenshots? :)

  2. Paul says:

    Bah, I'll one up it again, its a screencast now

  3. Kyler says:

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  4. Paul says:

    This plug doesn't do this.

    Your best bet (to do it automagically/every hour or so), would be to use a cron job running a script that modifies the timestamps of the oldest post.

    Send me an email, if you're interested, and I can attempt to get something to do that for you.

  5. fscmadkgsr says:

    Thanks for this site!
    hifue.info

Trackbacks / Pingbacks

Comments are closed