Replace Thread Icons with simple CSS indicators

Ashley
Offline
Administrator
Posts: 17
Threads: 9
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA

Ashley
Offline
Administrator

Posts: 17
Threads: 9
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA
In this tutorial we will remove the stock MyBB Thread Icons and replace them with simple CSS indicators. The end result will look like:

[Image: thread-icons.png]

This tutorial requires php in templates plugin, which can be downloaded from:
php in templates

We all also need Fontawesome. If you don't have it already, you can add this link to your headerinclude template:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

After completing the above steps, do the following:

1) Add the following to the bottom of thread_status.css
Code:
.mybb-flex {
  display: -ms-flexbox !important;
  display: flex !important;
  -ms-flex-pack: justify !important;
  justify-content: space-between !important;    
}

.mybb-flex-2 {
  display: -ms-flexbox !important;
  display: flex !important;    
}

.thread-icon {
    margin-left: 0.5rem !important;    
}

.mybb-tag-new {background-color:#007bff;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center; border-radius: 8px;}
.mybb-tag-hot {background-color:#dc3545;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center; border-radius: 8px;}

2) Add the following to the bottom of showthread.css
Code:
.mybb-flex {
  display: -ms-flexbox !important;
  display: flex !important;
  -ms-flex-pack: justify !important;
  justify-content: space-between !important;    
}

.thread-icon {
    margin-left: 0.5rem !important;    
}

3) Replace the following templates with the content below:

forumdisplay_announcements_announcement
Code:
<tr>
    <td align="center" class="{$bgcolor}" width="2%"><span class="thread_status {$folder}" title="{$folder_label}">&nbsp;</span></td>
    <td align="center" class="{$bgcolor}" width="2%">{$icon}</td>
    <td class="{$bgcolor}">{$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br /><span class="smalltext">{$lang->notification_method} {$notification_type}</span></td>
    <td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></td>
    <td align="center" class="{$bgcolor}">{$thread['views']}</td>
    <td class="{$bgcolor}" style="white-space: nowrap">
        <span class="smalltext">{$lastpostdate}<br />
        <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    </td>
    <td class="{$bgcolor}" align="center"><input type="checkbox" class="checkbox" name="check[{$thread['tid']}]" value="{$thread['tid']}" /></td>
</tr>

forumdisplay_thread
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr class="inline_row">
    <td class="{$bgcolor}{$thread_type_class}">
        <div class="mybb-flex">
              <div><span>{$hot}{$new}{$lock}{$prefix} {$gotounread}{$thread['threadprefix']}<span class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}"><a href="{$thread['threadlink']}">{$thread['subject']}</a></span>{$thread['multipage']}</span>
            <div class="author smalltext">{$thread['profilelink']}</div></div>
            <div class="mybb-flex-2">{$attachment_count}{$icon}</div>
        </div>    
    </td>
    <td align="center" class="{$bgcolor}{$thread_type_class}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a>{$unapproved_posts}</td>
    <td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
    {$rating}
    <td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
        <span class="lastpost smalltext">{$lastpostdate}<br />
        <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    </td>
{$modbit}
</tr>

forumdisplay_thread_attachment_count
Code:
<div><img src="{$theme['imgdir']}/paperclip.png" alt="" title="{$attachment_count}" /></div>

forumdisplay_thread_icon
Code:
<div class="thread-icon"><img src="{$icon['path']}" alt="{$icon['name']}" title="{$icon['name']}" /></div>

forumdisplay_threadlist
Code:
<div class="float_left">
    {$multipage}
</div>
<div class="float_right">
    {$newthread}
