News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How do i hide/remove moderators in the main forum listing page?

Started by minimono, June 05, 2018, 05:21:18 AM

Previous topic - Next topic

minimono

SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Shambles

Easiest way it to edit your BoardIndex.template.php file as follows:

Code (From) Select
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';


Code (To) Select
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
// if (!empty($board['moderators']))
// echo '
// <p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';

minimono

BoardIndex.template.php on this theme not have it to edit. (Attachment)
Iam edit on theme default and theme core. moderators still showing same last post. :(
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Shambles

The file you attached is not the one producing the screenshot you listed.

minimono

This theme i edit on index.template.php.

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
', ($link_num == count($context['linktree']) - 1) ? '<li class="last"><div class="lt_wrapper"><div class="lt_last"></div><div class="lt_midle">' : '<li><div class="lt_wrapper"><div class="lt_last"></div><div class="lt_midle">', '';

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] . '</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '';

echo '
</div><div class="lt_first"></div></div></li>';
}


Code (replace) Select
// Show something after the link...?
// if (isset($tree['extra_after']))
// echo $tree['extra_after'];



moderators is hide.
What do you think about it?
SMF 2.0.15 | PHP 7.X | MySql 5.6 | Softer theme | SMFAds

Advertisement: