Using
PHx custom modifiers you can make a User Rating modifier to output images based on post count. Make a snippet named
phx:rating and save the following code. This is an extremely simple example, 1 post =
, 2 posts =
, 3 posts =
, 4+ posts =
<?php
$defaultValue = " <img src=assets/images/icons/star.png />";
if (intval($output) <= '1') {
$newvalue = '<img src=assets/images/icons/bronze.png />';
}
elseif (intval($output) <= '2') {
$newvalue = '<img src=assets/images/icons/silver.png />';
}
elseif (intval($output) <= '3') {
$newvalue = '<img src=assets/images/icons/gold.png />';
}
else {
$newvalue = $defaultValue;
}
return $newvalue;
?>
In your Jot template add
[+comment.userpostcount:rating+]
where you want the rating.