Giter Site home page Giter Site logo

phauer / comment-sidecar Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 6.0 668 KB

Lightweight, tracking-free, self-hosted comment service for web spaces supporting only PHP and MySQL

License: MIT License

PHP 28.03% Python 48.05% JavaScript 11.32% HTML 8.72% CSS 2.13% Dockerfile 1.74%

comment-sidecar's People

Contributors

pflugshaupt avatar phauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

comment-sidecar's Issues

[Solved] Some issues - wordfence-waf.php was it!

Tested with PHP 7.4 + PHP 8.1.4
MySQL 5.7.37
cPanel on shared hosting

Somehow in common.php this string did not for for me:

$handler = new PDO("mysql:host=".DB_HOST.":".DB_PORT.";dbname=".DB_NAME.

I had to remove the DB_PORT so the working line was:

$handler = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8",

After that posts arrived in the MySQL DB.

Note: Seems also to work fine with PHP 8.1.4


So today I tried a different domain..... and it failed

Tested with PHP 7.4 + PHP 8.1.4
MySQL 5.7.37
cPanel on shared hosting (all same as above)
CMS type: Hugo
Cloudflare: Yes

The whole SRC folder is in domain.com/comments. I get this errors:

Loading failed for the <script> with source “https://domain.com:3000/browser-sync/browser-sync-client.js?v=2.18.13”.

error code: 500

Another code 500:

https://domain.com/comments/comment-sidecar-js-delivery.php net::ERR_ABORTED 500

This gives errors too - but less so when I add the /comments/ path:

<script id="__bs_script__">//<![CDATA[
document.write("<script async src='https://HOST:3000/comments/browser-sync/browser-sync-client.js?v=2.18.13'><\/script>".replace("HOST", location.hostname));
//]]></script>

A bit puzzling why it works on one site but not on another on the same host.

[Solved]
I leave all of the above. The error.log gave the answer (next time I look there first). The CMS is Hugo (static) but ages ago it was Wordpress and hence the .htaccess still had some references to Wordfence. After I cleaned the .htaccess I can write to the db and go on with the installation.

How to show comment count?

I wanna show comment count but I cannot do it.

<button class="cs-expand-button {{BUTTON_CSS_CLASSES_ADD_COMMENT}}">Response (5)</button>
            <div class="cs-form"></div>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.