ScriptsMill Comments Script v1.07 ReadMe

Requirements:

-PHP 7.4 or PHP 8.5 and later, with mysqli (mysqlnd) and OpenSSL extensions
-allow_url_fopen enabled for CAPTCHA verification over HTTPS
-A configured mail transport for comment notifications
-MySql database: Create a Mysql database on your server (UNLESS you already have one!)
 to store the necessary tables.

========================================================================
Installation instructions:

1. Unpack the script files to a directory on your hard disk.

2. Upload all the script files to a directory on your server
   eg: /comments

   Make sure you keep the exact file structure.

3. Open install.php in your browser and follow the instructions.
   In case of permissions problems create config.php manually and
   copy/paste content that install script will generate for you
   into it.

4. Select Google reCAPTCHA v2 (checkbox), Cloudflare Turnstile, or no CAPTCHA.
   For reCAPTCHA, choose an "I'm not a robot" checkbox key, register your
   domain and keep domain validation enabled. Enter the site key and secret
   key in the installer. The server must be able to reach www.google.com
   over HTTPS. Google's public test keys are for testing only.
   https://www.google.com/recaptcha/admin/create
   https://developers.google.com/recaptcha/docs/faq

   For Turnstile, create a widget for your domain and enter its site and
   secret keys. Leave the other provider's fields blank.
   https://developers.cloudflare.com/turnstile/get-started/

   You can also configure the flood protection pause and spam keyword blacklist.
   Selecting no CAPTCHA disables spam checks, including the keyword blacklist;
   flood protection still applies.

5. Delete install.php from your server after installation. Edit config.php if
   needed. The installer sets dev_mode to false and never supplies test keys.

========================================================================

========================================================================
Upgrading an existing installation

Back up your database, config.php, templates and language customizations first.
Do not run install.php for an existing installation. Upload the new runtime
files and merge any template customizations. Preserve your existing config.php,
database settings, table prefix and copy_random_seed so unsubscribe links keep
working. Existing database tables can be retained.

Add or update these settings in config.php (see config-dist.php for reference):

$COM_CONF['dev_mode'] = false;
$COM_CONF['check_for_spam'] = 1;
$COM_CONF['check_for_spam_method'] = "recaptcha";
$COM_CONF['recaptcha_sitekey'] = 'YOUR_RECAPTCHA_V2_SITE_KEY';
$COM_CONF['recaptcha_secretkey'] = 'YOUR_RECAPTCHA_V2_SECRET_KEY';
$COM_CONF['cloudflare_turnstile_sitekey'] = '';
$COM_CONF['cloudflare_turnstile_secret'] = '';
$COM_CONF['spam_keywords'] = "viagra,casino,free money,href=";

For Cloudflare Turnstile, set check_for_spam_method to "cloudflare_turnstile"
and fill in cloudflare_turnstile_sitekey and cloudflare_turnstile_secret.
To disable spam checks, set check_for_spam to 0 and check_for_spam_method to "".
For reCAPTCHA, use the v2 checkbox site key and its matching secret key as
shown above. If you customized the comment form, use the markup from
templates/default.php or templates/gray.php and keep the widget inside the
form.

Akismet is no longer a supported spam checking method.
Delete install.php after uploading the release.

========================================================================

========================================================================
How to use

To show the comments on a page copy and paste the following code:

If your site uses php:

 <?php require("/path/to/your/www-home/comments/comments.php"); ?>

                 OR

 <?php virtual("/comments/comments.php"); ?>
 (doesn't work on some server configurations)

 You can find out what is path to your www-home with code like that:
 <?php echo dirname(__FILE__); ?>

 Actually if you don't know paths on your server it is better use this code:
 <?php require(dirname(__FILE__) . "/comments/comments.php"); ?>

 DO NOT use this script like that: require("http://yoursite.com/comments/comments.php").
 In this case you'll get the same comments for all your pages.

If your site uses SSI:

 <!--#include virtual="/comments/comments.php" -->

If your site uses ASP:

 <!--#include file="/comments/comments.php" -->
 (not tested)

The script recognizes itself the page where it is included and displays comments for this page.

You can create your own templates in "./templates" folder or edit existing files to customize
appearance of the comments. You can find several language files in "./lang" folder and you can
create your own language file there. Don't forget to edit "config.php" in order to use your
tempalte or language file. Please send me your templates and language files to info@scriptsmill.com,
I will include them to the packadge.
========================================================================

For support and new versions please visit http://www.scriptsmill.com/

PHP 7.4 and 8.5 compatibility checks:

Run: php -d short_open_tag=0 tests/compatibility.php
The checks lint every PHP file and exercise templates, input handling,
reCAPTCHA v2, Turnstile, and the bundled Akismet helpers with E_ALL.
Installer checks: php -d short_open_tag=0 tests/installer.php
Database integration is not included in these checks; test against a disposable
copy of your MySQL database before deployment. Local maintenance utilities
(test.php, spam_test.php, clear_db.php) are excluded from the release archive.
