Changeset 1769


Ignore:
Timestamp:
Jan 30, 2007, 8:00:17 AM (17 years ago)
Author:
vdigital
Message:

Issue 0000614: Display hits under thumbnails like comments counter

  • Comments are not plurial < 2
  • hits and comments have specific classes for css control
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_default.inc.php

    r1763 r1769  
    111111    $template->assign_block_vars(
    112112      'thumbnails.line.thumbnail.nb_hits',
    113       array('HITS'=> l10n_dec('%d hit', '%d hits', $row['hit'])));
     113      array(
     114      'HITS'=> l10n_dec('%d hit', '%d hits', $row['hit']),
     115      'CLASS'=> set_span_class($row['hit']) . ' nb-hits',
     116      )
     117    );
     118   
    114119  }
    115120
     
    166171    $template->assign_block_vars(
    167172      'thumbnails.line.thumbnail.nb_comments',
    168       array('NB_COMMENTS'=>$row['nb_comments']));
     173      array(
     174        'NB_COMMENTS'=> l10n_dec('%d comment', '%d comments',
     175                        $row['nb_comments']),
     176        'CLASS'=> set_span_class($row['nb_comments']) . ' nb-comments',
     177      )
     178    );
    169179  }
    170180
  • trunk/include/functions_html.inc.php

    r1748 r1769  
    719719  trigger_action('set_status_header', $code, $text);
    720720}
     721
     722/**
     723 * set a class to display a counter
     724 * .zero .one .2nmore
     725 */
     726function set_span_class($count)
     727{
     728  if ($count > 1)
     729  {
     730    return '2nmore';
     731  }
     732  return ( $count == 0 ) ? 'zero':'one';
     733}
    721734?>
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r1763 r1769  
    300300$lang['%d new comment'] = '%d new comment';
    301301$lang['%d new comments'] = '%d new comments';
     302$lang['%d comment'] = '%d comment';
     303$lang['%d comments'] = '%d comments';
    302304$lang['%d hit'] = '%d hit';
    303305$lang['%d hits'] = '%d hits';
  • trunk/language/fr_FR.iso-8859-1/common.lang.php

    r1763 r1769  
    300300$lang['%d new comment'] = '%d nouveau commentaire utilisateur';
    301301$lang['%d new comments'] = '%d nouveaux commentaires utilisateur';
     302$lang['%d comment'] = '%d commentaire';
     303$lang['%d comments'] = '%d commentaires';
    302304$lang['%d hit'] = 'vue %d fois';
    303305$lang['%d hits'] = 'vue %d fois';
  • trunk/template/yoga/theme/p0w0/theme.css

    r1755 r1769  
    249249        cursor:pointer
    250250}
     251
     252.zero { display: none }
     253.one { }
     254.2nmore { }
     255
    251256/* nice looking month calendar*/
    252257TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
  • trunk/template/yoga/theme/wipi/theme.css

    r1755 r1769  
    239239        cursor:pointer
    240240}
     241
     242.zero { display: none }
     243.one { }
     244.2nmore { }
     245
    241246/* nice looking month calendar*/
    242247TD.calDayCellEmpty, TD.calDayCellFull { border: 1px solid gray;}
     
    247252.calForeDate { color: #fff; }
    248253.virtual_cat { background: #222 !important; }
     254
     255.PWG {
     256  font-family: verdana, arial, helvetica, sans-serif !important;
     257  font-size: 0.9em;
     258  font-weight: normal;
     259  letter-spacing: 0px;
     260}
     261a.PWG { border: 0px; }
     262a.PWG .P { color : #f92; }
     263a.PWG .W { color : #aaa; }
     264a.PWG .G { color : #69c; }
     265a.PWG:hover .P { color : #69c; }
     266a.PWG:hover .G { color : #f92; }
  • trunk/template/yoga/thumbnails.tpl

    r1763 r1769  
    2222      {thumbnails.line.thumbnail.IMAGE_TS}
    2323      <!-- BEGIN nb_comments -->
    24       <br />{thumbnails.line.thumbnail.nb_comments.NB_COMMENTS} {lang:comments}
     24      <span class="{thumbnails.line.thumbnail.nb_comments.CLASS}">
     25        <br />
     26        {thumbnails.line.thumbnail.nb_comments.NB_COMMENTS}
     27      </span>
    2528      <!-- END nb_comments -->
    2629      <!-- BEGIN nb_hits -->
    27       <br />{thumbnails.line.thumbnail.nb_hits.HITS}
    28       <!-- END nb_comments -->
     30      <span class="{thumbnails.line.thumbnail.nb_hits.CLASS}">
     31        <br />
     32        {thumbnails.line.thumbnail.nb_hits.HITS}
     33      </span>
     34      <!-- END nb_hits -->
    2935      </span>
    3036    </span>
Note: See TracChangeset for help on using the changeset viewer.