static $ismoving;
static $strmovehere;
static $strmovefull;
+ static $strunreadpostsone;
+ static $strunreadpostsnumber;
$labelformatoptions = New stdClass;
$strmovehere = get_string("movehere");
$strmovefull = strip_tags(get_string("movefull", "", "'$USER->activitycopyname'"));
}
+ $strunreadpostsone = get_string('unreadpostsone', 'forum');
+ $strunreadpostsnumber = get_string('unreadpostsnumber', 'forum');
}
$labelformatoptions->noclean = true;
get_current_group($course->id) : false;
$unread = forum_tp_count_forum_posts($mod->instance, $groupid) -
forum_tp_count_forum_read_records($USER->id, $mod->instance, $groupid);
- $cssclass = ($unread > 0) ? 'unread' : 'read';
- echo '<span class="'.$cssclass.'"> '.get_string('unreadpostsnumber', 'forum', $unread).'.</span>';
+ if ($unread == 1) {
+ echo '<span class="unread"> '.$strunreadpostsone.' </span>';
+ } else if ($unread) {
+ echo '<span class="unread"> '.$strunreadpostsnumber.' </span>';
+ }
}
if ($isediting) {
$string['subscriptions'] = 'Subscriptions';
$string['unread'] = 'Unread';
$string['unreadposts'] = 'Unread posts';
-$string['unreadpostsnumber'] = '$a posts unread';
+$string['unreadpostsnumber'] = '$a unread posts';
+$string['unreadpostsone'] = '1 unread post';
$string['unsubscribe'] = 'Unsubscribe from this forum';
$string['unsubscribed'] = 'Unsubscribed';
$string['unsubscribeshort'] = 'Unsubscribe';