Comments (2)
Hey Juan,
thank you for the kind words :)
Yes, you can do that. The plugin is already using JavaScript for sending comments to kirby, the regular form action is a fallback only.
There is a POST
endpoint available under /komments/send
which takes the form values as body. So you can steal the form from the snippet in snippets/kommentform.php
. And have a look at the JS file in assets/komments.js
. Be aware that there are two hidden fields which are used for spam protection, so don't forget to add them, even if they aren't visible.
There is currently no api endpoint for getting the comment list, but I guess you'll do that on build time. The comments are stored in a structured field. I would recommend to use $komments = $kommentUtils->parseKomments($page->kommentsInbox());
as you can see in snippets/webmention-splitted.php
.
It may be that I will switch from structured field to sqlite in the future, so using $kommentUtils->parseKomments()
; will ensure that your comments show up even if their storage might be changed.
Let me know if there are any problems or questions.
Best,
Maurice
from komments.
Hi Maurice,
Great, thanks for the prompt and detailed answer. I'll give it a try and I'll let you know how it went.
Best,
Juan
from komments.
Related Issues (20)
- Incompatible with Commentions plugin HOT 14
- The automated release is failing 🚨
- Cannot read properties of undefined (reading 'id') HOT 3
- Cannot publish comments from the global comment page HOT 9
- Komments Pending label not translatable HOT 1
- Add support for strftime HOT 1
- Nested comments HOT 12
- Show reply handle in reply to a comment
- E-Mail notification for new comments HOT 17
- outbox.json file after saving HOT 2
- formFeedback not working HOT 5
- Labels not visible with 1.7.0 HOT 5
- Can't comment on translated content (with lang-specific slugs) HOT 11
- see commentors email so can respond personally HOT 1
- Bridgy Fed webmention comments don't have author email address HOT 2
- panel area not working with kirby 4 HOT 1
- Pending comments panel reads wrong property 'authorurl': Undefined array key "authorurl" HOT 2
- Backend comments are not showing HOT 7
- Pending Messages being shown on pages as if they were already approved HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from komments.