hashover-next
hashover-next copied to clipboard
Like and Dislike No displayed ?
Like and Dislike No displayed ?
The configuration file is opened as follows
public $allowsLikes = true; // Whether a "Like" link is displayed
public $allowsDislikes = true; // Whether a "Dislike" link is displayed; allowing
public $setsCookies = true; // Whether cookies are enabled
But doesn't it show what's wrong with it ?
Once the comment is deleted, it will not be restored
Login administrator account can not be restored, or marked to delete?
public $countIncludesDeleted = false;
What's the function of this? I haven't found any changes or functions on the page
@jacobwb
The cause of this error is 'spl_autoload_register' in like.php fetching the wrong path. When 'spl_autoload_register' gets the classes it also gets the namespace. So from the current directory, it then adds `hashover\statistics.php for example, which is wrong because the classes are inside the scripts folder
To fix the issue and get the like/dislike working go to like.php and swap the current spl_autoload_register
with the below code:
spl_autoload_register(function ($class) {
$get_class = explode('\\', $class);
$class_name = array_pop($get_class);
$file_name = __DIR__ . "\\" . strtolower($class_name) . '.php'; // some systems may need to use forward slashes instead
if(!file_exists($file_name)) {
echo json_encode (array (
'error' => $file_name . ' file could not be included!'
));
exit;
}
include $file_name;
});
Hello, sorry for the long delay.
-
The like and dislike buttons are only displayed to other users, if you are logged in you will not see the like/dislike buttons for your own comments. The like and dislike buttons are also not displayed when HashOver is used from a remote website. Are either of these what is happening?
-
I don't know what you mean by this...
-
The public
$countIncludesDeleted
property does what it says, it includes the number of deleted comments in the comment counts. For example, if there are 15 comments, but 5 are deleted, by default the comment count will be 10, with this property set totrue
the comment count will be 15.
I hope this helps.