</div>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder clear">
    <tr>
        <td class="thead" colspan="{$colspan}">
            <div class="float_right">
                <span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}">{$lang->markforum_read}</a>{$addremovesubscription}{$clearstoredpass}</strong></span>
            </div>
            <div>
                <strong>{$foruminfo['name']}</strong>
            </div>
        </td>
    </tr>
    <tr>
        <td class="tcat" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
        <td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
        <td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
        {$ratingcol}
        <td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
        {$inlinemodcol}
    </tr>
    {$selectall}
    {$announcementlist}
    {$threads}
    <tr>
        <td class="tfoot" align="right" colspan="{$colspan}">
            <form action="forumdisplay.php" method="get">
                <input type="hidden" name="fid" value="{$fid}" />
                <select name="sortby">
                    <option value="subject"{$sortsel['subject']}>{$lang->sort_by_subject}</option>
                    <option value="lastpost"{$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
                    <option value="starter"{$sortsel['starter']}>{$lang->sort_by_starter}</option>
                    <option value="started"{$sortsel['started']}>{$lang->sort_by_started}</option>
                    {$ratingsort}
                    <option value="replies"{$sortsel['replies']}>{$lang->sort_by_replies}</option>
                    <option value="views"{$sortsel['views']}>{$lang->sort_by_views}</option>
                </select>
                <select name="order">
                    <option value="asc"{$ordersel['asc']}>{$lang->sort_order_asc}</option>
                    <option value="desc"{$ordersel['desc']}>{$lang->sort_order_desc}</option>
                </select>
                <select name="datecut">
                    <option value="1"{$datecutsel['1']}>{$lang->datelimit_1day}</option>
                    <option value="5"{$datecutsel['5']}>{$lang->datelimit_5days}</option>
                    <option value="10"{$datecutsel['10']}>{$lang->datelimit_10days}</option>
                    <option value="20"{$datecutsel['20']}>{$lang->datelimit_20days}</option>
                    <option value="50"{$datecutsel['50']}>{$lang->datelimit_50days}</option>
                    <option value="75"{$datecutsel['75']}>{$lang->datelimit_75days}</option>
                    <option value="100"{$datecutsel['100']}>{$lang->datelimit_100days}</option>
                    <option value="365"{$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
                    <option value="9999"{$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
                </select>
                {$prefixselect}
                {$gobutton}
            </form>
        </td>
    </tr>
</table>
<div class="float_left">
    {$multipage}
</div>
<div class="float_right" style="margin-top: 4px;">
    {$newthread}
</div>
<br class="clear" />
<br />
<div class="float_right" style="text-align: right;">
    {$inlinemod}
    {$searchforum}
    {$forumjump}
</div>
<br class="clear" />
{$inline_edit_js}

showthread_similarthreads
Code:
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" align="center" colspan="5"><strong>{$lang->similar_threads}</strong></td>
</tr>
<tr>
<td class="tcat" align="center"><span class="smalltext"><strong>{$lang->thread}</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>{$lang->author}</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>{$lang->replies}</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>{$lang->views}</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>{$lang->lastpost}</strong></span></td>
</tr>
{$similarthreadbits}
</table>

showthread_similarthreads_bit
Code:
<tr>
    <td class="{$trow}">
        <div class="mybb-flex">
            <div>{$similar_thread['threadprefix']}<a href="{$similar_thread['threadlink']}">{$similar_thread['subject']}</a></div>
            {$icon}
        </div>    
    </td>
    <td align="center" class="{$trow}">{$similar_thread['profilelink']}</td>
    <td align="center" class="{$trow}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$similar_thread['tid']}" onclick="MyBB.whoPosted({$similar_thread['tid']}); return false;">{$similar_thread['replies']}</a></td>
    <td align="center" class="{$trow}">{$similar_thread['views']}</td>
    <td class="{$trow}" style="white-space: nowrap">
        <span class="smalltext">{$lastpostdate}<br />
        <a href="{$similar_thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    </td>
    </tr>

search_results_icon
Code:
<div class="thread-icon"><img src="{$posticon['path']}" alt="{$posticon['name']}" title="{$posticon['name']}" /></div>

search_results_posts
Code:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->search_results}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" align="center" border="0">
    <tr>
        <td align="right" valign="top">{$multipage}</td>
    </tr>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
        <td colspan="7" class="thead">
            <strong>{$lang->search_results}</strong>
        </td>
    </tr>
    <tr>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->post}</a> {$orderarrow['subject']}</strong></span></td>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=forum&amp;order=asc">{$lang->forum}</a> {$orderarrow['forum']}</strong></span></td>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a></strong> {$orderarrow['views']}</span></td>
        <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=dateline&amp;order=desc">{$lang->posted}</a> {$orderarrow['dateline']}</strong></span></td>
        {$inlinemodcol}
    </tr>
    {$selectall}
    {$results}
</table>
<table width="100%" align="center" border="0">
    <tr>
        <td align="left" valign="top">{$multipage}</td>
        <td align="right" valign="top">{$inlinemod}</td>
    </tr>
</table>
{$footer}
</body>
</html>

search_results_posts_post
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr class="inline_row">
    <td class="{$bgcolor}">
        <div class="mybb-flex">
            <div>
                <span class="smalltext">
                    {$hot}{$new}{$lock}{$lang->post_thread} <a href="{$thread_url}{$highlight}">{$post['thread_subject']}</a><br />
                    {$lang->post_subject} <a href="{$post_url}{$highlight}#pid{$post['pid']}">{$post['subject']}</a>
                </span><br />
                <table width="100%"><tr><td><span class="smalltext"><em>{$prev}</em></span></td></tr></table>
            </div>
            {$icon}
        </div>
    </td>
    <td align="center" class="{$bgcolor}">{$post['profilelink']}</td>
    <td class="{$bgcolor}" >{$post['forumlink']}</td>
    <td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$post['tid']}" onclick="MyBB.whoPosted({$post['tid']}); return false;">{$post['thread_replies']}</a></td>
    <td align="center" class="{$bgcolor}">{$post['thread_views']}</td>
    <td class="{$bgcolor}" style="white-space: nowrap; text-align: center;"><span class="smalltext">{$posted}</span></td>
    {$inline_mod_checkbox}
