Live comment preview
-
- Regular
- Posts: 340
- Joined: Sun Jun 12, 2005 5:28 am
Live comment preview
Is there a s9y plugin similar to this
http://dev.wp-plugins.org/wiki/LiveCommentPreview
http://dev.wp-plugins.org/wiki/LiveCommentPreview
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Live comment preview
The problem is this: Serendipity has a boast of different markup plugins.
The way the livecomment preview works is by just replacing some escaped HTML code with real code. So no BBCode or even smilies are replaced "live", which kinda sucks.
So we could have a livepreview with nearly a 1:1 copy of their javascript code. But it wouldn't show much of a live preview, as most of the s9y markup cannot be easily replaced with JS calls.
The cooler way would be to just preview the comment with PHP calls. But this can't be done "live", because you would need to fire up a AJAX/PHP call every X seconds or X characters, which would be a HUGE performance impact.
What could be done instead would be to modify the "Preview" button to toggle a no-reload live preview of the comment. What would you think about that?
Regards,
Garvin
The way the livecomment preview works is by just replacing some escaped HTML code with real code. So no BBCode or even smilies are replaced "live", which kinda sucks.
So we could have a livepreview with nearly a 1:1 copy of their javascript code. But it wouldn't show much of a live preview, as most of the s9y markup cannot be easily replaced with JS calls.
The cooler way would be to just preview the comment with PHP calls. But this can't be done "live", because you would need to fire up a AJAX/PHP call every X seconds or X characters, which would be a HUGE performance impact.
What could be done instead would be to modify the "Preview" button to toggle a no-reload live preview of the comment. What would you think about that?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Live comment preview
that would work too. a no-reload Ajax based preview will be cool.garvinhicking wrote:
What could be done instead would be to modify the "Preview" button to toggle a no-reload live preview of the comment. What would you think about that?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Live comment preview
Guest: But I just explained that a no-reload Ajax based preview would SUCK performance's ass....?!
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 340
- Joined: Sun Jun 12, 2005 5:28 am
i meant. change a preview button to make a no-reload preview. like on this site.
http://godbit.com/featured/the-john-carroll-school
http://godbit.com/featured/the-john-carroll-school
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Okay, I'll have a look at it.
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I've just committed a "livecomment" plugin to CVS. You'll require updated comment.tpl and commentform.tpl files, plus some functions of the SVN from now.
Please test!
Bestregards,
Garvin
Please test!
Bestregards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Live comment preview
I tried the livecomment preview and now I'm here. Because I think it really sucks. Should I change to WP?? :> Not really ... (I'm very satisfied with s9y so far, thanks for your great work garvin + rest!) My problem is: Hitting the "preview" button just like before is not live! I could do that before I used this plugin and I even got more informations, how the complete comment would look with author's name etc. I don't think "no BBCode or even smilies are replaced" sucks, it's just a pre-preview. So if the live preview would be really live and hitting the "preview" button would return the whole thing just like before, that's how it should function, imo.garvinhicking wrote:The way the livecomment preview works is by just replacing some escaped HTML code with real code. So no BBCode or even smilies are replaced "live", which kinda sucks.
So we could have a livepreview with nearly a 1:1 copy of their javascript code. But it wouldn't show much of a live preview, as most of the s9y markup cannot be easily replaced with JS calls.
Didn't want to be offensive. But I really thing it sucks how it works now. It should work more like the livesearch which is great.
Last edited by Lariel on Wed Jun 13, 2007 11:11 am, edited 1 time in total.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Live comment preview
Hi!
I agree! I would love to see an improved version of the plugin. I am sure someone who has fun with Ajax can now build some improved version of it. Technology has quite improved since the initial commit of this plugin.
However the interest in this plugin was very low, so I can't dedicate time on this plugin on my own. For myself, I also am quite satisfied with the usual preview.
No offense taken, BTW.
Best regards,
Garvin
I agree! I would love to see an improved version of the plugin. I am sure someone who has fun with Ajax can now build some improved version of it. Technology has quite improved since the initial commit of this plugin.
However the interest in this plugin was very low, so I can't dedicate time on this plugin on my own. For myself, I also am quite satisfied with the usual preview.
No offense taken, BTW.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Are there any news about this plugin? I've found another plugin @ http://www.softius.net/wp/plugins/comment-live-preview/ (for Wordpress). Wouldn't it help to adapt the source of this plugin? (my skills in Ajax are to less).
Greets and best regards,
Dawn
Greets and best regards,
Dawn
Visit my blog @ http://www.blankster.info/blog
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That would help, yes. But still the differences are quite large so it would take a skilled Ajaxian still more than one hour to get it transplanted...
Regards,
Garvin
That would help, yes. But still the differences are quite large so it would take a skilled Ajaxian still more than one hour to get it transplanted...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I hope anybody can get it done. This is the only little feature I am a little bit jealous to wordpress users.
Thanks for your feedback garvin.
Greets,
Dawn
Thanks for your feedback garvin.
Greets,
Dawn
Visit my blog @ http://www.blankster.info/blog
Hi
Do you know this approach using jquery? I adapted it to work with serendipity, you may test it in my blog and download it here. Would be glad to here some comments and improvements.
Cause I'm new to this, you may want to check the source before using it...
You will note, it is not yet complete. I don't see a way how to use the installed markup-plugins to format the text - currently this is untouched, therefore producing html-styled text. Further thoughts about this can be found in the blogpost linked above, in german.
Maybe anyone can show me how to get the comments in the right format? I'd complete it if I saw a way - but of course wouldn't mind if someone else complete this.
Greets
Do you know this approach using jquery? I adapted it to work with serendipity, you may test it in my blog and download it here. Would be glad to here some comments and improvements.
Cause I'm new to this, you may want to check the source before using it...
You will note, it is not yet complete. I don't see a way how to use the installed markup-plugins to format the text - currently this is untouched, therefore producing html-styled text. Further thoughts about this can be found in the blogpost linked above, in german.
Maybe anyone can show me how to get the comments in the right format? I'd complete it if I saw a way - but of course wouldn't mind if someone else complete this.
Greets
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Nice to see that someone is working on this!
Serendipity indeed has a dependency management system, but we currently do not have plugins that just provide libraries. Currently there is no other plugin using jquery, so the overhead of the plugin supplying jquery wouldn't be so bad. If later we see that more plugins use this, a new jquery plugin could be created, though.
The existing serendipity_event_livecomment.php script actually does perform markup transformations, I think. It registers the external_plugin event hook and sends the current input to that script, which then returns the rendered markup. That is some kind of AJAX request, so once you have such a stub, you can use a JS event to perform the AJAX call, and render the HTML with the return code of that call.
The only alternative to such (performance intense!) ajax calls would be to recreate every markup plugin in JAvascript instead of PHP. Quite a huge task, even though at least BBCode or Textile are maybe already existing as JS-transforms...?
In fact, do you maybe want to try to incoroprate your changes into the serendipity_event_livecomment plugin? This would allow us to provide one plugin with the best functionality...
HTH,
Garvin
Nice to see that someone is working on this!
Serendipity indeed has a dependency management system, but we currently do not have plugins that just provide libraries. Currently there is no other plugin using jquery, so the overhead of the plugin supplying jquery wouldn't be so bad. If later we see that more plugins use this, a new jquery plugin could be created, though.
The existing serendipity_event_livecomment.php script actually does perform markup transformations, I think. It registers the external_plugin event hook and sends the current input to that script, which then returns the rendered markup. That is some kind of AJAX request, so once you have such a stub, you can use a JS event to perform the AJAX call, and render the HTML with the return code of that call.
The only alternative to such (performance intense!) ajax calls would be to recreate every markup plugin in JAvascript instead of PHP. Quite a huge task, even though at least BBCode or Textile are maybe already existing as JS-transforms...?
In fact, do you maybe want to try to incoroprate your changes into the serendipity_event_livecomment plugin? This would allow us to provide one plugin with the best functionality...
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/