I’m testing some eye-candy on the comments page of this site these days. Using AJAX, based on Prototype.
Update: This is how it works, but remember it’s a hack, not a solution…
I’m testing some eye-candy on the comments page of this site these days. Using AJAX, based on Prototype.
Update: This is how it works, but remember it’s a hack, not a solution…
Kommentare für diesen Beitrag sind derzeit deaktiviert.
13. Juli 2005 16:24
Scheint zu klappen, sieht auch nett aus.
14. Juli 2005 09:09
ja, es klappt – hat aber noch einen kleinen fehler, so wie ich das sehe. wenn ein neuer kommentar hinzugefügt wird, steht links vom kommentar eine „1“, unabhängig davon welcher beitrag es ist. war jedenfalls bei meinem vorherigen kommentar der fall.
erst beim reload wird die zahl aktualisiert.
25. Juli 2005 23:24
ajax commenting?
2. August 2005 12:04
yes I love this fuction , can you tell me , how to get it work in my theme?
thanks
2. August 2005 15:58
Drop these files into your theme directory.
ajax_comments.php handles the AJAX requests and acts just like wp-comments-post.php from WordPress.
ajax_comments.js is the JavaScript part that sends AJAX requests and updates the page. You have to adjust this file to match your style ids! And the comments ol tag must be present for this to work, even if it’s empty..
Then, you have to drop some Scripts from script.aculo.us in the „scripts“ directory (see the header of this page) and add them to the page header. And last, but not least, add this to the form tag of you style’s comments.php:
onsubmit="new Ajax.Updater({success:'commentlist'}, '/wp-content/themes/mytheme/ajax_comments.php', {asynchronous:true, evalScripts:true, insertion:Insertion.Bottom, onComplete:function(request){complete(request)}, onFailure:function(request){failure(request)}, onLoading:function(request){loading()}, parameters:Form.serialize(this)}); return false;"This is not very clean and nice, I know, and this was never meant for distribution, at least for this version. Maybe I’ll clean it up some day and write a better guide…
2. August 2005 16:20
Lets see if this works.
We’re using AJAX quite heavily in http://www.openpsa.org
2. August 2005 16:21
Cool effects here!
3. August 2005 03:56
yes , thanks you for the hack but I still can not implemeted it into my themes, I dont know why , but I have stupid question : are prototype need ruby hosting support?
3. August 2005 12:37
Bergie: The effects are from script.aculo.us, a very nice JavaScript library (together with the great Prototype framework)…
I don’t know if this works with all browsers, it does work with JavaScript disabled, but it does not work with Opera 7.xx e.g. It’s as broken as the Ruby on Rails based Typo weblog engine…
3. August 2005 12:39
kusaeni: No, Prototype and script.aculo.us are JavaScript libraries that run on the client’s browser, so no need for Ruby support on the hosting site. You just need to copy the two js files into the scripts/ folder (you can copy (not hotlink!) them from my site for example).
4. August 2005 04:43
thanks Nico , was follow your instructions , but still have problems.
After type a comment text , the page is loading so far , and the comments is not appear in comment list . But when I reloaded the page , comments is appear , normaly .
How I can solving this troble?
thanks , and sorry for my english .
I am Indonesian.
5. August 2005 04:02
oK , may I know your comments .php files?
7. August 2005 14:27
Nice job Nico. You could write a WP plugin and distribute it. It would be very popular!
7. August 2005 21:51
I guess packaging it as a WP plugin would not work well, because it would depend on specific class names, list id’s (for the comment list) and e.g. the fact, that the empty comment list has to be present even if there is no comment yet.
Inevitably the plugin would break on several themes…
9. August 2005 02:29
Looks great
9. August 2005 03:24
Ok, I have a small problem. I got it pretty much working, except when you post a comment, nothing happens until you refresh the page, then it is there… Any ideas?
9. August 2005 03:50
Sorry for spamming, but wanted to let you know that I got it working, thanks for the great scripts!
17. August 2005 14:10
HTML-Test:
strong, em, link.
22. August 2005 12:11
Testing Ajax comments. Cool stuff
23. August 2005 00:02
Hm, mal schauen. Ajax faszniert mich schon seit einiger Zeit.
15. September 2005 21:41
I disabled AJAX Commenting again. No need to post test comments anymore
16. September 2005 22:27
wow its cool
16. September 2005 22:43
yeah, it hangs
16. September 2005 22:46
Seems to work
16. September 2005 22:48
i figured it out. I was so stupid. bet all of you are having the same problem.
make sure to change:
‚/wp-content/themes/mytheme/ajax_comments.php‘, {asynchronous:true,
16. September 2005 22:59
Nico, not on your server. Ours! It posts but you need to refresh.
24. September 2005 23:44
Very Cool. I am going to try this out. : )
25. September 2005 00:52
Sorry, I have to try this out!
25. September 2005 01:17
Got to try it myself
25. September 2005 02:41
I guess I gotta get on the AJAX bandwagon
25. September 2005 12:22
Nice commenting buddy !
28. September 2005 06:59
中文測試
28. September 2005 11:37
中文留言
28. September 2005 16:10
The characters look good to me.
2. Oktober 2005 20:15
Nice, i will try it.
2. Oktober 2005 20:24
Wasssaaapp!!!
4. Oktober 2005 05:13
This is great
4. Oktober 2005 05:14
i like it
4. Oktober 2005 06:05
Why the chinese characters in this blog no need to refresh in order to prevent to display rubbish characters?
This problem is related to MySQL version? Collation of database or tables?
The following wordings are Chinese characters.
中文留言測試
5. Oktober 2005 00:06
cool
12. Oktober 2005 05:26
kick ass !!
13. Oktober 2005 13:34
ajax commenting?
中文如何?
13. Oktober 2005 16:00
well, good works
11. November 2005 01:18
Giving the Ajax commenting system a whirllllllll
17. November 2005 13:40
I can’t wait to use Ajax commenting for my next redesign
17. November 2005 20:23
test
20. November 2005 17:18
Mmmm AJAX
28. November 2005 08:17
sdfjdfhgjkd
29. November 2005 14:20
oh, this is how it works
2. Dezember 2005 13:41
Is the Ajax commenting still working?
4. Dezember 2005 21:46
testing, testing .. 1 .. 2 .. testing ;]
4. Dezember 2005 21:48
what if ..
4. Dezember 2005 21:48
what if ..
what if ..
2
12. Dezember 2005 13:22
test me pls
12. Dezember 2005 17:29
Großartige Seite… sehr informativ und lesenswert
13. Dezember 2005 14:36
Wirklich coole Idee!
13. Dezember 2005 15:13
Mmmh… sor richtig kommt das alles hier aber nicht mit der Kommentarzählung klar, oder?
15. Dezember 2005 18:59
testr