aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/category_default.inc.php14
-rw-r--r--include/functions_html.inc.php13
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php2
-rw-r--r--language/fr_FR.iso-8859-1/common.lang.php2
-rw-r--r--template/yoga/theme/p0w0/theme.css5
-rw-r--r--template/yoga/theme/wipi/theme.css18
-rw-r--r--template/yoga/thumbnails.tpl12
7 files changed, 61 insertions, 5 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index db8091c3e..fed872691 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -110,7 +110,12 @@ foreach ($pictures as $row)
{
$template->assign_block_vars(
'thumbnails.line.thumbnail.nb_hits',
- array('HITS'=> l10n_dec('%d hit', '%d hits', $row['hit'])));
+ array(
+ 'HITS'=> l10n_dec('%d hit', '%d hits', $row['hit']),
+ 'CLASS'=> set_span_class($row['hit']) . ' nb-hits',
+ )
+ );
+
}
if ($conf['show_thumbnail_caption'])
@@ -165,7 +170,12 @@ SELECT COUNT(*) AS nb_comments
$row = mysql_fetch_array(pwg_query($query));
$template->assign_block_vars(
'thumbnails.line.thumbnail.nb_comments',
- array('NB_COMMENTS'=>$row['nb_comments']));
+ array(
+ 'NB_COMMENTS'=> l10n_dec('%d comment', '%d comments',
+ $row['nb_comments']),
+ 'CLASS'=> set_span_class($row['nb_comments']) . ' nb-comments',
+ )
+ );
}
//plugins need to add/modify sth in this loop ?
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';
+}
?>
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 5de07a9d7..ad03a30ff 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -299,6 +299,8 @@ $lang['%d comment to validate'] = '%d comment to validate';
$lang['%d comments to validate'] = '%d comments to validate';
$lang['%d new comment'] = '%d new comment';
$lang['%d new comments'] = '%d new comments';
+$lang['%d comment'] = '%d comment';
+$lang['%d comments'] = '%d comments';
$lang['%d hit'] = '%d hit';
$lang['%d hits'] = '%d hits';
$lang['%d new element'] = '%d new element';
diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php
index 73ec8159c..647f5fdc9 100644
--- a/language/fr_FR.iso-8859-1/common.lang.php
+++ b/language/fr_FR.iso-8859-1/common.lang.php
@@ -299,6 +299,8 @@ $lang['%d comment to validate'] = '%d commentaire utilisateur à valider';
$lang['%d comments to validate'] = '%d commentaires utilisateur à valider';
$lang['%d new comment'] = '%d nouveau commentaire utilisateur';
$lang['%d new comments'] = '%d nouveaux commentaires utilisateur';
+$lang['%d comment'] = '%d commentaire';
+$lang['%d comments'] = '%d commentaires';
$lang['%d hit'] = 'vue %d fois';
$lang['%d hits'] = 'vue %d fois';
$lang['%d new element'] = '%d nouvel élément';
diff --git a/template/yoga/theme/p0w0/theme.css b/template/yoga/theme/p0w0/theme.css
index f50b666af..e87174ba1 100644
--- a/template/yoga/theme/p0w0/theme.css
+++ b/template/yoga/theme/p0w0/theme.css
@@ -248,6 +248,11 @@ SPAN.calItem, SPAN.calItemEmpty
label {
cursor:pointer
}
+
+.zero { display: none }
+.one { }
+.2nmore { }
+
/* nice looking month calendar*/
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
diff --git a/template/yoga/theme/wipi/theme.css b/template/yoga/theme/wipi/theme.css
index 6460ee03d..e28625b12 100644
--- a/template/yoga/theme/wipi/theme.css
+++ b/template/yoga/theme/wipi/theme.css
@@ -238,6 +238,11 @@ SPAN.calItem, SPAN.calItemEmpty
label {
cursor:pointer
}
+
+.zero { display: none }
+.one { }
+.2nmore { }
+
/* nice looking month calendar*/
TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
@@ -246,3 +251,16 @@ TD.calDayCellEmpty { color: silver; }
.calBackDate { color: #000; }
.calForeDate { color: #fff; }
.virtual_cat { background: #222 !important; }
+
+.PWG {
+ font-family: verdana, arial, helvetica, sans-serif !important;
+ font-size: 0.9em;
+ font-weight: normal;
+ letter-spacing: 0px;
+}
+a.PWG { border: 0px; }
+a.PWG .P { color : #f92; }
+a.PWG .W { color : #aaa; }
+a.PWG .G { color : #69c; }
+a.PWG:hover .P { color : #69c; }
+a.PWG:hover .G { color : #f92; }
diff --git a/template/yoga/thumbnails.tpl b/template/yoga/thumbnails.tpl
index 8bf9d8e01..d5c1a906d 100644
--- a/template/yoga/thumbnails.tpl
+++ b/template/yoga/thumbnails.tpl
@@ -21,11 +21,17 @@
<!-- END category_name -->
{thumbnails.line.thumbnail.IMAGE_TS}
<!-- BEGIN nb_comments -->
- <br />{thumbnails.line.thumbnail.nb_comments.NB_COMMENTS} {lang:comments}
+ <span class="{thumbnails.line.thumbnail.nb_comments.CLASS}">
+ <br />
+ {thumbnails.line.thumbnail.nb_comments.NB_COMMENTS}
+ </span>
<!-- END nb_comments -->
<!-- BEGIN nb_hits -->
- <br />{thumbnails.line.thumbnail.nb_hits.HITS}
- <!-- END nb_comments -->
+ <span class="{thumbnails.line.thumbnail.nb_hits.CLASS}">
+ <br />
+ {thumbnails.line.thumbnail.nb_hits.HITS}
+ </span>
+ <!-- END nb_hits -->
</span>
</span>
</li>