WordPress.org

Support

Support » Plugins and Hacks » New Plugin – Edit n Place

New Plugin – Edit n Place

  • forceagainstsomething
    Member

    @forceagainstsomething

    Howdy all,
    I’ve got a new WordPress plugin up for download. It’s called Edit n Place, and it’s an inline editor for your blog. Now you can edit a blog post without going into the WP admin panel. If you see a typo or spelling error in your post, simply click the “Edit n Place” link at the bottom of each post, and the whole post becomes editable right there on the web page. Make any changes you want and click the “Save n Place” link and the post is saved.

    The web browser never refreshes during any of that. It’s pretty quick and it’s convenient. This is only version 0.1, and in fact it threw it together today in a few hours. But a few people have tested it, and I’ve tested it, and everything seems to be working.

    I haven’t tested it in Safari yet, but I know it works in Firefox and IE. In case you were wondering, only admins will see the “Edit n Place” link.

    Get it at http://www.headzoo.com

    Enjoy!
    – Sean

Viewing 15 replies - 1 through 15 (of 35 total)
  • Wow. Web20 and wysiwyg and cms all in one li’l ol’ plugin. I will definitely give it a try….

    Awesome! I need this one.. =) Thanks for the awesome plugin Sean. I already downloaded it, but I’ll check it out more in a little bit.. =)

    spencerp

    Doesn’t work in WP 1.5.2.

    Fatal error: Call to undefined function: is_attachment() in /var/www/html/vhosts/blog/wordpress/wp-content/plugins/editnplace.php on line 103

    Commenting out that function and it works just great.

    It does have a conflict with the userextra plugin but its minor. Its a object call error but if you refresh the page the changes are there.

    This worked in WP 1.5 — your mileage may vary.

    Oh ya it works in Opera just fine.

    wow very neat!

    Some thoughts:

    Is it necessary for the Javascript and stylesheet tags to be repeated before every post? To be compliant, these really should be in the head section.

    And could you add a Cancel changes or similar button?

    forceagainstsomething
    Member

    @forceagainstsomething

    @sgrayban – Thanks for the input. Didn’t cross my mind that is_attachment() was a WP 2.0 function. Makes sense though. I’ll have that fixed by the end of the day.

    @illudium – The JS shouldn’t be repeated before every post. Only once per page. If you’re getting it before every post (i.e. like 10 times per page), can you give me an URL so I can see?

    The stylesheet has been taken out. Actually wasn’t supposed to be there in the first place. That was just something I was experimenting with and decided not to use.

    As for putting it all in the head, that’s mildly impossible, or I would have. The problem is I only want the JavaScript on the page if the person viewing the page is an admin, for security purposes. Well, WP doesn’t know if the person viewing the page is an admin until *after* the head has been sent out to the browser. It seems it’s not until the first post is being displayed that the user ID becomes available.

    I’ll look into it some more. It’s not a solution that I’m happy with, but it seemed the only way.

    – Sean
    http://www.headzoo.com

    forceagainstsomething
    Member

    @forceagainstsomething

    @illudium – Never mind, it seems it is repeating the JavaScript. 🙂 Minor bug that’ll be fixed by tonight.

    – Sean

    forceagainstsomething
    Member

    @forceagainstsomething

    Alright, I put up a new version for download, version 0.2. If fixes the WP 1.5 problem, optimizes the JS a bit, and a couple other bug fixes.

    Enjoy!
    – Sean
    http://www.headzoo.com

    The plugin is among the easiest around to install. And it works great.

    However, after installing it and feeling overly confident about myself, I then discovered a problem.

    When I checked my feeds in my blog reader (RSS Bandit) every post that was edited via Edit n Place produced the following prior to the actual post.

    var editnplace_currentEditState = 0; var editnplace_blogURL = 'http://cranialcavity.net/fullthrottle/wp'; var statusOnImage = new Image(); statusOnImage.src = 'http://cranialcavity.net/fullthrottle/wp/wp-content/plugins/editnplace/status_on.gif'; var statusOffImage = new Image(); statusOffImage.src = 'http://cranialcavity.net/fullthrottle/wp/wp-content/plugins/editnplace/status_off.gif'; function editnplace_edit(postID) { var editnplace_link = document.getElementById('editnplace_link_' + postID); if (editnplace_currentEditState == 0) { editnplace_link.innerHTML = 'Save n Place'; editnplace_currentEditState = 1; var postBoxHeight = document.getElementById('editnplace_post_' + postID).offsetHeight; var postBoxWidth = document.getElementById('editnplace_post_' + postID).offsetWidth; var boxContents = document.getElementById('editnplace_post_' + postID).innerHTML; editnplace_responseElementID = 'editnplace_post_' + postID; var statusImage = document.getElementById('editnplace_image_' + postID); statusImage.src = statusOnImage.src; editnplace_responseImageID = 'editnplace_image_' + postID; editnplace_sendRequest("editnplacerneditrn" + postID + "rn" + postBoxHeight + "rn" + postBoxWidth); } else { editnplace_link.innerHTML = 'Edit n Place'; editnplace_currentEditState = 0; var editAreaContents = document.getElementById('editnplace_textarea_' + postID).value; editnplace_responseElementID = 'editnplace_post_' + postID; var statusImage = document.getElementById('editnplace_image_' + postID); statusImage.src = statusOnImage.src; editnplace_responseImageID = 'editnplace_image_' + postID; editnplace_sendRequest("editnplacernupdatern" + postID + "rn" + editAreaContents); } } .editnplace_textarea { height: 200px; width: 500px; }

    Any ideas? Is it specific to my reader or a bug in the code of the pluin. Full Throttle is the site it’s installed in.

    I do the same with FLOCK.

    forceagainstsomething
    Member

    @forceagainstsomething

    Marc,
    Yep, looks like a bug. It’s not that it’s added for each post that you edited, but added once per feed (in v0.2). I’ll clear that up by tonight.

    Thanks!
    -Sean

    forceagainstsomething
    Member

    @forceagainstsomething

    Marc,
    Okay, the next version, 0.3, is up for download. If fixes the RSS feed bug, and also adds a Cancel button when editing post.

    Enjoy!
    – Sean
    http://www.headzoo.com

    Sean-
    Excellent plugin!

    Sean, I haven’t yet tried this plugin on my main blog running 2.0.2, but will soon here. I was wrapped up in theme editing last night sigh.

    I’m also compiling a list of working plugins that “work” on the 2.1 alpha1 version of WP from the SVN. I will try your’s on the Alpha Test blog and then let you know. I might even make a post in here of the ones I have currently working, just not sure if it would be allowed or not lol..

    spencerp

    I also know, that the 2.1 alpha1 version is STILL in development stage, but just thought I’d try plugins on it and see what happens. =)

    this plugin is awesome

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘New Plugin – Edit n Place’ is closed to new replies.