Back at the end of November, I wrote a DevBlog entry explaining a few of the issues I had with AJAX usage and with JavaScript libraries that might make such usage easier. Over the past couple months, my views have started shifting to a more positive stance on AJAX and JavaScript libraries as well. It is getting to the point where I think the next major version of ExpressionEngine will have a JavaScript library or two included in the system by default. If we do decide to included these libraries, they should make it relatively easy for developers to add AJAX and other dynamic abilities to the ExpressionEngine Control Panel via extensions and modules. Further, I have a scheme where with the use of a few variables, these libraries could also be included on the user side and used there as well. We have not totally decided on this, but a few things are making it more likely.
Wow, the Edit Comments plugin is very cool, and another feature request fulfilled… Speaking of which, would it be possible to add a parameter that allows editing for a certain period only? I’d like to allow my commenters to edit their comments for, say, 24 hours, but not weeks or months after the fact.
Amazing! You keep making my job easier. Took all of 5 minutes to implement. I think this makes previewing comments unnecessary, which is great, because I always found the previewing process cumbersome and confusing for users.
Then I don’t see reasons to be delighted. I cannot use it.
P.S. The EE wysiwyg extension doesn’t work with EE website links, this plugin doesn’t have the time limit. Many other php programs are using these features for several years.
That, quite frankly, is your problem. I find it useful the way it is, and I’m certain that feature should be easy to add. I might take a look at it myself this weekend.
Implementing AJAX capabilities to improve control panel efficiency is great.
What would be AMAZING (like the comments section) would be encapsulating an AJAX library in a manner similar to what Ruby on Rails 1.1 has done to give our templates the power of standard AJAX functionality. Obviously, it can’t be as flexible as that in Ruby because tags aren’t as programmable.
Hopefully this is along the lines of what you are proposing.
YAY!! Thanks for the super plugin. It took me no time at all to get it set up. Your instructions are always so clear and easy to understand so again, my thanks.
4. Finally, this plugin tag also goes in your {exp:comment:entries} tag and will create
the Edit Comment link that can be clicked by the member who wrote the
comment or by a Super Admin, so that a textarea appears for editing.
Ingmar - Version 1.0.1 was just uploaded and it now contains a $time_limit variable at the top of the plugin, which allows that ability.
sigork - Come on, do you have to act this way all of the time? You seem perpetually unsatisfied and often act like you are trying to be a jerk. We keep a list of members of this forum who receive complaints, and your name is near the top mostly because of your attitude towards pMachine staff. Cut it out. The Tiny MCE extension problem you are having is because Tiny MCE is changing your links, not EE. And this is not the place to add in your little complaint about it.
Halogen - Did you make sure to create a new template and then specify it in the second tag’s edit_link=”” parameter? Sounds like the AJAX request is hitting the wrong template or a non-existing template (and defaults to index).
DougH - Basically, it is just a textarea inside a hidden div, so if you use CSS to style the textarea HTML element that should work. Also, in version 1.0.1, I gave the <div> around the textarea a class attribute set to “editCommentBox”, so you can style that as well if that is preferred.
I’ve wanted this functionality for quite some time. With great anticipation I implemented the plugin for one of my lesser trafficked blogs this afternoon.
If you follow Paul’s instructions it really does the job. As a superadmin, having the ability to edit a comment directly within a discussion page is simply phenomenal.
The plugin adds a bunch of overhead, however. I use page caching on my comments page. You can’t use page caching with the plugin. I tried putting the comment display block into an uncached sub template. Doing so adds an additional query for each comment. Since I paginate at 100 comments per page, that’s a lot of extra queries per page. With over a million posts in the comments table, the queries aren’t trivial.
Paul, is there an alternative way to implement this functionality? It’s really great and I’d love to be able to use it on my site.
Very cool Paul, you guys are machines.
You mentioned in your post that several Ajax libraries have reached impressive milestones. Can you specify which ones you are talking about. I think I might want to play with some of them to get familiar with Ajax before you ship the version of EE.
I installed it, but when I select “Clone” next to an entry in the edit menu I get “You have tried to access a weblog that does not exist.” The entries I’m trying to clone are not the default weblog (it’s long gone).
Secondly, with the Cloner Extension installed, if I go to edit an entry, the edit page is broken. It starts with the warning: “Warning: Invalid argument supplied for foreach() in /home/toongabbieanglican/system/cp/cp.publish.php on line 464”. The formatting on the page is different, and some of the fields have been filled in with the number “9”.
Jim F - Well, the query is done because I need the original comment data sans formatting so I can put it into the textarea for editing. A plugin cannot get the original comment data simply because the weblog module does not output it without the formatting. Hence, query. There is a way around it, but it would require that I use AJAX and some more javascript so that the edit textarea is only created when an edit is requested. A fair bit more effort to get it working smoothly. I might put it on my to do list for a future version. Oh, and no, page caching will not work with this plugin since we need to always know who is viewing the page. I will make a note of that in the plugin for the next version.
manofsteel - Prototype, Xajxa (4.3 and above only, sadly), and Moo.fx are what I have been playing with as of late.
Simon Job - Hm, I tested this on two different sites using PHP 4 and PHP 5, so the only thing I can think of is to have you update to the current build. Something might have changed that I cannot recall right now.