hashover-next icon indicating copy to clipboard operation
hashover-next copied to clipboard

A few questions for hashover

Open asantisan opened this issue 9 years ago • 6 comments

I am testing hashover locally, and i have a few questions if you can help me out, I would like to allow only registered users to post comments,

public $defaultName = 'Test'; // Default name to use when one isn't given

How can i use session data for this variable?

How can i run the admin to moderate the comments, for default there is no moderation right? how can i change this?

I have differents details pages for differents products in a store, but the comments are the same in each page, how can i change this?

Thanks in advance.

asantisan avatar Sep 07 '16 00:09 asantisan

Hello, @asantisan

I am testing hashover locally, and i have a few questions if you can help me out, I would like to allow only registered users to post comments,

Unfortunately there isn't an option to restrict comments to registered users. Depending on how your site is built, you could simply not include the HashOver JavaScript tag on the page unless the user is logged in. This would make it impossible for normal people to post unless they are logged in, but technically, it wouldn't stop a clever hacker from posting without being registered.

jacobwb avatar Sep 20 '16 09:09 jacobwb

public $defaultName = 'Test'; // Default name to use when one isn't given

How can i use session data for this variable?

The public $defaultName setting is the name used for anonymous comments when the commenter didn't give their name when the "Name" field is enabled but optional, or when the "Name" field is disabled. It's used when no name is stored with the comment, so it won't likely be useful in the way you need.

You will likely need to write a custom login method class.

See: hashover/scripts/defaultlogin.php as an example.

That is the default login method, which gets the name, password, e-mail, and website from browser cookies. You will need to write a class that sets these values based on the session data.

jacobwb avatar Sep 20 '16 09:09 jacobwb

How can i run the admin to moderate the comments, for default there is no moderation right? how can i change this?

The public $usesModeration setting set to true will enable comment moderation.

jacobwb avatar Sep 20 '16 09:09 jacobwb

I have differents details pages for differents products in a store, but the comments are the same in each page, how can i change this?

HashOver creates a thread for each unique web page URL it's used on, if you are getting the same comments for different URLs it's likely because you have a canonical URL set in the page's <meta> tags, or that the page uses the same URL for different products.

In either case, you should be able to get different threads for the different products by specifying the URL manually in the script tag, like so...

<script type="text/javascript" src="/hashover/hashover.js?url=http://example.com/products"></script>

To ensure the threads are different for each product, for example, there should be something unique about the URL indicating the difference. Depending on how your URLs are structured, you may just need to use the URL as-is, otherwise you may need to add something to the URL.

Like this...

<script type="text/javascript" src="/hashover/hashover.js?url=http://example.com/products%3Fitem=pocky"></script>

I hope that helps.

jacobwb avatar Sep 20 '16 09:09 jacobwb

The public $usesModeration setting set to true will enable comment moderation.

This does not work. Nothing happens. All commentaries are still published without moderation.

specxml avatar Jul 28 '17 23:07 specxml

Hi

Mahadream avatar Sep 11 '18 09:09 Mahadream