[Plugin: Top Contributors] Added code to distinguish top contributors by stars
-
hey!
Liked you plugin, changed it to distinguish top contributors by adding different number of stars depending on the contributor rating.
here’s the code (used around line 876 in top-contributors.php)if($jmetc_options['show_icon'] == 1) { $stUser = strip_tags($user); $haystack = $jmetc_options['toplist']; if(in_array($stUser,$haystack )) { $nStars = count($haystack); for($i=0;$i<$nStars;$i++) { if($stUser==$haystack[$i]) { $nStars-=$i; break; } } $string= $user; for($i=0;$i<$nStars;$i++) { $string .= ' <img class="tc-icon" src="' . JMETC_PLUGINPATH . 'images/' . $jmetc_options['icon'] . '" alt="" title="Активний дописувач" />'; } //$string = $user . ' <img class="tc-icon" src="' . JMETC_PLUGINPATH . 'images/' . $jmetc_options['icon'] . '" alt="" title="Активний дописувач" />'; } }
https://www.ads-software.com/extend/plugins/top-contributors/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Top Contributors] Added code to distinguish top contributors by stars’ is closed to new replies.