jacobwb / hashover

Free and Open Source PHP Comment System
http://tildehash.com/?page=hashover
GNU Affero General Public License v3.0
255 stars 30 forks source link

Using only the backend #35

Closed CodeWithOz closed 3 years ago

CodeWithOz commented 4 years ago

Nice library! How "easily" can I use only the backend of Hashover? I don't want to display a typical comment section but I do want to have the backend, so I'm thinking it may be more efficient to setup and configure the backend, but use my own code to post comments to the backend. I can see that HashOver matches comment sections to urls, so I think that's something I'll have to address. What other concerns will I have to deal with? Thanks!

jacobwb commented 3 years ago

Have a look at the /hashover/backend/form-actions.php file, that is the file HashOver uses for all of its forms, you can send comments to that file using POST requests to post comments, edit them, and delete them. To send the requests it would be easy to create a form of your own with the same kind of fields as HashOver.

HashOver does not match comment sections to URLs, you can use any ID you want.

The thread is actually sent to the backend using a hidden field in the form:

<input type="hidden" name="thread" value="test-page-html">

The value of this input can be whatever you want, it will be converted to an alphanumeric ID on the backend. It is just the default behavior that HashOver uses the URL to decide what thread to show.