WordPress.org

Ready to get started?Download WordPress

Forums

New Plugin - Edit n Place (36 posts)

  1. forceagainstsomething
    Member
    Posted 8 years ago #

    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

  2. vkaryl
    Member
    Posted 8 years ago #

    Wow. Web20 and wysiwyg and cms all in one li'l ol' plugin. I will definitely give it a try....

  3. spencerp
    Member
    Posted 8 years ago #

    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

  4. Scott Grayban
    Member
    Posted 8 years ago #

    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

  5. Scott Grayban
    Member
    Posted 8 years ago #

    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.

  6. illudium
    Member
    Posted 8 years ago #

    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?

  7. forceagainstsomething
    Member
    Posted 8 years ago #

    @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

  8. forceagainstsomething
    Member
    Posted 8 years ago #

    @illudium - Never mind, it seems it is repeating the JavaScript. :) Minor bug that'll be fixed by tonight.

    - Sean

  9. forceagainstsomething
    Member
    Posted 8 years ago #

    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

  10. Marc
    Member
    Posted 8 years ago #

    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.

  11. red-star
    Member
    Posted 8 years ago #

    I do the same with FLOCK.

  12. forceagainstsomething
    Member
    Posted 8 years ago #

    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

  13. forceagainstsomething
    Member
    Posted 8 years ago #

    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

  14. monkeypup
    Member
    Posted 8 years ago #

    Sean-
    Excellent plugin!

  15. spencerp
    Member
    Posted 8 years ago #

    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. =)

  16. illudium
    Member
    Posted 8 years ago #

    this plugin is awesome

  17. Marc
    Member
    Posted 8 years ago #

    Thanks Sean, that cleared the problem.

  18. Stahn
    Member
    Posted 8 years ago #

    What about Unicode support?

    See what I mean:

    http://img55.imageshack.us/img55/8724/edit8hn.png

    I'm trying to use the character ?

  19. forceagainstsomething
    Member
    Posted 8 years ago #

    Stahn,
    I'll look into that this week. Hopefully by mid-week I'll have the next minor version up, and I'll try to get the Unicode problem fixed.

    - Sean

  20. forceagainstsomething
    Member
    Posted 8 years ago #

    Stahn,
    Give this a try:

    http://editnplace.headzoo.com/downloads/editnplace_v0.3.1.zip

    It's slightly difficult to test for these kinds of things on my home computer, so I can't say for sure that it will work. The character ? worked fine when I testing it.

    This minor version also assumes that you have your MySQL tables set to use UTF-8.

    - Sean

  21. Stahn
    Member
    Posted 8 years ago #

    I somewhat found the problem. First, I'm using Opera (9, a weekly build).

    Opera first checks if the document encoding is specified in the html head. If not, then it uses what we configured in an option: "Assume the following if the page has no encoding configured" or something like that. I use iso-8895-1 - and even though I changed it to utf-8 the problem was still there.

    Then I went directly to the codification option (View > Codification > Unicode > UTF-8
    It displayed the characters fine.

    I hope you can find a workaround... I'm going to suggest in Opera forums that we can specify the encoding for a particular site.

    Oh! Now that I saved the document I have this error:

    WordPress database error: [You have an error in your SQL syntax near 'NAMES 'utf8'' at line 1]
    SET NAMES 'utf8'

    I'm gonna check that :o

  22. forceagainstsomething
    Member
    Posted 8 years ago #

    Stahn,
    Well... hmm. I know after doing some reading, that if the browser isn't treating the whole document as UTF-8, then text boxes won't display UTF-8 characters correctly, and possible JavaScript won't either. So there really is no work around, it's up to the user to have things configured correctly in the browser *and* in WordPress for the characters to display correctly.

    The SET NAMES thing turns out to be MySQL 5.x only. Didn't realize that. :) I'll look for the MySQL 4.x equivalent.

    Thanks for all your help.
    - Sean

  23. illudium
    Member
    Posted 8 years ago #

    Here are two things I've noticed since using this more:

    1) Updates made to a PAGE does not modify the date-modified time in WordPress.

    2) And there is some form of lag that occurs between updating a PAGE (not sure if it happens on Posts because I haven't checked) and when WordPress sees it if you edit the Post normally. What I mean is, I Edit N Place a Page, save it. The Page looks updated in my browser. I go into the WP Dashboard, choose Manage Pages and the Page but the last update I just made is not showing in there.

  24. forceagainstsomething
    Member
    Posted 8 years ago #

    illudium,
    #2 might have something to do with #1. Sounds like an easy fix though.

    Thanks!
    - Sean

  25. lleger
    Member
    Posted 8 years ago #

    Sean, I have reasons to believe that edit n place broke my dashboard and caused some problems with the wp_meta function. Any idea what's up?

  26. shacker
    Member
    Posted 8 years ago #

    Feature request for this plugin: Allow user to change the published/private/draft status of the entry ... in place!

  27. ttiger
    Member
    Posted 8 years ago #

    I just wonder if it is possible and how to modify your plugin so that users can add picture, links, numbering, upload files...exactly the same as they are in admin panel.

    Anyway, Great plugin, Sean! It is almost what I'm looking for.

    Regards
    T.

  28. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    I tried version 0.3, but I still got the scripting stuff in the RSS feed. It was inside of the description tags in the xml.

  29. A simple if (!is_feed()) ... will probably clear that up. ;)

  30. forceagainstsomething
    Member
    Posted 8 years ago #

    Ouch, guess I should have checked in on this post. Didn't realize so many messages had built up. I do have a support forum specific for my plugins @ http://www.headzoo.com/support

    I'm putting the finishing touches on v0.4 tonight. No more scripts in the feeds, and you can edit the post title and categories inline.

    I'll consider some of the other suggestions for the next version.

    - Sean

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags