aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2007-01-30 07:00:17 +0000
committervdigital <vdigital@piwigo.org>2007-01-30 07:00:17 +0000
commit0a2c5204369bdbf4f8b761444056d90c15b98317 (patch)
treeabcf060e473d7a673b476f2677737f10cca97a0d /include/functions_html.inc.php
parent2f70d58b2243454085035177e4a6ab777a3bf55c (diff)
Issue 0000614: Display hits under thumbnails like comments counter
- Comments are not plurial < 2 - hits and comments have specific classes for css control git-svn-id: http://piwigo.org/svn/trunk@1769 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r--include/functions_html.inc.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 48c05ea06..53690211b 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -718,4 +718,17 @@ function set_status_header($code, $text='')
header("Status: $code $text");
trigger_action('set_status_header', $code, $text);
}
+
+/**
+ * set a class to display a counter
+ * .zero .one .2nmore
+ */
+function set_span_class($count)
+{
+ if ($count > 1)
+ {
+ return '2nmore';
+ }
+ return ( $count == 0 ) ? 'zero':'one';
+}
?>