XOOPS Rating 0.3.1 Alpha 1 released for testing/contributions!
Rating module for XOOPS CMS, originally developed by Cointin Maxime (Kraven30), is an extension for XOOPS 2.5.11 that allows you to easily add a voting system to the inside of another module. You can add as many modules as you want. For example, to rate a hotel, restaurant service, quality of food, price, etc.
It can be used by any module, it works the same way as the module Tag. It uses the jquery plugin 'jRating'.
This update is just a proof of concept for testing, so it might change over time as we gain more experience with it
DOWNLOAD: https://github.com/mambax7/rating/releasesFORK: https://github.com/mambax7/rating/ ISSUES/BUGS: Please report all issues on
GitHubREQUIREMENTS: - XOOPS 2.5.10
- PHP 7.3+
It was tested on
PHP 8.012 and
PHP 8.1 RC-5HOW TO USE IT:This is an example of usage based on the Adslight module:
1) In the Admin of the Rating module, create a new "module rating", and select your module that you want to use:
2) Add the file name where you will want the Rating to appear (here:
viewads.php)
3) In
viewads.php add somewhere:
if (is_dir('../rating')){
include XOOPS_ROOT_PATH .'/modules/rating/include/rating.php';
$GLOBALS['xoopsTpl']->assign('ratingPerm', true);
$GLOBALS['xoopsTpl']->assign('ratings', rating($lid));
} else {
$GLOBALS['xoopsTpl']->assign('ratingPerm', false);
}
4) In the template:
adslight_item.tpl add before the
<{if $ratingPerm}>
<{include file='./../modules/rating/templates/rating.tpl'}>
<{/if}>
And that's it.
You should have now a rating option in your Adslight module: