I may have found an alternative solution to my blog's commenting system! 😺
The synchronization of comments from my Mastodon account. It's something I tried and abandoned, but I'm giving it another try after reading your comments. Well, I explain more on the blog and also share the source code:
Blog post, source code, and demo:
→ https://www.davidrevoy.com/article981/i-may-have-found-an-alternative-solution-to-my-blogs-comment-system
Bonus: Because I'm happy, here's a happy Mastodon mascot as a postman that I painted this morning.
#blog #selfhosting #php
The synchronization of comments from my Mastodon account. It's something I tried and abandoned, but I'm giving it another try after reading your comments. Well, I explain more on the blog and also share the source code:
Blog post, source code, and demo:
→ https://www.davidrevoy.com/article981/i-may-have-found-an-alternative-solution-to-my-blogs-comment-system
Bonus: Because I'm happy, here's a happy Mastodon mascot as a postman that I painted this morning.
#blog #selfhosting #php
Sheldon Chang 🇺🇸
•Fabián Fucci
•bison ✅
•Andrea Grandi 🦕
•David Revoy
•David Frank
•David Revoy
•Webmention
www.w3.orgDavid Frank
•See a quick example on my site (integrated via JavaScript): https://marisa.club/a-new-adventure/
A new adventure on static site generation
marisa.clubDavid Revoy
•GunChleoc :verified_gaelic:
•Thank you for sharing the source code!
David Revoy
•GunChleoc
•An improvement idea: A JavaScript "Copy" button to copy the post's URL. Or copy it as an on-click event on the link's text.
Instructions: https://www.w3schools.com/howto/howto_js_copy_clipboard.asp
How To Copy to Clipboard
www.w3schools.comDavid Revoy
•LilaTequila
•David Revoy
•Adora (She/Her) :flag_transgender:
•:terminyal: 𝙹𝚎𝚛𝚎𝚖𝚢 :~$
•Thanks for sharing the code 😄
Jaime Herazo
•Excellent idea!
lebout2canap ⏚
•@davidrevoy
David Revoy
•Marco Bresciani
•Touhoppai
•J'espère que l'on aura, à terme, plus d'implémentation activityPub depuis les sites de blog (je crois que WordPress le propose depuis peu) pour que le post avec un lien vers le billet de blog puisse être directement le contenu du blog. Ce serait génial d'arriver jusque là !
David Revoy
•Nartance
•David Revoy
•Nemiryah
•Julian Fietkau
•If you'd like to read more about how to render custom emoji and other details, I recommend @cassidy's blog post about his implementation: https://cassidyjames.com/blog/fediverse-blog-comments-mastodon/
Julian’s Blog
Julian FietkauDavid Revoy
•@cassidy
Bloodywing
•but it looks fine so far.
David Revoy
•YoYunix
•David Revoy
•Right now my system on the blog has a cache of 1h for the post of the week, 4h for the post of the month, and 12h after that. Let see in 5 years if If Mastodon IDs are stable 😉
YoYunix
•David Revoy
•nunux
•😉
ApisNecros
•David Revoy
•jcarnu 🐘🐧
•I love all your créations, they are so joyful !
David Revoy
•Nomis
•David Revoy
•Dad
•Valvin (framapiaf)
•David Revoy
•Adam Dalliance
•Glad you've found a way that works.
farcaller
•David Revoy
•maxmoon 🌱
•David Revoy
•1. Bandwidth (with many visitors, hot-linking them to all instance all the time is pretty heavy)
2. Privacy. Hotlinking them would give also log to instance owners of who connect to my website.
3. Loading speed: waiting for all servers to get pictures.
4. Copyright, and/or trolling possibly with p0rn or gore.
5. Aesthetic: I love the cat avatars https://www.peppercarrot.com/extras/html/2016_cat-generator/index.php 🙂
Cat Avatar Generator
www.peppercarrot.commaxmoon 🌱
•Thanks for the explanation.
David Revoy
•Noe 🐝✨
•Marlene Breitenstein Art
•Now I'm wondering if the ActivityPub plugin for WordPress allows for comments. (I should really get that re-set up on my web site, the first time I didn't use the right username, and never got back to it...)
David Revoy
•David Revoy
•RupertReynolds
•Wolthera
•I think the authentication token is also necessary for mastodon instances that have authorized fetch enabled, because the point of that is to ensure randos don't just get to have info without the server being sure said rando isn't trying to block evade or whatever, but not 100% sure.
David Revoy
•Ollie
•Given you said spam was a problem with the previous commenting system, does this mean you consider Mastodon to be reasonably free from spam?
I sort of live in fear that Mastodon might suffer an influx of bots. Especially given it's decentralised, so presumably any instance could contribute unless your instance admin defederates from them.
David Revoy
•I received insult, p0rn, spam, but very rarely, and it was removed after a simple click on the three dots and reporting them. Actually, I wish this post will attract one or two post of this type. I'm curious if the API would list the message if I block an account.
Roni Laukkarinen
•Anthony Bosio
•see also https://mastodon.blaede.family/@cassidy/110669429936617026
Cassidy James Blaede
2023-07-06 22:11:27
David Revoy
•Anthony Bosio
•AppleTalk
•Klebs (Les Ateliers PHV)
•En passant, je suis ravi que tu aies trouvé un autre moyen de rester au courant des opinions de tes lecteurs.
Raghukamath
•David Revoy
•The only thing to keep is a cache of maximum 24h so it is always removing or applying the edit into the due 24h legal date.
I'm planning to add soon an 'emergency refresh' button (just an action that force a cache update for the current article. It might be convenient in case of a very nasty comment. 😺
👻 ~/hyde 🎃
•Well done 👍
Nartagnan ⏚
•Kosmimatis🔥💍
•loaExMachina
•thgs
•Or maybe there is an issue with that as the initial post you made is lost? (So all comments along with it have no real reference).
David Revoy
•I'll try to update a tiny bit the display part of the code this afternoon/evening (on the same page) : I had feedback on how to improve security and also I found aesthetic improvements for situations I met on the way (eg. differentiate video/image/other in attachment, or removing direct/private message from the listing with the token).
David Revoy
•David Revoy / MastoComBlog · GitLab
GitLabRitzga
•David Revoy
•Alex
•@remram44
Aki Goupil
•David Revoy
•I may have found an alternative solution to my blog's comment system.
David RevoyAki Goupil
•David Revoy
•@bitinn