Using HashOver on Your Website
After you have finished the instructions on the Setup page using HashOver is very simple.
-
Place this JavaScript tag in either the
<head>
or<body>
element of your website...<script type="text/javascript" src="/hashover/comments.php"></script> -
Place an element with the ID attribute
hashover
on your website, this element is where the comments will appear. This element can be a simple<div>
or<section>
element, it just needs the correct ID attribute. The contents of this element are replaced with the comments, do not put anything you want to keep on the page inside this element.Here is an example of a simple element that will work...
<div id="hashover"></div>Note: If an element like this does not exist on the page HashOver will try to find a nice place for the comments to appear. If the JavaScript tag is in the
<body>
element the comments will appear directly before the JavaScript tag, if the JavaScript tag is in the<head>
element the comments will appear at the end of the<body>
element. -
This step is optional. You can place an element with the ID attribute
hashover-comment-count
on your website, this element will display a simple comment count, just a number. This is useful for creating comment widgets, links, or buttons that display the comment count and link to the comment section.
And you're done, congrats!
Best Practices
By default, HashOver will automatically add the configured theme CSS file to the
page. However, because the CSS file is only added to the page after the
JavaScript has finished loading and executing, the comments may appear without
any style until the CSS file is finished loading. To avoid this odd visual
effect, it is best to add the configured theme CSS directly to the
<head>
element.
You can do this by using a
<link>
element...
This example adds the default theme to the page, you will want to make sure you are using the same theme as configured in HashOver, otherwise both themes will get applied and you might not get the styling you expect.
General Security
It is recommended that HashOver be used over HTTPS, because sensitive user data such as email addresses and passwords will be sent to and from your server. Using normal HTTP opens the possibility of XSS and man-in-the-middle attacks. In Firefox, the HashOver comment form will tell the user that your website is not secure when your website is served over normal HTTP. If you are able to use HTTPS, please do.
HashOver on Windows
Windows has been officially supported since HashOver 2.0, there should not be any major issues with using HashOver on Windows. However, HashOver is primarily developed on and for UNIX operating systems, which are the primary operating systems used by the majority of web servers. If you have any issues with HashOver on Windows, please report them.