1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Added "No Replies" to forum status icons. (Bootstrap only)

This commit is contained in:
Cameron
2016-03-22 23:38:58 -07:00
parent e930ee68f1
commit 7c458dbed2
5 changed files with 31 additions and 9 deletions

View File

@@ -330,7 +330,8 @@ foreach ($forumList['parents'] as $parent)
$status = parse_parent($parent); $status = parse_parent($parent);
$pVars->PARENTSTATUS = $status; $pVars->PARENTSTATUS = $status;
$pVars->PARENTNAME = "<a id='".$frm->name2id($parent['forum_name'])."'>".$parent['forum_name']."</a>"; // $pVars->PARENTNAME = "<a id='".$frm->name2id($parent['forum_name'])."'>".$parent['forum_name']."</a>";
$pVars->PARENTNAME = $parent['forum_name'];
$forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT, $pVars); $forum_string .= $tp->simpleParse($FORUM_MAIN_PARENT, $pVars);
if (!count($forumList['forums'][$parent['forum_id']])) if (!count($forumList['forums'][$parent['forum_id']]))
{ {
@@ -338,7 +339,7 @@ foreach ($forumList['parents'] as $parent)
} }
else else
{ {
//TODO: Rework the restricted string //TODO: Rework the restricted string
foreach($forumList['forums'][$parent['forum_id']] as $f) foreach($forumList['forums'][$parent['forum_id']] as $f)
{ {
if ($f['forum_class'] == e_UC_ADMIN && ADMIN) if ($f['forum_class'] == e_UC_ADMIN && ADMIN)

View File

@@ -447,6 +447,7 @@ echo "<script type=\"text/javascript\">
require_once(FOOTERF); require_once(FOOTERF);
function parse_thread($thread_info) function parse_thread($thread_info)
{ {
global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed; global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed;
@@ -506,12 +507,20 @@ function parse_thread($thread_info)
$tVars->THREADDATE = $gen->convert_date($thread_info['thread_datestamp'], 'forum'); $tVars->THREADDATE = $gen->convert_date($thread_info['thread_datestamp'], 'forum');
$tVars->THREADTIMELAPSE = $gen->computeLapse($thread_info['thread_datestamp'],time(), false, false, 'short'); // convert_date($thread_info['thread_datestamp'], 'forum'); $tVars->THREADTIMELAPSE = $gen->computeLapse($thread_info['thread_datestamp'],time(), false, false, 'short'); // convert_date($thread_info['thread_datestamp'], 'forum');
/// ---------- Icon ----------------
$tVars->ICON = ($newflag ? IMAGE_new : IMAGE_nonew); $tVars->ICON = ($newflag ? IMAGE_new : IMAGE_nonew);
if ($tVars->REPLIES >= $forum->prefs->get('popular', 10)) if ($tVars->REPLIES >= $forum->prefs->get('popular', 10))
{ {
$tVars->ICON = ($newflag ? IMAGE_new_popular : IMAGE_nonew_popular); $tVars->ICON = ($newflag ? IMAGE_new_popular : IMAGE_nonew_popular);
} }
elseif(empty($tVars->REPLIES) && defined('IMAGE_noreplies'))
{
$tVars->ICON = IMAGE_noreplies;
}
$tVars->THREADTYPE = ''; $tVars->THREADTYPE = '';
if ($thread_info['thread_sticky'] == 1) if ($thread_info['thread_sticky'] == 1)
@@ -529,6 +538,16 @@ function parse_thread($thread_info)
$tVars->ICON = IMAGE_closed; $tVars->ICON = IMAGE_closed;
} }
// $tVars->ICON = $tVars->REPLIES;
// ------------------------------------------------------
$thread_name = strip_tags($tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off')); $thread_name = strip_tags($tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off'));
if(isset($thread_info['thread_options']['poll'])) if(isset($thread_info['thread_options']['poll']))
{ {

View File

@@ -133,6 +133,7 @@ define("LAN_FORUM_1017", "Go to"); // LAN_401 (p?)
define("LAN_FORUM_1018", "New topic"); define("LAN_FORUM_1018", "New topic");
// define("LAN_FORUM_1019", "Are you sure?"); // new // define("LAN_FORUM_1019", "Are you sure?"); // new
define("LAN_FORUM_1020", "Modify"); define("LAN_FORUM_1020", "Modify");
define("LAN_FORUM_1021", "No Replies");
// starting at LAN_FORUM_2xxx => forum_viewtopic.php // starting at LAN_FORUM_2xxx => forum_viewtopic.php

View File

@@ -17,9 +17,9 @@ if(deftrue("FONTAWESOME", 4)) {
define('IMAGE_e', 'e'); define('IMAGE_e', 'e');
define('IMAGE_new', $tp->toGlyph('fa-star', 'size=2x')); define('IMAGE_new', $tp->toGlyph('fa-star', 'size=2x'));
define('IMAGE_nonew', $tp->toGlyph('fa-comment-o', 'size=2x')); define('IMAGE_nonew', $tp->toGlyph('fa-comment', 'size=2x'));
define('IMAGE_new_small', $tp->toGlyph('fa-star')); define('IMAGE_new_small', $tp->toGlyph('fa-star'));
define('IMAGE_nonew_small', $tp->toGlyph('fa-comment-o')); define('IMAGE_nonew_small', $tp->toGlyph('fa-comment'));
define('IMAGE_new_popular', $tp->toGlyph('fa-comments', 'size=2x')); define('IMAGE_new_popular', $tp->toGlyph('fa-comments', 'size=2x'));
define('IMAGE_nonew_popular', $tp->toGlyph('fa-comments-o', 'size=2x')); define('IMAGE_nonew_popular', $tp->toGlyph('fa-comments-o', 'size=2x'));
define('IMAGE_new_popular_small', $tp->toGlyph('fa-comments')); define('IMAGE_new_popular_small', $tp->toGlyph('fa-comments'));
@@ -32,7 +32,8 @@ define('IMAGE_announce', $tp->toGlyph('fa-bullhorn', 'size=2x'));
define('IMAGE_announce_small', $tp->toGlyph('fa-bullhorn')); define('IMAGE_announce_small', $tp->toGlyph('fa-bullhorn'));
define('IMAGE_closed_small', $tp->toGlyph('fa-lock')); define('IMAGE_closed_small', $tp->toGlyph('fa-lock'));
define('IMAGE_closed', $tp->toGlyph('fa-lock', 'size=2x')); define('IMAGE_closed', $tp->toGlyph('fa-lock', 'size=2x'));
define('IMAGE_noreplies', $tp->toGlyph('fa-comment-o', 'size=2x'));
define('IMAGE_noreplies_small', $tp->toGlyph('fa-comment-o'));
define('IMAGE_track', $tp->toGlyph('fa-bell')); define('IMAGE_track', $tp->toGlyph('fa-bell'));
define('IMAGE_untrack', $tp->toGlyph('fa-bell-o')); define('IMAGE_untrack', $tp->toGlyph('fa-bell-o'));

View File

@@ -341,8 +341,8 @@ $FORUM_VIEWFORUM_TEMPLATE['sub-item'] = "<tr><td>{NEWFLAG}</td>
$FORUM_VIEWFORUM_TEMPLATE['sub-footer'] = ""; $FORUM_VIEWFORUM_TEMPLATE['sub-footer'] = "";
$FORUM_VIEWFORUM_TEMPLATE['divider-important'] = "<tr><th colspan='2'>".LAN_FORUM_1006."</th><th>".LAN_FORUM_0003."</th><th class='hidden-xs'>".LAN_FORUM_1005."</th><th class='hidden-xs'>".LAN_FORUM_0004."</th></tr>"; $FORUM_VIEWFORUM_TEMPLATE['divider-important'] = "<tr><th colspan='2'>".LAN_FORUM_1006."</th><th class='text-center'>".LAN_FORUM_0003."</th><th class='hidden-xs text-center'>".LAN_FORUM_1005."</th><th class='hidden-xs'>".LAN_FORUM_0004."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['divider-normal'] = "<tr><th colspan='2'>".LAN_FORUM_1007."</th><th >".LAN_FORUM_0003."</th><th class='hidden-xs'>".LAN_FORUM_1005."</th><th class='hidden-xs'>".LAN_FORUM_0004."</th></tr>"; $FORUM_VIEWFORUM_TEMPLATE['divider-normal'] = "<tr><th colspan='2'>".LAN_FORUM_1007."</th><th class='text-center' >".LAN_FORUM_0003."</th><th class='hidden-xs text-center'>".LAN_FORUM_1005."</th><th class='hidden-xs'>".LAN_FORUM_0004."</th></tr>";
$FORUM_VIEWFORUM_TEMPLATE['footer'] = "</table> $FORUM_VIEWFORUM_TEMPLATE['footer'] = "</table>
<div class='row row-fluid'> <div class='row row-fluid'>
@@ -370,7 +370,7 @@ $FORUM_VIEWFORUM_TEMPLATE['iconkey'] = "
<div class='row' > <div class='row' >
<div class='col-sm-3 col-xs-6'>".IMAGE_new_popular_small." ".LAN_FORUM_0039." ".LAN_FORUM_1010."</div> <div class='col-sm-3 col-xs-6'>".IMAGE_new_popular_small." ".LAN_FORUM_0039." ".LAN_FORUM_1010."</div>
<div class='col-sm-3 col-xs-6'>".IMAGE_nonew_popular_small." ".LAN_FORUM_0040." ".LAN_FORUM_1010."</div> <div class='col-sm-3 col-xs-6'>".IMAGE_nonew_popular_small." ".LAN_FORUM_0040." ".LAN_FORUM_1010."</div>
<div class='col-sm-3 col-xs-6'>".IMAGE_stickyclosed_small." ".LAN_FORUM_1012."</div> <div class='col-sm-3 col-xs-6'>".IMAGE_noreplies_small." ".LAN_FORUM_1021."</div>
<div class='col-sm-3 col-xs-6'>".IMAGE_closed_small." ".LAN_FORUM_1014."</div> <div class='col-sm-3 col-xs-6'>".IMAGE_closed_small." ".LAN_FORUM_1014."</div>
</div> </div>
"; ";