diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/functions.php | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/functions.php b/include/functions.php index 1ff18c8bb..e4e43cea8 100755 --- a/include/functions.php +++ b/include/functions.php @@ -1963,17 +1963,31 @@ } function get_score_pic($score) { - if ($score > 100) { - return "score_high.png"; + if ($score > 500) { + return "trending_up"; } else if ($score > 0) { - return "score_half_high.png"; + return "trending_up"; + } else if ($score < 0) { + return "trending_down"; + } else { + return "trending_neutral"; + } + } + + function get_score_class($score) { + if ($score > 500) { + $score_class = "score-high"; + } else if ($score > 0) { + $score_class = "score-half-high"; } else if ($score < -100) { - return "score_low.png"; + $score_class = "score-low"; } else if ($score < 0) { - return "score_half_low.png"; + $score_class = "score-half-low"; } else { - return "score_neutral.png"; + $score_class = "score-neutral"; } + + return $score_class; } function init_plugins() { |