PHP code example of nlybe / ratings
1. Go to this page and download the library: Download nlybe/ratings library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nlybe / ratings example snippets
$vars['rate_label'] = elgg_echo('custom:rate:title');
$vars['comment_label'] = elgg_echo('custom:comment:label');
echo ratings_elgg_view_comments($entity, $add_comment, $vars);
/* @param \ElggEntity $entity The entity to view comments of
* @param bool $add_comment Include a form to add comments?
* @param array $vars Variables to pass to comment view
*/
elgg_view('ratings/ratings', ['entity' => $entity]);