</tr>

search_results_threads
Code:
<html>
        <head>
        <title>{$mybb->settings['bbname']} - {$lang->search_results}</title>
        {$headerinclude}
        </head>
        <body>
        {$header}
        <table width="100%" align="center" border="0">
            <tr>
                <td align="right" valign="top">{$multipage}</td>
            </tr>
        </table>
        <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
            <tr>
                <td colspan="6" class="thead">
                    <strong>{$lang->search_results}</strong>
                </td>
            </tr>
            <tr>
                <td class="tcat" align="center" width="56%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']}</strong> / <strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
                <td class="tcat" align="center" width="14%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=forum&amp;order=asc">{$lang->forum}</a> {$orderarrow['forum']}</strong></span></td>
                <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
                <td class="tcat" align="center"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
                <td class="tcat" align="center" width="200"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
                {$inlinemodcol}
            </tr>
            {$selectall}
            {$results}
        </table>
        {$inline_edit_js}
        <table width="100%" align="center" border="0">
            <tr>
                <td align="left" valign="top">{$multipage}</td>
                <td align="right" valign="top">{$inlinemod}</td>
            </tr>
        </table>
        {$footer}
        </body>
        </html>

search_results_threads_thread
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr class="inline_row">
    <td class="{$bgcolor}">
        <div class="mybb-flex">
            <div>
                <span>{$hot}{$new}{$lock}{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread_link}{$highlight}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
                <div class="author smalltext">{$thread['profilelink']}</div>
            </div>
            <div class="mybb-flex-2">{$attachment_count}{$icon}</div>
        </div>
    </td>
    <td class="{$bgcolor}">{$thread['forumlink']}</td>
    <td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></td>
    <td align="center" class="{$bgcolor}">{$thread['views']}</td>
    <td class="{$bgcolor}" style="white-space: nowrap">
        <span class="smalltext">
            {$lastpostdate}<br />
            <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}
        </span>
    </td>
    {$inline_mod_checkbox}
