Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: MoreBloodWine on October 30, 2013, 06:54:39 AM

Title: Header Message about forum bein in maintenance mode...
Post by: MoreBloodWine on October 30, 2013, 06:54:39 AM
I use the Blackstorm theme and it seems Trax is on a hiatus or something. Since this is technically a generalized question even though it deals with his theme I thought it would be ok to post here. Anyway, attached is my index.template.php from the Blackstorm theme. Can someone please tell me what the code is and where to put the code that usually shows up below the two below pasted header lines that warns about the site being in maintenance mode please ?

Show unread posts since last visit.
Show new replies to your posts.
Title: Re: Header Message about forum bein in maintenance mode...
Post by: margarett on October 30, 2013, 07:16:43 AM

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';

In your case it would be something:
find:

  echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
  <li>', $context['current_time'],'</li>


Replace:

  echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';

echo '
<li>', $context['current_time'], '</li>
Title: Re: Header Message about forum bein in maintenance mode...
Post by: MoreBloodWine on October 30, 2013, 07:49:58 AM
Thx, I didnt even ask for let alone remember the users awaiting approval bit... you rock !

As far as you can tell from my file, am I missing anything else I should have in the header area ?
Title: Re: Header Message about forum bein in maintenance mode...
Post by: MoreBloodWine on October 30, 2013, 07:53:15 AM
Noticed it ws marked solved but I edited my reply to ask a quick question if you could check it out please ;-)
Title: Re: Header Message about forum bein in maintenance mode...
Post by: margarett on October 30, 2013, 08:11:54 AM
Seems not, everything else is there (and, of course, it has other things that default hasn't)
Title: Re: Header Message about forum bein in maintenance mode...
Post by: MoreBloodWine on October 30, 2013, 08:19:04 AM
Quote from: margarett on October 30, 2013, 08:11:54 AM
(and, of course, it has other things that default hasn't)
For my own curiosity and which you may close this again after your answer, like what ?

Thx again !
Title: Re: Header Message about forum bein in maintenance mode...
Post by: margarett on October 30, 2013, 08:22:23 AM
echo $context['tapatalk_body_hook'];

// Social area.
if (!empty($settings['enable_bookmarks']))
   {
          echo'<div class="block_social">';
     if (!empty($settings['enable_rss']))
echo '
<a class="social" href="',$settings['enable_rss'],'"><img src="'.$settings['images_url'].'/rss.png" alt="Rss Feed"></a>';
     if (!empty($settings['enable_youtube']))
echo '
<a class="social" href="',$settings['enable_youtube'],'"><img src="'.$settings['images_url'].'/youtube.png" alt="Youtube"></a>';
     if (!empty($settings['enable_twitter']))
echo '
<a class="social" href="',$settings['enable_twitter'],'"><img src="'.$settings['images_url'].'/twitter.png" alt="Twitter"></a>';
     if (!empty($settings['enable_facebook']))
echo '
<a class="social" href="',$settings['enable_facebook'],'"><img src="'.$settings['images_url'].'/facebook.png" alt="Facebook"></a>';
echo '</div>';
   }

(although this might be added by a MOD, I'm just comparing with our un-modded default index.template.php...)