Commentedit: Edit comments some time after posting them

Creating and modifying plugins.
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

I just added the file. If the problem remains, give me a call. Otherwise: hope you like it and it's working as intended.
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

Now I fetched the serendipity_event_commentedit.js file from SF and loaded it to the plugin directory. The first test failed, there is no text box to edit the comment.
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

Same for me. "$.ajax is not a function" is the error-message and a hint, that the jQuery-Library isn't loaded correctly. I guess it's an error with the loaded prototype-library afterwards by the lightbox-plugin, a conflict regarding the $. Probably the plugin should use 'jQuery' instead of '$', but that's something I have to test first.
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

Lightbox is running on my blog. Should I deactivate it and try again?
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

Yes, that should fix it. I'll also look at that for the next Version.
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

You're right, deactivating Lightbox fixed it.
For sure I'm not glad with that, but edit comments is more important.
Thanks again for assistance :)
Keep it Country,
Markus
Cowboy of Bottrop
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by kleinerChemiker »

Do both plugins use the same JS-libary? If so, maybe its possible to mke an plugin from the libary and the plugins require this new plugin. So it's inlcuded only once.
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

Just got a call that it is possible to put some HTML and JS code in the comments while editing. A friend just set a banner image and a JS redirection.

That's why I disable this plugin and test it again with the next version.
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

@kleinerChemiker: Commentedit is using jQuery, Lightbox Prototype. But it's possible to use 'jQuery' instead of the '$'-shortcut, and call jQuery.noConflict(). Said the doku, I haven't test it yet.

@Cowboy: Garvin said that you may insert html, but it won't be printed at a normal comment output. It really apppeared in the comments of someone else and you saw it?
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

This friend gave me a ring and told me that he could see his banner image.
Some time ago I edited a comment in the database via phpMyAdmin to set a link, and this html was not shown in this comment...
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

He probably could only see his banner-image before a reload, because it was inserted via javascript and only for him. The manually inserted html remains in the comment but won't be printed. But to be sure, I'll test it (again) next week.
sincerely
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

Take all the time you need to make it secure. I like this plugin anyway, and I wanna use it. :)
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

Regarding the security: It's not unsecure. You are able to save html. For yourself, this html is also shown once - but only once and only for you. If a comment is fetched from the database, no html is printed. So there is no chance to insert harmful html.

The conflict with lightbox should be solved when using the attached file as 'serendipity_event_commentedit.js'. Could you test that for me? I tested it locally and it worked, if you confirm that I'll update spartacus :)
sincerely
Attachments
serendipity_event_commentedit.txt
serendipity_event_commentedit.js
(3.68 KiB) Downloaded 369 times
Cowboy
Regular
Posts: 29
Joined: Wed Jul 15, 2009 8:07 pm
Location: Bottrop
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by Cowboy »

With lightbox activated it's not possible to edit a comment. After deactivating lightbox again, I could edit my comment. Time remaining was 80 seconds, so the time was also running with lightbox activated.
Keep it Country,
Markus
Cowboy of Bottrop
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Commentedit: Edit comments some time after posting them

Post by onli »

Which lightbox-version is activated, lightbox2? Indeed, it was not working totally, but the commentedit worked, so I oversaw that bug (maybe depending on the plugin-activation-timing)...

Could you test again the new version?

PS: Avoiding that conflict is new to me, so here I have to learn, sorry :)
Attachments
serendipity_event_commentedit.txt
serendipity_event_commentedit.js
(3.68 KiB) Downloaded 357 times
Post Reply