Comment System Upgrade

From Jcastle.info
Revision as of 07:19, 7 June 2025 by Eric (talk | contribs) (Created page with "{{news |NewsTitle=Comment System Upgrade |NewsDate=2025-06-07 |NewsBody=I’ve made a long-overdue update to JCastle’s comment functionality. You’ll now find the last five user comments displayed right on the homepage. Comments are shortened to about 200 characters so click through to the castle page to see all the details. This change helps surface recent discussions, encourages replies, and makes it easier to follow up on your own comments. There are a couple c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I’ve made a long-overdue update to JCastle’s comment functionality. You’ll now find the last five user comments displayed right on the homepage. Comments are shortened to about 200 characters so click through to the castle page to see all the details. This change helps surface recent discussions,

Comment System Upgrade

2025-06-07


I’ve made a long-overdue update to JCastle’s comment functionality. You’ll now find the last five user comments displayed right on the homepage. Comments are shortened to about 200 characters so click through to the castle page to see all the details.

This change helps surface recent discussions, encourages replies, and makes it easier to follow up on your own comments. There are a couple caching mechanisms at play so new comments might take up to an hour to be reflected on the top page.

What about email updates?

Come on, Eric, I still have to visit the site, right? Isn't there a way to get comments by Email? YES - There is! The comments are available via an XML feed which can be used by many free tools that will send you email or push notifications when new comments are posted. For setup instructions, visit the new help page for details

<a href='/view/Subscribe_To_Comments' target='_blank'> Subscribe to comments</a>

If the number of comments ever becomes overwhelming I'll look at automatically sending replies to posters or subscribing to threads from within MediaWiki, but this should do the trick for now.

Behind the Scenes

Technically, what happens is if a new comment is added, it triggers the a refresh of the RSS (XML) page which is saved to the server. The next time you visit the Home, Javascript grabs the last 5. This Home is also cached so it may take time for this to refresh, but it will. There is a link to a "more comments" page in the Recent Comments" section with the latest 25 comments and a link to an instructions page to help you use the RSS feed to follow comments on different platforms. The frequency of updates from these platforms varies, so you may need to adjust settings or your platform of choice.

This is something I’ve wanted since switching to MediaWiki. On my old site, it was simple. But MediaWiki ... is a different beast. The code base, modules, restrictions, hooks are overwhelming for an amateur like myself. I just want things to work while I create content. For years, I tinkered off and on but couldn’t nail down a solution. I contacted the developers of the MediaWiki Comment plugin and left notes on the forums but no one ever helped to add or create this kind of functionality ... then along came ChatGPT...

Troubleshooting is as easy as pasting an error message or code snippet. What might have taken hours (or was impossible for me) was done in minutes. This feature — with comment display, caching for performance, display tweaks, XML feed and a help page — came together in a few hours while watching Netflix (multitasking!!) on a Sunday evening.

That being said, you still have to be careful. ChatGPT doesn’t always remember previous context, and it’s not perfect with version differences (e.g. v1.39 vs v1.4). Sometimes, it hallucinated methods or functions that should be there, but were not, or the function actually had a slightly different name. So, the moral of the story is that you still need to have a good idea of what you are doing, but for methodical troubleshooting, code optimizing, replacing/upgrading old plugins and even for making recommendations how to tackle a problem, could be an incredibly helpful tool in maintaining and improving this site. I also made several other minor tweaks and enhancements under the hood to improve editing, security, display and more in over weekend.



0
Loading comments...