I wrote the Oddmuse:Dynamic Comments Extension today. I installed it on the Diary page. All comments are now loaded into the main page and hidden via CSS. I saw this very simple trick today on Mridul’s blog. Awesome!
Oddmuse:Dynamic Comments Extension
Now that I installed it for this site, I see that it still has bugs. Investigating, I find that near links (the green/khaki stuff in the next paragraph) is broken on this site. The reason was that I used relative links in the InterMap. And I found the corresponding ChangeLog entry, too:
2005-06-22 Alex Schroeder <alex@gnu.org>
_ wiki.pl (GetPageOrEditLink): No longer handle near links specially._
This has not been workinf for a long time. 😄
I also wrote rss-prefetch yesterday in order to make RecentFarChanges on CommunityWiki really fast. This was needed because the RSS caching I wrote yesterday was not good enough; once an hour somebody will have to fetch the stale feeds again.
#Wikis
(Please contact me if you want to remove your comment.)
⁂
The dynamic comments thing is really slick. When I wrote a web app for Cisco, I put something like this in and that was what impressed the people most. Not the 2500 lines of code, not the abstractions, not the flexibility but 5 or 10 lines of Javascript. Makes me wonder... 😄
Did you test this with a non-javascript aware browser? Lynx doesn’t do CSS anyway so you’d still see the comments inline.
– NoufalIbrahim 2005-07-14 05:51 UTC
---
Right, eye candy sells. 😄
What’s the standard for text-only browsers these days – links, lynx, or w3m? I remember using mostly w3m at the time.
I noticed an HTML nesting error in the code which I had to fix, too. 😄
– Alex Schroeder 2005-07-14 10:35 UTC
---
I think I flicked it from somewhere ... looks like I lost the credits to that ’cos of some subsequent template changes !
It was one of those irritating things to do - click on the link to see comments on a seperate page , so when I saw this on Kousik's page, got the source for the hack from him 😄
About eye-candy selling ... when we did this runtime piece which was pretty cool , to “market” it to the management - we made a really cool demo : it used about 5% of the actual functionality , but they bought the idea 😄 I am sure if we had talked about the actual merits , it would have been uphill battle. Somehow that incident reminded me of what Pike said about an idea and demo’ing it.
– mridul 2005-07-15 14:51 UTC
---
Update: I actually wrote an alternative that will inline the comment form when you click on the *Add Comment* link. It involves an ugly piece of javascript that creates the entire form using DOM createElement, setAttribute and appendChild calls. I checked it into CVS under another name. ¹
I think I won’t be using it.
– Alex Schroeder 2005-07-17 01:40 UTC
---
Yup. That’s overkill. The original thing is useful though.
– NoufalIbrahim 2005-08-05 12:39 UTC