# hashover **Repository Path**: cuiyihang/hashover ## Basic Information - **Project Name**: hashover - **Description**: 免费和开源的PHP评论系统1.0 - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2021-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README HashOver 1.0.3rc4 ======== **HashOver** is a PHP comment system intended as a replacement for services like Disqus. HashOver is free and open source software, under the [GNU Affero General Public License](http://www.gnu.org/licenses/agpl.html). HashOver adds a "comment section" to any website, by placing a few simple lines of JavaScript or PHP to the source code of any webpage. HashOver is a self-hosted system and allows completely anonymous comments to be posted, the only required information is the comment itself. Notice --- This is the current stable version of HashOver, it is not actively developed, instead work on the next version is done on the "hashover-next" repository. Code contributions ("Pull Requests") to/of this repository that add new functionality will be rejected. Please submit issues, clone and commit changes to the following repository instead: https://github.com/jacobwb/hashover-next Notable Features ---
  • Restricted use of HTML tags
  • Display externally hosted images
  • Five comment sorting methods
  • Multiple languages
  • Spam filtering
  • IP address blocking
  • Notification emails
  • Threaded replies
  • Avatar icons
  • Comment editing & deletion
  • Comment RSS feeds
  • Likes
  • Popular comments
  • Comment layout templates
  • Administration
  • Automatic URL links
  • Customizable HTML
  • Customizable CSS
  • Referrer checking
  • Permalinks
Documentation === **Prerequisites** There are two methods of using HashOver, both methods require doing the following first: 1. Download this file: https://github.com/jacobwb/hashover/archive/master.zip. 2. Extract the files under "hashover-master" at or upload them to your website's document root. 3. Give (chmod) all the files permissions "0644" (readable by all and writable by owner). 4. Give directories and PHP files permissions "0755" (readable by all, writable by owner, executable by all). 5. Give "hashover/pages" directory permission "0777" (readable, writable and executable by all). > It is not recommended that permissions "0777" ever be used. For security reasons, the "hashover/pages" directory should be "given" (chown) to the user that the server is configured to execute PHP scripts as, for example "www-data". And then simply give the "hashover/pages" directory permissions "0755".** **Required Setup** **The following actions are required before using HashOver.** Edit the file `hashover/scripts/secrets.php` and make the following changes. Set a UNIQUE 8 to 32 character value for the `$encryption_key` variable. Set the `$notification_email` variable to any valid e-mail address. Set a UNIQUE value for the `$admin_nickname` variable. Set a UNIQUE value for the `$admin_password` variable. **Using HashOver** Once the files have successfully been downloaded, extracted, proper permissions set, and setup, all you need to do is copy the code to one of the two following implementation methods and paste it into your webpage(s): **JavaScript method (recommended)** ```
``` **PHP method** ``` ``` **Optional** The following JavaScript tag may be used with any or all of the following variables to disable specific input fields, by placing it before the ` ``` In the file `hashover/scripts/php-mode.php` a list of variables nearly identical to the ones mentioned above will be found that allow specific input fields to be disabled. You may set the "count_link" query to display only a comment count linking to a specified page's comments. For example the following code will display "9 Comments (11 counting replies)". ``` ``` Identify an HTML element as "cmtcount" `` for example, and that element will display a comment count. This is useful in creating comment "widgets" / "buttons" that display the comment count and link to the comment section. The following code displays a link similar to the previous code: ``` Comments ``` You may defer loading the comment's JavaScript with this code: ```
``` Or load the comment's JavaScript asynchronously: ```
``` **Optional Settings** In the file `hashover/scripts/settings.php` settings for things such as language, default name, HTML design template, avatar icons, "Popular Comments", spam checking, default timezone, and more may be adjusted. **Styling the Comments** To change how the comments look, use a [Cascading Style Sheet](http://en.wikipedia.org/wiki/Cascading_Style_Sheets) (CSS.) HashOver comes with a default style sheet named "comments.css" under the "hashover" directory. Using the JavaScript method this style sheet is automatically placed in the page when the comments are displayed. This is not true for the PHP method. However, in both methods it is recommended that the following `` element be placed in the `` element of your website's webpage(s): ``` ``` Alternatively, the following may be placed at the top of an existing style sheet: ``` @import url('/hashover/comments.css'); ``` **Need more control over how the comments look?** Editing the file `hashover/html-templates/default.html` allows you to move around the HTML elements of each comment, meaning you may change where each commenter's avatar icon and name appears, as well as where the date/permalinks, "Reply", "Edit", "Like" and "Top of Thread" links appear. However, rather than editing the `hashover/html-templates/default.html` file, it is recommended you edit a copy of that file, and then merely change the `$template` variable in the `hashover/scripts/settings.php` file. This way your changes won't be lost when you upgrade HashOver, and you will have a working fallback just in case. **HTML in comments** Users may post comments with a limited number of allowed HTML tags. These tags include ``, ``, ``, ``, `
`, ``, `