</tr>

usercp_latest_subscribed
Code:
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><div class="float_right"><a href="usercp.php?action=subscriptions"><strong>{$lang->view_all_subscriptions}</strong></a></div><strong>{$lang->new_thread_subscriptions}</strong></td>
</tr>
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->thread} / {$lang->author}</strong></span></td>
<td class="tcat" align="center" width="75"><span class="smalltext"><strong>{$lang->replies}</strong></span></td>
<td class="tcat" align="center" width="75"><span class="smalltext"><strong>{$lang->views}</strong></span></td>
<td class="tcat" align="center" width="200"><span class="smalltext"><strong>{$lang->lastpost}</strong></span></td>
</tr>
{$latest_subscribed_threads}
</table>

usercp_latest_subscribed_threads
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr>
<td class="{$bgcolor}">
    <div class="mybb-flex">
        <div>{$hot}{$new}{$lock}{$gotounread}{$thread['displayprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br />
            <span class="smalltext">{$thread['author']}</span></div>
        {$icon}
    </div>    
</td>
<td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></td>
<td align="center" class="{$bgcolor}">{$thread['views']}</td>
<td class="{$bgcolor}" style="white-space: nowrap"><span class="smalltext">{$lastpostdate}
<br /><a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
</tr>

usercp_latest_threads
Code:
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><div class="float_right"><a href="search.php?action=finduserthreads&amp;uid={$mybb->user['uid']}"><strong>{$lang->find_all_threads}</strong></a></div><strong>{$lang->latest_threads}</strong></td>
</tr>
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->thread} / {$lang->author}</strong></span></td>
<td class="tcat" align="center" width="75"><span class="smalltext"><strong>{$lang->replies}</strong></span></td>
<td class="tcat" align="center" width="75"><span class="smalltext"><strong>{$lang->views}</strong></span></td>
<td class="tcat" align="center" width="200"><span class="smalltext"><strong>{$lang->lastpost}</strong></span></td>
</tr>
{$latest_threads_threads}
</table>

usercp_latest_threads_threads
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr>
<td class="{$bgcolor}">
    <div class="mybb-flex">
        <div>{$hot}{$new}{$lock}{$gotounread}{$thread['displayprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br />
            <span class="smalltext">{$thread['author']}</span></div>
        {$icon}
    </div>    
</td>
<td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></td>
<td align="center" class="{$bgcolor}">{$thread['views']}</td>
<td class="{$bgcolor}" style="white-space: nowrap"><span class="smalltext">{$lastpostdate}
<br /><a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
</tr>

usercp_subscriptions
Code:
<html>
<head>
    <title>{$mybb->settings['bbname']} - {$lang->subscriptions}</title>
    {$headerinclude}
</head>
<body>
    {$header}
    <table width="100%" border="0" align="center">
        <tr>
            {$usercpnav}
            <td valign="top">
                {$multipage}
                <form action="usercp.php" method="post" name="input">
                    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
                    <input type="hidden" name="action" value="do_subscriptions" />
                    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
                        <tr>
                            <td class="thead" colspan="5"><strong>{$lang->subscriptions} ({$threadcount})</strong></td>
                        </tr>
                        <tr>
                            <td width="66%" class="tcat"><span class="smalltext"><strong>{$lang->thread}</strong></span></td>
                            <td class="tcat" align="center" width="7%"><span class="smalltext"><strong>{$lang->replies}</strong></span></td>
                            <td class="tcat" align="center" width="7%"><span class="smalltext"><strong>{$lang->views}</strong></span></td>
                            <td class="tcat" align="center" width="200"><span class="smalltext"><strong>{$lang->lastpost}</strong></span></td>
                            <td class="tcat" align="center" width="1"><input name="allbox" title="Select All" type="checkbox" class="checkbox checkall" value="1" /></td>
                        </tr>
                        {$threads}
                        {$remove_options}
                    </table>
                </form>
                {$multipage}
                <br />
            </td>
        </tr>
    </table>
    {$footer}
</body>
</html>

usercp_subscriptions_thread
Code:
<?php
    $lock = $new = '';
    $lock_icon = $hot_icon = $new_icon = array();
    $lock_icon = array("closefolder", "dot_closefolder", "hotclosefolder", "dot_hotclosefolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $new_icon = array("newfolder", "dot_newfolder", "newhotfolder", "dot_newhotfolder", "newhotclosefolder", "dot_newhotclosefolder", "newclosefolder", "dot_newclosefolder");
    $hot_icon = array("dot_hotfolder", "dot_hotclosefolder", "dot_newhotfolder", "dot_newhotclosefolder", "hotfolder", "hotclosefolder", "newhotfolder", "newhotclosefolder");
    if (in_array($folder, $lock_icon)) $lock = '<span class="fas fa-lock fa-fw" title="'.$folder_label.'"></span> ';
    if (in_array($folder, $new_icon)) $new = '<span class="mybb-tag-new" title="'.$folder_label.'">New</span> ';
    if (in_array($folder, $hot_icon)) $new = '<span class="mybb-tag-hot" title="'.$folder_label.'">Hot</span> ';
?>
<tr>
    <td class="{$bgcolor}">
        <div class="mybb-flex">
            <div>{$hot}{$new}{$lock}{$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$new_class}">{$thread['subject']}</a><br />
                    <span class="smalltext">{$lang->notification_method} {$notification_type}</span></div>
            {$icon}
        </div>
    </td>
    <td align="center" class="{$bgcolor}"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></td>
    <td align="center" class="{$bgcolor}">{$thread['views']}</td>
    <td class="{$bgcolor}" style="white-space: nowrap">
        <span class="smalltext">{$lastpostdate}<br />
        <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    </td>
    <td class="{$bgcolor}" align="center"><input type="checkbox" class="checkbox" name="check[{$thread['tid']}]" value="{$thread['tid']}" /></td>
</tr>

usercp_subscriptions_thread_icon
Code:
<div><img src="{$icon['path']}" alt="{$icon['name']}" title="{$icon['name']}" /></div>

Done!
Serpius
Offline
Member
Posts: 8
Threads: 2
Joined: Jul 2019
Reputation: 0
Gender: Male
Location: State of Ohio - USA

Serpius
Offline
Member

Posts: 8
Threads: 2
Joined: Jul 2019
Reputation: 0
Gender: Male
Location: State of Ohio - USA
Would this be possible to add this nice feature that is found on the MyBB.com website?

Meaning... add this to your current theme on your website, but also add this as another tutorial (on this website) if Admins want to add this feature to their own website.

Add the 'None' and 'Select  All' buttons as shown in the screenshot link below. If possible, add the 'Copy' function as well so that Admins can easily use the 'Select All' and 'Copy' functions in order to copy and paste code or other pertinent information.

[Image: 4074ebde128e4f9fa5a2bfdb06e47d23.png]
I'm Serpius and You're Not    ¯\_(ツ)_/¯
Ashley
Offline
Administrator
Posts: 17
Threads: 9
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA

Ashley
Offline
Administrator

Posts: 17
Threads: 9
Joined: Jul 2019
Reputation: 0
Real name: Ashley
Gender: Male
Location: Cape Town, SA
(27 Jul 2019 8:28 am)Serpius Wrote: Would this be possible to add this nice feature that is found on the MyBB.com website?

Meaning... add this to your current theme on your website, but also add this as another tutorial (on this website) if Admins want to add this feature to their own website.

Add the 'None' and 'Select  All' buttons as shown in the screenshot link below. If possible, add the 'Copy' function as well so that Admins can easily use the 'Select All' and 'Copy' functions in order to copy and paste code or other pertinent information.
That's an Admin side mod, if i am not mistaken. It was discussed on the MyBB forum - you can maybe ask there for the detailed instructions.
Users browsing this thread: 1 Guest(s)