Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Jade Elizabeth on November 06, 2008, 12:34:59 PM

Title: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 06, 2008, 12:34:59 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1497)

Functionality

Basically, this adds two tabs to the main menu: "Unread" and "replies".

The tabs are meant to replace the ugly text of "Show unread posts since last visit" and "Show new replies to your posts", which I remove from my themes. It also shows ALL unread messages, regardless of last visit time, unlike the default "unread" action which you get through that text :).

Version 2.0: Adds the buttons only
Version 3.0: Adds the buttons and removes the text (this will make the area to the right of the avatars bare, for an alternate version which leaves the time online see here (http://www.simplemachines.org/community/index.php?topic=272622.msg1806261#msg1806261))


History

Version 1.4 > 2.0:
Added SMF 1.1.6 compatibility, no need to "upgrade" if you installed 1.4.
Title: Re: "unread" and "replies" tabs for main menu
Post by: babjusi on November 06, 2008, 02:49:59 PM
Another nice mod Jade. Keep them coming :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: shadow82x on November 06, 2008, 02:50:31 PM
Looks neat Jade. I like it. :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 06, 2008, 06:44:27 PM
Thanks :D

I'm gonna need it for some of my themes ;). The theme in the screenshot is one that I'm going to need it for!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 06, 2008, 07:17:27 PM
Lol har har, my theme removes that text, so it will need the buttons to be functional ;).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Sakae on November 06, 2008, 07:55:33 PM
Great job, Jade.

I was planning to install it on my SMF 1.1.6, but looks like there's no way to show ALL unread messages, regardless of last visit time. Or there is?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 06, 2008, 08:30:40 PM
There is, if you give me a couple of days I will make a 1.1.6 version for you :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Sakae on November 07, 2008, 11:28:40 AM
Did I already said I love you? lol (please don't let the boyfriend read this lol)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 07, 2008, 12:42:30 PM
Done, submitting it now ;)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kreator on November 07, 2008, 03:05:57 PM
This would be a good mod !... only thing is I`ve run outta space on my menubar..... now if someone could write a mod for user defined  dropdown menus then that`d be cool!!!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 07, 2008, 03:09:10 PM
You can remove buttons if you like :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Burke ♞ Knight on November 07, 2008, 06:12:22 PM
Great Mod, Jade. :)
I put on one of my sites already, and am about to hit the rest of them with it...LOL
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 07, 2008, 06:18:14 PM
Awesome :D

I'm glad everyone likes it!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Zepia1 on November 07, 2008, 10:31:29 PM
I'm using silentWave theme and it's not showing even though instalklation went smooth.

Do I have to manually do this? or is it a tab under Admin that I'm not seeing?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 07, 2008, 11:00:24 PM
If using 1.1.x then yes, you WILL need to manually install it on your theme, however 2.0 should not need any manual installation :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kat-2 on November 08, 2008, 11:36:22 PM
Awesome mod! Thank you. My members have begged for a mod like this.
I need to know how to modify a custom theme now..
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 09, 2008, 02:01:57 AM
Lol, easy peasy!

Go install a copy of the default from the admin center, then edit the style.css and images :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: ascaland on November 09, 2008, 02:05:37 AM
Great MOD Jade. Finally something new. :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 09, 2008, 02:49:26 AM
Lol thank you :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Burke ♞ Knight on November 09, 2008, 08:27:09 AM
Jade, I think Kat-2 may be meaning, how to customize a current custom theme. Must need buttons for the unread and replies feature.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 09, 2008, 12:32:41 PM
Oh. I don't think I can help with that one lol.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kreator on November 09, 2008, 02:59:24 PM
QuoteThe tabs are meant to replace the ugly text of "Show unread posts since last visit" and "Show new replies to your posts", which I remove from my themes.

Jade can you tell me how to do that? ... BTW I have room now for your cool buttons! go rid of a couple !
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 09, 2008, 03:41:35 PM
How to remove the text? Attach your index.template.php :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kreator on November 09, 2008, 04:50:27 PM
QuoteHow to remove the text? Attach your index.template.php
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 09, 2008, 06:22:33 PM
There you go :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kreator on November 10, 2008, 03:07:23 AM
Unfortunately I get a parsing error with your mod !! what have you changed?
Title: Re: "unread" and "replies" tabs for main menu
Post by: RAV TUX on November 10, 2008, 04:04:18 AM
trying to get this to work in SMF 1.1.7 using OutlineOmega_115 "KindaBlue"

Outline Omega uses drop down menus so things look a little different:

I believe this is the relevant code:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'radioadmin', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
    echo '
                           
          <div class="tabs-left"></div>
          <div class="tabs">
              <ul>         
           
                    <li>
                   <a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[103] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                      <ul>';
             if ($context['allow_search'])
                echo'
                         <li><a href="index.php?action=search">' , $txt[182] , '</a></li>';
             if ($context['allow_calendar'])
                 echo'
                         <li><a href="index.php?action=calendar">' , $txt['viewcal'] , '</a></li>';
             if ($context['allow_memberlist'])
                echo'         
                         <li><a href="index.php?action=mlist">' , $txt['viewlist'] , '</a></li>
                         <li><a href="index.php?action=mlist;sa=search">' , $txt['searchlist'] , '</a></li>';           
                 echo'           
                         <li><a href="index.php?action=recent">' , $txt['viewrecent'] , '</a></li>                       
                         </ul>
                         <div class="btm-bg"></div>
                          </div>
                        </li>';
             //Show the Help button
                 echo'
                   <li>
                   <a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[119] , '</span>
                      <span class="menu-right"></span>
                   </a>
                      <div class="sub">
                         <ul>
                            <li><a href="index.php?action=help;page=registering">' , $txt[97] , '</a></li>
                             <li><a href="index.php?action=help;page=loginout">' , $txt['login'] , '</a></li>
                             <li><a href="index.php?action=help;page=profile">' , $txt['yourpro'] , '</a></li>
                            <li><a href="index.php?action=help;page=post">' , $txt['posthow'] , '</a></li>
                            <li><a href="index.php?action=help;page=pm">' , $txt[159] , '</a></li>
                            <li><a href="index.php?action=help;page=searching">' , $txt['searchhow'] , '</a></li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';             
               
             // Is the user allowed to administrate at all? ([admin])
             if ($context['allow_admin'])
                 echo'               
                   <li>
                   <a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[2] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>
                             <li><a href="index.php?action=ban">' , $txt['banlist'] , '</a></li>
                            <li><a href="index.php?action=packages">' , $txt['packages'] , '</a></li>
                            <li><a href="index.php?action=regcenter">' , $txt['regist'] , '</a></li>
                            <li><a href="index.php?action=viewErrorLog;desc">' , $txt['errorlog'] , '</a></li>
                            <li><a href="index.php?action=maintain">' , $txt['maintain'] , '</a></li>                       
                             <li><a href="index.php?action=news">' , $txt['newsand'] , '</a></li>                                                 
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';               
           
             // Go to PM center... [pm]
             if ($context['user']['is_logged'] && $context['allow_pm'])
                echo'
                <li>
                   <a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt['messages'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                           
                            <li><a href="index.php?action=pm;f=outbox">' , $txt['outbox'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=send">' , $txt['sendmess'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=search">' , $txt['searchmess'] , '</a></li>
                             <li><a href="index.php?action=profile;sa=pmprefs">' , $txt['pm_options'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

             // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                echo'
                   <li>
                   <a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[79] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                                                         
                               <li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>
                               <li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
                                 <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

                 // How about the [search] button?
             if ($context['allow_search'])
                echo '
                   <li>
                   <a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search">
                       <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[182] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';               
                       
             // If the user is a guest, show the [login] button.
             if ($context['user']['is_guest'])
                echo'   
                   <li>
                   <a ' , $current_action=='login' ? ' class="current"' : '' , 'href="', $scripturl, '?action=login">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[34] , '</span>
                      <span class="menu-right"></span>
                   </a>
                           <div class="sub">
                         <ul>                                                         
                               <li>
                                   <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                                      <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
                                     <td valign="middle">
                                    <label for="user2"><b>', $txt[35], ':</b>
                                    <input type="text" name="user" id="user2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="passwrd2"><b>', $txt[36], ':</b>
                                    <input type="password" name="passwrd" id="passwrd2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="cookielength2"><b>', $txt['minutes'], ':</b>
                                    <input type="text" name="cookielength" id="cookielength2" size="12" style="margin: 0 0 0 10px;" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <input type="submit" style="width: 155px;" value="', $txt[34], '" />
                                     </td></tr></table>
                                       </form>
                               </li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';
               
             // If the user is a guest, also show  the[register] button.
             if ($context['user']['is_guest'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='register' ? ' class="current"' : '' , 'href="', $scripturl, '?action=register">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[97] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
               
             // Otherwise, they might want to [logout]...
             if ($context['user']['is_logged'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[108] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
          echo'         
             </ul>
          </div>
                <div class="tabs-right"></div>';

}


This is the edited code:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'radioadmin', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'unreadreplies')
      $current_action = 'unreadreplies';
  if ($context['current_action'] == 'unread')
      $current_action = 'unread';
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
    echo '
                           
          <div class="tabs-left"></div>
          <div class="tabs">
              <ul>         
           
                    <li>
                   <a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[103] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                      <ul>';
             if ($context['allow_search'])
                echo'
                         <li><a href="index.php?action=search">' , $txt[182] , '</a></li>';
             if ($context['allow_calendar'])
                 echo'
                         <li><a href="index.php?action=calendar">' , $txt['viewcal'] , '</a></li>';
             if ($context['allow_memberlist'])
                echo'         
                         <li><a href="index.php?action=mlist">' , $txt['viewlist'] , '</a></li>
                         <li><a href="index.php?action=mlist;sa=search">' , $txt['searchlist'] , '</a></li>';           
                 echo'           
                         <li><a href="index.php?action=recent">' , $txt['viewrecent'] , '</a></li>';

                echo'
                        <li><a href="index.php?action=unreadreplies">' , $txt['unreadreplies'] , '</a></li>

                 echo'
                        <li><a href="index.php?action=unread">' , $txt['unread'] , '</a></li>                                               
                         </ul>
                         <div class="btm-bg"></div>
                          </div>
                        </li>';
             //Show the Help button
                 echo'
                   <li>
                   <a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[119] , '</span>
                      <span class="menu-right"></span>
                   </a>
                      <div class="sub">
                         <ul>
                            <li><a href="index.php?action=help;page=registering">' , $txt[97] , '</a></li>
                             <li><a href="index.php?action=help;page=loginout">' , $txt['login'] , '</a></li>
                             <li><a href="index.php?action=help;page=profile">' , $txt['yourpro'] , '</a></li>
                            <li><a href="index.php?action=help;page=post">' , $txt['posthow'] , '</a></li>
                            <li><a href="index.php?action=help;page=pm">' , $txt[159] , '</a></li>
                            <li><a href="index.php?action=help;page=searching">' , $txt['searchhow'] , '</a></li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';             
               
             // Is the user allowed to administrate at all? ([admin])
             if ($context['allow_admin'])
                 echo'               
                   <li>
                   <a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[2] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>
                             <li><a href="index.php?action=ban">' , $txt['banlist'] , '</a></li>
                            <li><a href="index.php?action=packages">' , $txt['packages'] , '</a></li>
                            <li><a href="index.php?action=regcenter">' , $txt['regist'] , '</a></li>
                            <li><a href="index.php?action=viewErrorLog;desc">' , $txt['errorlog'] , '</a></li>
                            <li><a href="index.php?action=maintain">' , $txt['maintain'] , '</a></li>                       
                             <li><a href="index.php?action=news">' , $txt['newsand'] , '</a></li>                                                 
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';               
           
             // Go to PM center... [pm]
             if ($context['user']['is_logged'] && $context['allow_pm'])
                echo'
                <li>
                   <a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt['messages'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                           
                            <li><a href="index.php?action=pm;f=outbox">' , $txt['outbox'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=send">' , $txt['sendmess'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=search">' , $txt['searchmess'] , '</a></li>
                             <li><a href="index.php?action=profile;sa=pmprefs">' , $txt['pm_options'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

             // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                echo'
                   <li>
                   <a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[79] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                                                         
                               <li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>
                               <li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
                                 <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

                 // How about the [search] button?
             if ($context['allow_search'])
                echo '
                   <li>
                   <a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search">
                       <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[182] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';               
                       
             // If the user is a guest, show the [login] button.
             if ($context['user']['is_guest'])
                echo'   
                   <li>
                   <a ' , $current_action=='login' ? ' class="current"' : '' , 'href="', $scripturl, '?action=login">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[34] , '</span>
                      <span class="menu-right"></span>
                   </a>
                           <div class="sub">
                         <ul>                                                         
                               <li>
                                   <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                                      <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
                                     <td valign="middle">
                                    <label for="user2"><b>', $txt[35], ':</b>
                                    <input type="text" name="user" id="user2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="passwrd2"><b>', $txt[36], ':</b>
                                    <input type="password" name="passwrd" id="passwrd2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="cookielength2"><b>', $txt['minutes'], ':</b>
                                    <input type="text" name="cookielength" id="cookielength2" size="12" style="margin: 0 0 0 10px;" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <input type="submit" style="width: 155px;" value="', $txt[34], '" />
                                     </td></tr></table>
                                       </form>
                               </li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';
               
             // If the user is a guest, also show  the[register] button.
             if ($context['user']['is_guest'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='register' ? ' class="current"' : '' , 'href="', $scripturl, '?action=register">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[97] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
               
             // Otherwise, they might want to [logout]...
             if ($context['user']['is_logged'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[108] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
          echo'         
             </ul>
          </div>
                <div class="tabs-right"></div>';

}


Unfortunately this doesn't work and most likely due to my user error, I honestly am not sure how this should be edited.

Could someone help me out with this?

I would like to:

1. add the new selections to the dropdown menu as opposed to adding new buttons
2. remove the text below the user name

Thanks in advance,

RAV TUX


Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 10, 2008, 08:39:07 AM
Quote from: Kreator on November 10, 2008, 03:07:23 AM
Unfortunately I get a parsing error with your mod !! what have you changed?

What version? 2.0 or 1.1?

RAV TUX: Where do you want my buttons? As main items or "subs" (and subs of what)?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Sakae on November 10, 2008, 10:22:06 AM
Jade, does the 1.1.6/1.1.7 version brings the unread all messages regardless the time of last visit function? Or it is the standard "unread all messages since last visit"?

That is what I want, to see all messages regardless last time visit.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 10, 2008, 10:25:33 AM
Quote from: softcore on November 10, 2008, 10:22:06 AM
Jade, does the 1.1.6/1.1.7 version brings the unread all messages regardless the time of last visit function? Or it is the standard "unread all messages since last visit"?

That is what I want, to see all messages regardless last time visit.

Yes it does. Both versions have the same features ;D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kreator on November 10, 2008, 01:07:44 PM
[qu0te]Unfortunately I get a parsing error with your mod !! what have you changed?[/quote]

QuoteWhat version? 2.0 or 1.1?

i am running version 1.1.7 now
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 10, 2008, 04:38:56 PM
Okay. I havent changed anything, so I will take a look asap :). Where/what is the error?
Title: Re: "unread" and "replies" tabs for main menu
Post by: RAV TUX on November 10, 2008, 05:05:17 PM
Quote from: Jade on November 10, 2008, 08:39:07 AM
Quote from: Kreator on November 10, 2008, 03:07:23 AM
Unfortunately I get a parsing error with your mod !! what have you changed?

What version? 2.0 or 1.1?

RAV TUX: Where do you want my buttons? As main items or "subs" (and subs of what)?

The theme version is: OutlineOmega_115 (1.1)

SMF version: Powered by SMF 1.1.7

mod version: Unread and Replies Tabs in Main Menu 2.0

Subs of main menu: "Home"...first and second position.

search is currently in position one this can be replaced/removed since it is already a main menu item.

Home>

1. Unread Post
2. New Replies to Post
3. View Recent Post
4. View Memberlist
5. Search Memberlist

Also if you could create a sub for message notification (ie. you have 3 messages, 0 are new.)

This would be a great first position sub under the main messages.

Then all the text links under the: Hello username could be removed.

Thanks in advance I appreciate the help.

RAV TUX
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 12, 2008, 05:43:43 PM
Okay so where exactly in the menu do you want my mod buttons? I'm confused now.
Title: Re: "unread" and "replies" tabs for main menu
Post by: RAV TUX on November 13, 2008, 08:17:25 PM
Quote from: Jade on November 12, 2008, 05:43:43 PM
Okay so where exactly in the menu do you want my mod buttons? I'm confused now.

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=272622.0;attach=75728;image)

Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 13, 2008, 09:50:56 PM
Okay, from the block you gave me second here's the right code, assuming all else went well:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'radioadmin', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'unreadreplies')
      $current_action = 'unreadreplies';
     if ($context['current_action'] == 'unread')
      $current_action = 'unread';
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
    echo '
                           
          <div class="tabs-left"></div>
          <div class="tabs">
              <ul>         
           
                    <li>
                   <a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[103] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                      <ul>';
             if ($context['allow_search'])
                echo'
                         <li><a href="index.php?action=search">' , $txt[182] , '</a></li>';
             if ($context['allow_calendar'])
                 echo'
                         <li><a href="index.php?action=calendar">' , $txt['viewcal'] , '</a></li>';
             if ($context['allow_memberlist'])
                echo'         
                         <li><a href="index.php?action=mlist">' , $txt['viewlist'] , '</a></li>
                         <li><a href="index.php?action=mlist;sa=search">' , $txt['searchlist'] , '</a></li>';           
                 echo'           
                         <li><a href="index.php?action=recent">' , $txt['viewrecent'] , '</a></li>';

                echo'
                        <li><a href="index.php?action=unreadreplies">' , $txt['tab_replies'] , '</a></li>

                 echo'
                        <li><a href="index.php?action=unread;all;start=0">' , $txt['tab_unread'] , '</a></li>                                               
                         </ul>
                         <div class="btm-bg"></div>
                          </div>
                        </li>';
             //Show the Help button
                 echo'
                   <li>
                   <a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[119] , '</span>
                      <span class="menu-right"></span>
                   </a>
                      <div class="sub">
                         <ul>
                            <li><a href="index.php?action=help;page=registering">' , $txt[97] , '</a></li>
                             <li><a href="index.php?action=help;page=loginout">' , $txt['login'] , '</a></li>
                             <li><a href="index.php?action=help;page=profile">' , $txt['yourpro'] , '</a></li>
                            <li><a href="index.php?action=help;page=post">' , $txt['posthow'] , '</a></li>
                            <li><a href="index.php?action=help;page=pm">' , $txt[159] , '</a></li>
                            <li><a href="index.php?action=help;page=searching">' , $txt['searchhow'] , '</a></li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';             
               
             // Is the user allowed to administrate at all? ([admin])
             if ($context['allow_admin'])
                 echo'               
                   <li>
                   <a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[2] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>
                             <li><a href="index.php?action=ban">' , $txt['banlist'] , '</a></li>
                            <li><a href="index.php?action=packages">' , $txt['packages'] , '</a></li>
                            <li><a href="index.php?action=regcenter">' , $txt['regist'] , '</a></li>
                            <li><a href="index.php?action=viewErrorLog;desc">' , $txt['errorlog'] , '</a></li>
                            <li><a href="index.php?action=maintain">' , $txt['maintain'] , '</a></li>                       
                             <li><a href="index.php?action=news">' , $txt['newsand'] , '</a></li>                                                 
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';               
           
             // Go to PM center... [pm]
             if ($context['user']['is_logged'] && $context['allow_pm'])
                echo'
                <li>
                   <a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt['messages'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                           
                            <li><a href="index.php?action=pm;f=outbox">' , $txt['outbox'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=send">' , $txt['sendmess'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=search">' , $txt['searchmess'] , '</a></li>
                             <li><a href="index.php?action=profile;sa=pmprefs">' , $txt['pm_options'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

             // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                echo'
                   <li>
                   <a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[79] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                                                         
                               <li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>

                               <li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
                                 <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

                 // How about the [search] button?
             if ($context['allow_search'])
                echo '
                   <li>
                   <a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search">
                       <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[182] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';               
                       
             // If the user is a guest, show the [login] button.
             if ($context['user']['is_guest'])
                echo'   
                   <li>
                   <a ' , $current_action=='login' ? ' class="current"' : '' , 'href="', $scripturl, '?action=login">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[34] , '</span>
                      <span class="menu-right"></span>
                   </a>
                           <div class="sub">
                         <ul>                                                         
                               <li>
                                   <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                                      <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
                                     <td valign="middle">
                                    <label for="user2"><b>', $txt[35], ':</b>
                                    <input type="text" name="user" id="user2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="passwrd2"><b>', $txt[36], ':</b>
                                    <input type="password" name="passwrd" id="passwrd2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="cookielength2"><b>', $txt['minutes'], ':</b>
                                    <input type="text" name="cookielength" id="cookielength2" size="12" style="margin: 0 0 0 10px;" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <input type="submit" style="width: 155px;" value="', $txt[34], '" />
                                     </td></tr></table>
                                       </form>
                               </li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';
               
             // If the user is a guest, also show  the[register] button.
             if ($context['user']['is_guest'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='register' ? ' class="current"' : '' , 'href="', $scripturl, '?action=register">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[97] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
               
             // Otherwise, they might want to [logout]...
             if ($context['user']['is_logged'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[108] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
          echo'         
             </ul>
          </div>
                <div class="tabs-right"></div>';

}
Title: Re: "unread" and "replies" tabs for main menu
Post by: RAV TUX on November 14, 2008, 12:10:29 PM
Quote from: Jade on November 13, 2008, 09:50:56 PM
Okay, from the block you gave me second here's the right code, assuming all else went well:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'radioadmin', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'unreadreplies')
      $current_action = 'unreadreplies';
     if ($context['current_action'] == 'unread')
      $current_action = 'unread';
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
    echo '
                           
          <div class="tabs-left"></div>
          <div class="tabs">
              <ul>         
           
                    <li>
                   <a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[103] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                      <ul>';
             if ($context['allow_search'])
                echo'
                         <li><a href="index.php?action=search">' , $txt[182] , '</a></li>';
             if ($context['allow_calendar'])
                 echo'
                         <li><a href="index.php?action=calendar">' , $txt['viewcal'] , '</a></li>';
             if ($context['allow_memberlist'])
                echo'         
                         <li><a href="index.php?action=mlist">' , $txt['viewlist'] , '</a></li>
                         <li><a href="index.php?action=mlist;sa=search">' , $txt['searchlist'] , '</a></li>';           
                 echo'           
                         <li><a href="index.php?action=recent">' , $txt['viewrecent'] , '</a></li>';

                echo'
                        <li><a href="index.php?action=unreadreplies">' , $txt['tab_replies'] , '</a></li>

                 echo'
                        <li><a href="index.php?action=unread;all;start=0">' , $txt['tab_unread'] , '</a></li>                                               
                         </ul>
                         <div class="btm-bg"></div>
                          </div>
                        </li>';
             //Show the Help button
                 echo'
                   <li>
                   <a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[119] , '</span>
                      <span class="menu-right"></span>
                   </a>
                      <div class="sub">
                         <ul>
                            <li><a href="index.php?action=help;page=registering">' , $txt[97] , '</a></li>
                             <li><a href="index.php?action=help;page=loginout">' , $txt['login'] , '</a></li>
                             <li><a href="index.php?action=help;page=profile">' , $txt['yourpro'] , '</a></li>
                            <li><a href="index.php?action=help;page=post">' , $txt['posthow'] , '</a></li>
                            <li><a href="index.php?action=help;page=pm">' , $txt[159] , '</a></li>
                            <li><a href="index.php?action=help;page=searching">' , $txt['searchhow'] , '</a></li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';             
               
             // Is the user allowed to administrate at all? ([admin])
             if ($context['allow_admin'])
                 echo'               
                   <li>
                   <a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[2] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>
                             <li><a href="index.php?action=ban">' , $txt['banlist'] , '</a></li>
                            <li><a href="index.php?action=packages">' , $txt['packages'] , '</a></li>
                            <li><a href="index.php?action=regcenter">' , $txt['regist'] , '</a></li>
                            <li><a href="index.php?action=viewErrorLog;desc">' , $txt['errorlog'] , '</a></li>
                            <li><a href="index.php?action=maintain">' , $txt['maintain'] , '</a></li>                       
                             <li><a href="index.php?action=news">' , $txt['newsand'] , '</a></li>                                                 
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';               
           
             // Go to PM center... [pm]
             if ($context['user']['is_logged'] && $context['allow_pm'])
                echo'
                <li>
                   <a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt['messages'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                           
                            <li><a href="index.php?action=pm;f=outbox">' , $txt['outbox'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=send">' , $txt['sendmess'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=search">' , $txt['searchmess'] , '</a></li>
                             <li><a href="index.php?action=profile;sa=pmprefs">' , $txt['pm_options'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

             // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                echo'
                   <li>
                   <a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[79] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                                                         
                               <li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>

                               <li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
                                 <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

                 // How about the [search] button?
             if ($context['allow_search'])
                echo '
                   <li>
                   <a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search">
                       <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[182] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';               
                       
             // If the user is a guest, show the [login] button.
             if ($context['user']['is_guest'])
                echo'   
                   <li>
                   <a ' , $current_action=='login' ? ' class="current"' : '' , 'href="', $scripturl, '?action=login">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[34] , '</span>
                      <span class="menu-right"></span>
                   </a>
                           <div class="sub">
                         <ul>                                                         
                               <li>
                                   <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                                      <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
                                     <td valign="middle">
                                    <label for="user2"><b>', $txt[35], ':</b>
                                    <input type="text" name="user" id="user2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="passwrd2"><b>', $txt[36], ':</b>
                                    <input type="password" name="passwrd" id="passwrd2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="cookielength2"><b>', $txt['minutes'], ':</b>
                                    <input type="text" name="cookielength" id="cookielength2" size="12" style="margin: 0 0 0 10px;" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <input type="submit" style="width: 155px;" value="', $txt[34], '" />
                                     </td></tr></table>
                                       </form>
                               </li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';
               
             // If the user is a guest, also show  the[register] button.
             if ($context['user']['is_guest'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='register' ? ' class="current"' : '' , 'href="', $scripturl, '?action=register">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[97] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
               
             // Otherwise, they might want to [logout]...
             if ($context['user']['is_logged'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[108] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
          echo'         
             </ul>
          </div>
                <div class="tabs-right"></div>';

}


I tried that and I get this message:
QuoteThe file you tried to save generated the following error:
Parse error: syntax error, unexpected '>' in index.template.php on line 535
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 14, 2008, 05:30:44 PM
Attach the whole file please :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: RAV TUX on November 18, 2008, 07:49:03 AM
Quote from: Jade on November 14, 2008, 05:30:44 PM
Attach the whole file please :)

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'radioadmin', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'unreadreplies')
      $current_action = 'unreadreplies';
     if ($context['current_action'] == 'unread')
      $current_action = 'unread';
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
    echo '
                           
          <div class="tabs-left"></div>
          <div class="tabs">
              <ul>         
           
                    <li>
                   <a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[103] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                      <ul>';
             if ($context['allow_search'])
                echo'
                         <li><a href="index.php?action=search">' , $txt[182] , '</a></li>';
             if ($context['allow_calendar'])
                 echo'
                         <li><a href="index.php?action=calendar">' , $txt['viewcal'] , '</a></li>';
             if ($context['allow_memberlist'])
                echo'         
                         <li><a href="index.php?action=mlist">' , $txt['viewlist'] , '</a></li>
                         <li><a href="index.php?action=mlist;sa=search">' , $txt['searchlist'] , '</a></li>';           
                 echo'           
                         <li><a href="index.php?action=recent">' , $txt['viewrecent'] , '</a></li>';

                echo'
                        <li><a href="index.php?action=unreadreplies">' , $txt['tab_replies'] , '</a></li>

                 echo'
                        <li><a href="index.php?action=unread;all;start=0">' , $txt['tab_unread'] , '</a></li>                                               
                         </ul>
                         <div class="btm-bg"></div>
                          </div>
                        </li>';
             //Show the Help button
                 echo'
                   <li>
                   <a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[119] , '</span>
                      <span class="menu-right"></span>
                   </a>
                      <div class="sub">
                         <ul>
                            <li><a href="index.php?action=help;page=registering">' , $txt[97] , '</a></li>
                             <li><a href="index.php?action=help;page=loginout">' , $txt['login'] , '</a></li>
                             <li><a href="index.php?action=help;page=profile">' , $txt['yourpro'] , '</a></li>
                            <li><a href="index.php?action=help;page=post">' , $txt['posthow'] , '</a></li>
                            <li><a href="index.php?action=help;page=pm">' , $txt[159] , '</a></li>
                            <li><a href="index.php?action=help;page=searching">' , $txt['searchhow'] , '</a></li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';             
               
             // Is the user allowed to administrate at all? ([admin])
             if ($context['allow_admin'])
                 echo'               
                   <li>
                   <a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[2] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>
                             <li><a href="index.php?action=ban">' , $txt['banlist'] , '</a></li>
                            <li><a href="index.php?action=packages">' , $txt['packages'] , '</a></li>
                            <li><a href="index.php?action=regcenter">' , $txt['regist'] , '</a></li>
                            <li><a href="index.php?action=viewErrorLog;desc">' , $txt['errorlog'] , '</a></li>
                            <li><a href="index.php?action=maintain">' , $txt['maintain'] , '</a></li>                       
                             <li><a href="index.php?action=news">' , $txt['newsand'] , '</a></li>                                                 
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';               
           
             // Go to PM center... [pm]
             if ($context['user']['is_logged'] && $context['allow_pm'])
                echo'
                <li>
                   <a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt['messages'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                           
                            <li><a href="index.php?action=pm;f=outbox">' , $txt['outbox'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=send">' , $txt['sendmess'] , '</a></li>
                             <li><a href="index.php?action=pm;sa=search">' , $txt['searchmess'] , '</a></li>
                             <li><a href="index.php?action=profile;sa=pmprefs">' , $txt['pm_options'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

             // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                echo'
                   <li>
                   <a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[79] , '</span>
                      <span class="menu-right"></span>
                   </a>
                         <div class="sub">
                         <ul>                                                         
                               <li><a href="index.php?action=profile;sa=forumProfile">' , $txt['forpro'] , '</a></li>

                               <li><a href="index.php?action=profile;sa=theme">' , $txt['layout'] , '</a></li>
                                 <li><a href="index.php?action=profile;sa=account">' , $txt['account'] , '</a></li>
                          </ul>
                         <div class="btm-bg"></div>
                      </div>
                </li>';

                 // How about the [search] button?
             if ($context['allow_search'])
                echo '
                   <li>
                   <a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search">
                       <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[182] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';               
                       
             // If the user is a guest, show the [login] button.
             if ($context['user']['is_guest'])
                echo'   
                   <li>
                   <a ' , $current_action=='login' ? ' class="current"' : '' , 'href="', $scripturl, '?action=login">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[34] , '</span>
                      <span class="menu-right"></span>
                   </a>
                           <div class="sub">
                         <ul>                                                         
                               <li>
                                   <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
                                      <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
                                     <td valign="middle">
                                    <label for="user2"><b>', $txt[35], ':</b>
                                    <input type="text" name="user" id="user2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="passwrd2"><b>', $txt[36], ':</b>
                                    <input type="password" name="passwrd" id="passwrd2" size="12" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <label for="cookielength2"><b>', $txt['minutes'], ':</b>
                                    <input type="text" name="cookielength" id="cookielength2" size="12" style="margin: 0 0 0 10px;" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
                                     </td></tr>
                                     <tr><td valign="middle">
                                    <input type="submit" style="width: 155px;" value="', $txt[34], '" />
                                     </td></tr></table>
                                       </form>
                               </li>
                         </ul>
                         <div class="btm-bg"></div>
                      </div>
                   </li>';
               
             // If the user is a guest, also show  the[register] button.
             if ($context['user']['is_guest'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='register' ? ' class="current"' : '' , 'href="', $scripturl, '?action=register">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[97] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
               
             // Otherwise, they might want to [logout]...
             if ($context['user']['is_logged'])
                echo'
                   <li class="last">
                   <a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
                      <span class="menu-left"></span>
                      <span class="menu-mid">' , $txt[108] , '</span>
                      <span class="menu-right"></span>
                   </a>
                   </li>';
          echo'         
             </ul>
          </div>
                <div class="tabs-right"></div>';

}
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 18, 2008, 05:01:13 PM
I wanted the whole file so I could see the code properly..

I need the unedited, working version :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: CKWT on November 19, 2008, 01:36:34 AM
Hi, I have a site with nneons ajax shoutbox installed .. and When I tried to remove the "letters" it gives me an error...

Any ideas.. Thanks

Charlton White
www.catrachosgaming.tk
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 19, 2008, 11:02:49 AM
This is a problem with my mod?

My mod shouldnt hurt a shoutbox, what is the error and what are you trying to remove?
Title: Re: "unread" and "replies" tabs for main menu
Post by: bullbreedluverz on November 19, 2008, 11:13:50 AM
cool mod, helped to tidy up my forum design - cheers
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 19, 2008, 02:54:08 PM
No worries :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: CKWT on November 19, 2008, 03:26:10 PM
Quote from: Jade on November 19, 2008, 11:02:49 AM
This is a problem with my mod?

My mod shouldnt hurt a shoutbox, what is the error and what are you trying to remove?

I tried again and now the Buttons added, I believe it show the error because I tried from the SMF updates and unlike right now I downloaded the file.. well. it's working but It did not remove the top "text"... from above.. Screen attached

Thanks for the help

Charlton White
www.catrachosgaming.tk
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 19, 2008, 06:34:43 PM
Try the attached mod for now, the new version of this mod should have that.

I have tested these, and they seem okay, however, use at your own risk!!
V1: Removes unread/replies/time online text
V2: Removes unread/replies text
Title: Re: "unread" and "replies" tabs for main menu
Post by: The Saviour on November 26, 2008, 04:29:00 AM
I'm entitled to my opinion...

Just what we needed...more tabs on our already overflowing navigation menus...

Personally...I like the text idea much better...sorry Jade.

Chalk this one up as redundant...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Burke ♞ Knight on November 26, 2008, 06:53:28 AM
Quote from: The Saviour on November 26, 2008, 04:29:00 AM
I'm entitled to my opinion...

Just what we needed...more tabs on our already overflowing navigation menus...

Personally...I like the text idea much better...sorry Jade.

Chalk this one up as redundant...


You do realize, that not everyone adds Arcade, Gallery, etc. to their forum, yet have a lot of people that like the functions of the Unread and Reply links, and that the text ones sometimes mess up a theme's looks. That is what this mod is for.
Title: Re: "unread" and "replies" tabs for main menu
Post by: The Saviour on November 26, 2008, 01:45:16 PM
Then on that reply, I stand corrected...

However, for those who use the default/core themes...my opinion still stands...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 26, 2008, 03:21:28 PM
Quote from: The Saviour on November 26, 2008, 04:29:00 AM
I'm entitled to my opinion...

Just what we needed...more tabs on our already overflowing navigation menus...

Personally...I like the text idea much better...sorry Jade.

Chalk this one up as redundant...

Sorry to hear you dont like the mod. However, many buttons arent necessary at all, and can be removed. This mod is intended for when the text is removed, and more intended for my theme:
http://custom.simplemachines.org/themes/index.php?lemma=1148

I've customised this menu to be effective: http://www.bunnyrabbitsex.com/

It's all about what the end user wants or needs. I have huge userbars for this on my site, because the users wanted and needed them. We have them in the header and footer. I removed them once, no one could function properly (me included) >:D.

Quote from: The Saviour on November 26, 2008, 01:45:16 PM
Then on that reply, I stand corrected...

However, for those who use the default/core themes...my opinion still stands...

Where did I say it was built for that?

Quote from: Jade on November 06, 2008, 12:34:59 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1497)

Functionality

Basically, this adds two tabs to the main menu: "Unread" and "replies".

The tabs are meant to replace the ugly text of "Show unread posts since last visit" and "Show new replies to your posts", which I remove from my themes. It also shows ALL unread messages, regardless of last visit time, unlike the default "unread" action which you get through that text :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Afro on November 30, 2008, 03:14:48 PM
nice mod Jade...
I got a small problem though..
After installing the mod, The ''Welcome, Guest. Please login or register.'' message on the user area couldnt go out again even if i am signed in.

I mean if you log in to the forum, the message still  remain up there..

any thing i can do about that?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on November 30, 2008, 05:27:57 PM
Well I guess you installed version 3.0? What is your SMF version and can I have a link?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Afro on December 01, 2008, 11:32:56 AM
i m on 1.1.4 version upgraded to 1.1. 7.

i was able to edit the indextemplate.file to remove the message.

thanks
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on December 01, 2008, 01:12:08 PM
Okay... I'll update the mod when I get back, which version was it?
Title: Re: "unread" and "replies" tabs for main menu
Post by: chinaren on December 31, 2008, 10:38:08 PM
I'd really like this, but I am one of those with waaay too many buttons on the bar (trying to find out how to get rid of the redundant ones btw, if you could point me in the at direction, I've seen them somewhere, but now can't find the file.)

Anyway, any chance of having this mod, but with the two new options replacing the old text in the welcome box instead of the menu bar? 

That would be super!  :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on January 02, 2009, 08:57:51 PM
Well you would only need to change one, so send me your index.template.php file :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: chinaren on January 03, 2009, 04:13:24 AM
Quote from: Jade on January 02, 2009, 08:57:51 PM
Well you would only need to change one, so send me your index.template.php file :)

Who me?  :o
Title: Re: "unread" and "replies" tabs for main menu
Post by: Garry1953 on January 05, 2009, 05:29:29 PM
Handy addon for my forum. (2.0 beta 4)

I'm using v2.0 of the mod, works great thanks.

P.S. I tried v3.0, but it also removed Total time logged in:

Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on January 05, 2009, 11:56:45 PM
Quote from: Garry1953 on January 05, 2009, 05:29:29 PM
Handy addon for my forum. (2.0 beta 4)

I'm using v2.0 of the mod, works great thanks.

P.S. I tried v3.0, but it also removed Total time logged in:



I had a version that didnt... but I couldnt be bothered with it..

See here:
http://www.simplemachines.org/community/index.php?topic=272622.msg1806261#msg1806261

Quote from: chinaren on January 03, 2009, 04:13:24 AM
Quote from: Jade on January 02, 2009, 08:57:51 PM
Well you would only need to change one, so send me your index.template.php file :)

Who me?  :o

Yes :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: waronyou on January 09, 2009, 08:07:50 PM
Its nice to see a modder offering such frequent support. Kudos to Jade!
Now I have a problem my global mod cant see the post and linking directly doesnt work. It works for admin, regular members, just not global mod. IDK  1.6 Default. http://waronyou.com/forum

I checked permissions but theres none for the mod.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Phat^Trance on January 10, 2009, 06:13:34 AM
is there an option to see how many unread/reply message u have from the board index, before clicking on the links?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on January 10, 2009, 08:51:28 PM
Quote from: waronyou on January 09, 2009, 08:07:50 PM
Its nice to see a modder offering such frequent support. Kudos to Jade!
Now I have a problem my global mod cant see the post and linking directly doesnt work. It works for admin, regular members, just not global mod. IDK  1.6 Default. http://waronyou.com/forum

I checked permissions but theres none for the mod.

Thanks :D

I don't know what would cause such an issue....can you attach your index template for me please?

Quote from: Phat^Trance on January 10, 2009, 06:13:34 AM
is there an option to see how many unread/reply message u have from the board index, before clicking on the links?

Umm no it doesnt have that. I think calling that could cause some very slow loads, especially for active forums.
Title: Re: "unread" and "replies" tabs for main menu
Post by: waronyou on January 12, 2009, 04:20:07 AM
I fixed it my mods language was set english_british
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on January 12, 2009, 08:26:22 AM
Okay, glad you fixed it :D

If anyone can translate to other languages, please let me know!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Joe N on February 15, 2009, 01:42:55 PM
Whenever I install this mod, the member details at the top disappear
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 15, 2009, 02:15:21 PM
Then you are installing the wrong version. Please read the description :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: CKWT on February 15, 2009, 04:55:28 PM
Quote from: Jade on January 12, 2009, 08:26:22 AM
Okay, glad you fixed it :D

If anyone can translate to other languages, please let me know!

I can Translate to

Spanish and Spanish_Latin

Send me a PM or in my profile is my email.. Glad to help

Charlton
Title: Re: "unread" and "replies" tabs for main menu
Post by: MummiesOnline on May 10, 2009, 09:42:52 PM
Hi,

I'm currently using this mod and would like to bold the usernames in the list when using the unread/replies tab.

Am wondering how I would do this.

Thanks
Kirsty
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 10, 2009, 10:09:40 PM
You'd have to edit the recent template I believe :). It's not part of my mod, but if you attach your recent.template.php file here, I'll edit it for you :). It's found in Themes/{theme name or "default"/ and you can get it via FTP.

How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480)
Title: Re: "unread" and "replies" tabs for main menu
Post by: MummiesOnline on May 10, 2009, 10:26:42 PM
Thanks for your help :)

Kirsty
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 11, 2009, 12:44:36 AM
Try this one :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: MummiesOnline on May 11, 2009, 12:57:25 AM
That worked beautifully, thank you very much :)

Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 11, 2009, 01:06:07 AM
No worries :D. I'm happy to help :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Joe N on May 11, 2009, 11:05:53 AM
Like it. Thanks Jade
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 11, 2009, 06:06:32 PM
No worries Joe :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: ibmorjamn on June 01, 2009, 11:58:53 PM
installed but not working. I got to check back in tomorrow! 8)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 02, 2009, 12:48:37 AM
What's your SMF version?
Title: Re: "unread" and "replies" tabs for main menu
Post by: ibmorjamn on June 02, 2009, 05:45:10 PM
well it's the default core . someone changed it up for me.
"what ive actually done is add the custom theme files to the default theme so effectively the default theme becomes a custom theme BUT keeps the simplicity of installing stuff to normal default core"
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 02, 2009, 06:09:03 PM
Wow that's a HUGE no no....

http://www.smfthemes.org/index.php?topic=356.0


You didnt answer my question either, I can't help if I don't know what version you're using :). I need to know what theme now too :D. Can you also attach your index.template.php file from the theme folder?
Title: Re: "unread" and "replies" tabs for main menu
Post by: ibmorjamn on June 02, 2009, 09:44:11 PM
oh yeah version 1.1.9 I honestly don't know what the theme is because someone did it for me but he knows what he is doing so I would think he made a copy of the default first so it is a custom theme but easy to mod because it's default core ( I guess)
I'll get the template.php for you.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 03, 2009, 09:59:32 PM
Hey!

Sorry I took a while, I've been having a LOT of mouse problems - clicking wise. Made it hard to do anything.

Try this :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: ibmorjamn on June 03, 2009, 10:17:35 PM
thanks Jade, I'll try that. would I just replace the entire template.index with your edit?
James
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 03, 2009, 10:23:44 PM
Yes, just upload and refresh your browser page :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: karls on June 04, 2009, 03:01:08 AM
Hi,

I installed this package but I can still see when logged in as a member or admin:

Show unread posts since last visit.
Show new replies to your posts.

http://linkbuilderexpert.com/forum/

Karl
Title: Re: "unread" and "replies" tabs for main menu
Post by: Joe N on June 04, 2009, 04:13:16 AM
Maybe because your using a custom theme...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 05, 2009, 02:04:56 PM
Correct. On 1.1.9 you have to install the mod on all themes. You can do that by downloading the files and editing the code the mod site parser says to. If the file isnt there skip it :).

On the mod page you select the version you downloaded, and then your SMF version and hit parse :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Velvet on June 06, 2009, 03:06:28 AM
Hey Jade,

I installed the mod on 1.1.9 for the buttons to appear and the text to disappear but two sets of buttons showed up.  I then tried to uninstall the mod and it came up Hacker?.

According to my packages it has uninstalled but I have two sets of buttons and the text showing now. 

How do I remove the whole thing?  I just want my default forum as it was.

PS.  This was a fresh install. I have no other mods.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 06, 2009, 10:00:03 AM
I guess it installed twice or something.

Karls and Velvet please attach the index.template.php file of the theme in question - and tell me which version you installed :D. If you had trouble installing it Velvet I can fix it up for you so it works if you would like :)....Though if you have a fresh install of SMF you can just replace the file from the SMF install package :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: MustangFD on July 26, 2009, 05:31:30 PM
Sorry to bother you Jade, I have installed the mod but nothing happens, I have also tryed to install it manual but sdame thing, it doesnt seems to work.  :'(

Im using a custom template csclean, SMF. 1.1.10 in spanish I have atached the Themes/default/index.template.php I tryed to modifyed the index.template.php of my theme but I couldnt find all the codes to replace.

Hope you can Help me.  :D

Thanks in advance.

my forum   www.forodiecast.com



Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on July 26, 2009, 05:41:47 PM
You might need to add the strings to the Spanish language files.

Can you attach the following please?
Modifications.spanish-utf8.php
Modifications.spanish.php

Also, if you have Spanish translations for either of these, that would be good :).

What version were you trying to install?
Title: Re: "unread" and "replies" tabs for main menu
Post by: MustangFD on July 26, 2009, 06:05:57 PM
I were trying to install V3.0

I have attached all the languages files, there is no Modifications.spanish.php
only Modifications.spanish-utf8.php .

I have also attached the files in the languages folder at my custom theme CSClean.

Thanks again, I wasnt expecting such a fast answer.

:D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on July 27, 2009, 11:09:42 PM
Try these :)

Title: Re: "unread" and "replies" tabs for main menu
Post by: MustangFD on August 04, 2009, 04:18:16 AM
Thanks, i will try it.    ;D
 
Title: Re: "unread" and "replies" tabs for main menu
Post by: Doyne on August 22, 2009, 01:26:44 PM
Great Mod.  It works great on mt 1.1.9 but on a new site with 1.1.10 i have this prob.

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Can't seem to find the problem.  Any help.

Here is my index.template

<?php
// Version: 1.1.5; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
else
echo '
<img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' 
$context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// Send the guest a lovely greeting! echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

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

// I'm a random comment, YAY! (don't delete me)

if (!empty($modSettings['enableChatBelowPM'])){
$count count(chatOnlineUsers());
if ($count == )
echo '<br />' $txt['chat_no_user'];
elseif ($count == )
  
echo '<br />  1' $txt['chat_aUser']. '.<br />';
else
  
echo '<br /> ' $count $txt['chat_users']. '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, '' . $context['session_id'] . '');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// 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 '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// 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 '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show WebsiteButton
function show_websiteButton()
{
global $context$txt$modSettings;

echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
<td valign="top" class="maintab_back">
<a href="'
, isset($modSettings['websiteButton_url']) ? $modSettings['websiteButton_url'] : 'http://www.roadrunner.cx''" alt="', isset($txt['websiteButtonAlt_txt']) ? $txt['websiteButtonAlt_txt'] : 'Website''">',
isset($txt['websiteButton_txt']) ? $txt['websiteButton_txt'] : 'Website''</a>
</td>'
;
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt$modSettings;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];

  
        if (
$context['current_action'] == 'unreadreplies')
                
$current_action 'unreadreplies';
if ($context['current_action'] == 'unread')
                
$current_action 'unread';
    
        if (
$context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [website] button.

show_websiteButton();
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// Show the [replies] button
if ($context['user']['is_logged'])
echo ($current_action == 'unreadreplies' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'unreadreplies' 'active_back' 'back' '">
<a href="'
$scripturl'?action=unreadreplies">' $txt['tab_replies'] , '</a>
</td>' 
$current_action == 'unreadreplies' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// Show the [unread] button
if ($context['user']['is_logged'])
echo ($current_action == 'unread' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'unread' 'active_back' 'back' '">
<a href="'
$scripturl'?action=unread;all;start=0">' $txt['tab_unread'] , '</a>
</td>' 
$current_action == 'unread' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



// the [chat] button
$chatPath str_replace("index.php""chat/index.php"$scripturl);
$num = (empty($modSettings['enableChatButtonNo'])) ? count(chatOnlineUsers());
echo $context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
<td valign="top" class="maintab_back">
<a href="'
$chatPath'"', empty($modSettings['chatPopUp']) ? 'target="_blank"' ' onclick="openWindow(this.href);this.blur();return false;"''>'$txt['chat'], ($num 0) ?  ('('.$num.')') : '' '</a>
</td>'
; // Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
<td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

// The end of tab section.
echo '
<td class="maintab_' 
$last '">&nbsp;</td>
</tr>
</table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on August 22, 2009, 03:28:14 PM
I don't know if you meant to comment out 231, but I changed:

// Send the guest a lovely greeting!      echo $txt['welcome_guest'];

to

// Send the guest a lovely greeting!
      echo $txt['welcome_guest'];


I don't really see any issues, can you try this? It would really help me if I knew what line to look at.

<?php
// Version: 1.1.5; index

/*   This template is, perhaps, the most important template in the theme. It
   contains the main template layer that displays the header and footer of
   the forum, namely with main_above and main_below. It also contains the
   menu sub template, which appropriately displays the menu; the init sub
   template, which is there to set the theme up; (init can be missing.) and
   the linktree sub template, which sorts out the link tree.

   The init sub template should load any data and set any hardcoded options.

   The main_above sub template is what is shown above the main content, and
   should contain anything that should be shown up there.

   The main_below sub template, conversely, is shown after the main content.
   It should probably contain the copyright statement and some other things.

   The linktree sub template should display the link tree, using the data
   in the $context['linktree'] variable.

   The menu sub template should display all the relevant buttons the user
   wants and or needs.

   For more information on the templating system, please see the site at:
   http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
   global 
$context$settings$options$txt;

   
/* Use images from default theme when using templates from the default theme?
      if this is 'always', images from the default theme will be used.
      if this is 'defaults', images from the default theme will only be used with default templates.
      if this is 'never' or isn't set at all, images from the default theme will not be used. */
   
$settings['use_default_images'] = 'never';

   
/* What document type definition is being used? (for font size and other issues.)
      'xhtml' for an XHTML 1.0 document type definition.
      'html' for an HTML 4.01 document type definition. */
   
$settings['doctype'] = 'xhtml';

   
/* The version this template/theme is for.
      This should probably be the version of SMF it was created for. */
   
$settings['theme_version'] = '1.1';

   
/* Set a setting that tells the theme that it can render the tabs. */
   
$settings['use_tabs'] = true;

   
/* Use plain buttons - as oppossed to text buttons? */
   
$settings['use_buttons'] = true;

   
/* Show sticky and lock status seperate from topic icons? */
   
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
   global 
$context$settings$options$scripturl$txt$modSettings;

   
// Show right to left and the character set for ease of translating.
   
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
   <meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
   <meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
   <meta name="robots" content="noindex" />'
'
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "'
$settings['theme_url'], '";
      var smf_images_url = "'
$settings['images_url'], '";
      var smf_scripturl = "'
$scripturl'";
      var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
      var smf_charset = "'
$context['character_set'], '";
   // ]]></script>
   <title>'
$context['page_title'], '</title>';

   
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
   
echo '
   <link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

   
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   
if ($context['browser']['needs_size_fix'])
      echo 
'
   <link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

   
// Show all the relative links, such as help, search, contents, and the like.
   
echo '
   <link rel="help" href="'
$scripturl'?action=help" target="_blank" />
   <link rel="search" href="' 
$scripturl '?action=search" />
   <link rel="contents" href="'
$scripturl'" />';

   
// If RSS feeds are enabled, advertise the presence of one.
   
if (!empty($modSettings['xmlnews_enable']))
      echo 
'
   <link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

   
// If we're viewing a topic, these should be the previous and next topics, respectively.
   
if (!empty($context['current_topic']))
      echo 
'
   <link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

   
// If we're in a board, or a topic for that matter, the index will be the board's index.
   
if (!empty($context['current_board']))
      echo 
'
   <link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

   
// We'll have to use the cookie to remember the header...
   
if ($context['user']['is_guest'])
   {
      
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
      
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
   }

   
// Output any remaining HTML headers. (from mods, maybe?)
   
echo $context['html_headers'], '

   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

      function shrinkHeader(mode)
      {'
;

   
// Guests don't have theme options!!
   
if ($context['user']['is_guest'])
      echo 
'
         document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
   else
      echo 
'
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

   echo 
'
         document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

         document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
         document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

         current_header = mode;
      }
   // ]]></script>'
;

   
// the routine for the info center upshrink
   
echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

         function shrinkHeaderIC(mode)
         {'
;

   if (
$context['user']['is_guest'])
      echo 
'
            document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
   else
      echo 
'
            smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

   echo 
'
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

            current_header_ic = mode;
         }
      // ]]></script>
</head>
<body>'
;

   echo 
'
   <div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
            <td class="catbg" height="32">'
;

   if (empty(
$settings['header_logo_url']))
      echo 
'
               <span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
   else
      echo 
'
               <img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

   echo 
'
            </td>
            <td align="right" class="catbg">
               <img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
            </td>
         </tr>
      </table>'
;


   
// display user name
   
echo '
      <table width="100%" cellpadding="0" cellspacing="0" border="0" >
         <tr>'
;

   if(
$context['user']['is_logged'])
      echo 
'
            <td class="titlebg2" height="32">
               <span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
            </td>'
;

   
// display the time
   
echo '
            <td class="titlebg2" height="32" align="right">
               <span class="smalltext">' 
$context['current_time'], '</span>';

   
// this is the upshrink button for the user info section
   
echo '
               <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
            </td>
         </tr>
         <tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
            <td valign="top" colspan="2">
               <table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
                  <tr>'
;

   if (!empty(
$context['user']['avatar']))
      echo 
'
                     <td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

   echo 
'
                     <td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// Send the guest a lovely greeting! 
     
echo $txt['welcome_guest'];

   
// Now, onto our second set of info, are they logged in again?
   
if ($context['user']['is_logged'])
   {
      
// Is the forum in maintenance mode?
      
if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo 
'
                        <b>'
$txt[616], '</b><br />';

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

// I'm a random comment, YAY! (don't delete me)      

if (!empty($modSettings['enableChatBelowPM'])){
         
$count count(chatOnlineUsers());
         if (
$count == )
            echo 
'<br />' $txt['chat_no_user'];
         elseif (
$count == )
           echo 
'<br />  1' $txt['chat_aUser']. '.<br />';
         else
           echo 
'<br /> ' $count $txt['chat_users']. '<br />';
      }
      echo 
'            </span>';
   }
   
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   
else
   {
      echo 
'            </span>
                        <script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

                        <form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, '' . $context['session_id'] . '');"' '''>
                           <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                           <select name="cookielength">
                              <option value="60">'
$txt['smf53'], '</option>
                              <option value="1440">'
$txt['smf47'], '</option>
                              <option value="10080">'
$txt['smf48'], '</option>
                              <option value="43200">'
$txt['smf49'], '</option>
                              <option value="-1" selected="selected">'
$txt['smf50'], '</option>
                           </select>
                           <input type="submit" value="'
$txt[34], '" /><br />
                           <span class="middletext">'
$txt['smf52'], '</span>
                           <input type="hidden" name="hash_passwrd" value="" />
                        </form>'
;
   }

   echo 
'
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
      </table>'
;

   echo 
'
      <table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
         <tr>'
;

   
// Show a random news item? (or you could pick one from news_lines...)
   
if (!empty($settings['enable_news']))
      echo 
'
            <td width="90%" class="titlebg2">
               <span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
            </td>'
;
   echo 
'
            <td class="titlebg2" align="right" nowrap="nowrap" valign="top">
               <form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
                  <a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
                  <input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
                  <input type="hidden" name="advanced" value="0" />'
;

   
// Search within current topic?
   
if (!empty($context['current_topic']))
      echo 
'
                  <input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

      
// If we're on a certain board, limit it to this board ;).
   
elseif (!empty($context['current_board']))
      echo 
'
                  <input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

   echo 
'
               </form>
            </td>
         </tr>
      </table>
   </div>'
;


   
// Show the menu here, according to the menu sub template.
   
template_menu();


   
// The main content should go here.
   
echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
   global 
$context$settings$options$scripturl$txt;

   echo 
'
   </div>'
;

   
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   
echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // ]]></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
               <a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
            </td>
            <td valign="middle" align="center" style="white-space: nowrap;">
               '
theme_copyright(), '
            </td>
            <td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
               <a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
            </td>
         </tr>
      </table>'
;

      
// Show the load time?
   
if ($context['show_load_time'])
      echo 
'
      <span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
   
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
   {
      
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
      
echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

      
// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
      
if ($context['browser']['is_safari'])
         echo 
'
         window.addEventListener("load", smf_codeFix, false);

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
            }
         }'
;
      elseif (
$context['browser']['is_firefox'])
         echo 
'
         window.addEventListener("load", smf_codeFix, false);
         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
                  codeFix[i].style.overflow = "scroll";
            }
         }'
;
      else
         echo 
'
         var window_oldOnload = window.onload;
         window.onload = smf_codeFix;

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = codeFix.length - 1; i > 0; i--)
            {
               if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
            }

            if (window_oldOnload)
            {
               window_oldOnload();
               window_oldOnload = null;
            }
         }'
;

      echo 
'
      // ]]></script>'
;
   }

   echo 
'
   </div>'
;

   
// The following will be used to let the user know that some AJAX process is running
   
echo '
   <div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global 
$context$settings$options;

   echo 
'<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

   
// Each tree item has a URL and name. Some may have extra_before and extra_after.
   
foreach ($context['linktree'] as $link_num => $tree)
   {
      
// 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 '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

      
// 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 
'&nbsp;>&nbsp;';
   }

   echo 
'</div>';
}

// Show WebsiteButton
function show_websiteButton()
{
   global 
$context$txt$modSettings;

   echo 
$context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
      <td valign="top" class="maintab_back">
         <a href="'
, isset($modSettings['websiteButton_url']) ? $modSettings['websiteButton_url'] : 'http://www.roadrunner.cx''" alt="', isset($txt['websiteButtonAlt_txt']) ? $txt['websiteButtonAlt_txt'] : 'Website''">',
            isset(
$txt['websiteButton_txt']) ? $txt['websiteButton_txt'] : 'Website''</a>
            </td>'
;
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global 
$context$settings$options$scripturl$txt$modSettings;

   
// Work out where we currently are.
   
$current_action 'home';
   if (
in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
      
$current_action 'admin';
   if (
in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
      
$current_action $context['current_action'];
   
  
        if (
$context['current_action'] == 'unreadreplies')
                
$current_action 'unreadreplies';
   if (
$context['current_action'] == 'unread')
                
$current_action 'unread';
    
        if (
$context['current_action'] == 'search2')
      
$current_action 'search';
   if (
$context['current_action'] == 'theme')
      
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

   
// Are we using right-to-left orientation?
   
if ($context['right_to_left'])
   {
      
$first 'last';

      
$last 'first';
   }
   else
   {
      
$first 'first';
      
$last 'last';
   }

   
// Show the start of the tab section.
   
echo '
         <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
            <tr>
               <td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [website] button.

   
show_websiteButton();
   
// Show the [home] button.
   
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
               <a href="'
$scripturl'">' $txt[103] , '</a>
            </td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Show the [help] button.
   
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=help">' $txt[119] , '</a>
            </td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// How about the [search] button?
   
if ($context['allow_search'])
      echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=search">' $txt[182] , '</a>
            </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Is the user allowed to administrate at all? ([admin])
   
if ($context['allow_admin'])
      echo (
$current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
            </td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Edit Profile... [profile]
   
if ($context['allow_edit_profile'])
      echo (
$current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
            </td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Go to PM center... [pm]
   
if ($context['user']['is_logged'] && $context['allow_pm'])
      echo (
$current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
            </td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// The [calendar]!
   
if ($context['allow_calendar'])
      echo (
$current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
            </td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// the [member] list button
   
if ($context['allow_memberlist'])
      echo (
$current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
            </td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
   
// Show the [replies] button
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'unreadreplies' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'unreadreplies' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=unreadreplies">' $txt['tab_replies'] , '</a>
            </td>' 
$current_action == 'unreadreplies' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Show the [unread] button
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'unread' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'unread' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=unread;all;start=0">' $txt['tab_unread'] , '</a>
            </td>' 
$current_action == 'unread' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



   
// If the user is a guest, show [login] button.
   
if ($context['user']['is_guest'])
      echo (
$current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=login">' $txt[34] , '</a>
            </td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


   
// If the user is a guest, also show [register] button.
   
if ($context['user']['is_guest'])
      echo (
$current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=register">' $txt[97] , '</a>
            </td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



   
// the [chat] button
   
$chatPath str_replace("index.php""chat/index.php"$scripturl);
   
$num = (empty($modSettings['enableChatButtonNo'])) ? count(chatOnlineUsers());
   echo 
$context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
      <td valign="top" class="maintab_back">
         <a href="'
$chatPath'"', empty($modSettings['chatPopUp']) ? 'target="_blank"' ' onclick="openWindow(this.href);this.blur();return false;"''>'$txt['chat'], ($num 0) ?  ('('.$num.')') : '' '</a>
      </td>'
;   
  
// Otherwise, they might want to [logout]...
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
            </td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// The end of tab section.
   
echo '
            <td class="maintab_' 
$last '">&nbsp;</td>
         </tr>
      </table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
   global 
$settings$buttons$context$txt$scripturl;

   
// Create the buttons...
   
foreach ($button_strip as $key => $value)
   {
      if (isset(
$value['test']) && empty($context[$value['test']]))
      {
         unset(
$button_strip[$key]);
         continue;
      }
      elseif (!isset(
$buttons[$key]) || $force_reset)
         
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

      
$button_strip[$key] = $buttons[$key];
   }

   if (empty(
$button_strip))
      return 
'<td>&nbsp;</td>';

   echo 
'
      <td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
      <td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
      <td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>
Title: Re: "unread" and "replies" tabs for main menu
Post by: Doyne on August 22, 2009, 04:28:15 PM
No help.

I didn't have this prob until I installed this mod.  I really want it to work.


My editor does not have line numbers for some reason. 

But here is the error message again.

QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

I can not see anything wrong here.  Any one have a better set of eyes?  Please help.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on August 22, 2009, 05:24:53 PM
Try this one? If it works I'll tell you what was wrong :).


<?php
// Version: 1.1.5; index

/*   This template is, perhaps, the most important template in the theme. It
   contains the main template layer that displays the header and footer of
   the forum, namely with main_above and main_below. It also contains the
   menu sub template, which appropriately displays the menu; the init sub
   template, which is there to set the theme up; (init can be missing.) and
   the linktree sub template, which sorts out the link tree.

   The init sub template should load any data and set any hardcoded options.

   The main_above sub template is what is shown above the main content, and
   should contain anything that should be shown up there.

   The main_below sub template, conversely, is shown after the main content.
   It should probably contain the copyright statement and some other things.

   The linktree sub template should display the link tree, using the data
   in the $context['linktree'] variable.

   The menu sub template should display all the relevant buttons the user
   wants and or needs.

   For more information on the templating system, please see the site at:
   http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
   global 
$context$settings$options$txt;

   
/* Use images from default theme when using templates from the default theme?
      if this is 'always', images from the default theme will be used.
      if this is 'defaults', images from the default theme will only be used with default templates.
      if this is 'never' or isn't set at all, images from the default theme will not be used. */
   
$settings['use_default_images'] = 'never';

   
/* What document type definition is being used? (for font size and other issues.)
      'xhtml' for an XHTML 1.0 document type definition.
      'html' for an HTML 4.01 document type definition. */
   
$settings['doctype'] = 'xhtml';

   
/* The version this template/theme is for.
      This should probably be the version of SMF it was created for. */
   
$settings['theme_version'] = '1.1';

   
/* Set a setting that tells the theme that it can render the tabs. */
   
$settings['use_tabs'] = true;

   
/* Use plain buttons - as oppossed to text buttons? */
   
$settings['use_buttons'] = true;

   
/* Show sticky and lock status seperate from topic icons? */
   
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
   global 
$context$settings$options$scripturl$txt$modSettings;

   
// Show right to left and the character set for ease of translating.
   
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
   <meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
   <meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
   <meta name="robots" content="noindex" />'
'
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "'
$settings['theme_url'], '";
      var smf_images_url = "'
$settings['images_url'], '";
      var smf_scripturl = "'
$scripturl'";
      var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
      var smf_charset = "'
$context['character_set'], '";
   // ]]></script>
   <title>'
$context['page_title'], '</title>';

   
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
   
echo '
   <link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

   
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   
if ($context['browser']['needs_size_fix'])
      echo 
'
   <link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

   
// Show all the relative links, such as help, search, contents, and the like.
   
echo '
   <link rel="help" href="'
$scripturl'?action=help" target="_blank" />
   <link rel="search" href="' 
$scripturl '?action=search" />
   <link rel="contents" href="'
$scripturl'" />';

   
// If RSS feeds are enabled, advertise the presence of one.
   
if (!empty($modSettings['xmlnews_enable']))
      echo 
'
   <link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

   
// If we're viewing a topic, these should be the previous and next topics, respectively.
   
if (!empty($context['current_topic']))
      echo 
'
   <link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

   
// If we're in a board, or a topic for that matter, the index will be the board's index.
   
if (!empty($context['current_board']))
      echo 
'
   <link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

   
// We'll have to use the cookie to remember the header...
   
if ($context['user']['is_guest'])
   {
      
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
      
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
   }

   
// Output any remaining HTML headers. (from mods, maybe?)
   
echo $context['html_headers'], '

   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

      function shrinkHeader(mode)
      {'
;

   
// Guests don't have theme options!!
   
if ($context['user']['is_guest'])
      echo 
'
         document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
   else
      echo 
'
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

   echo 
'
         document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

         document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
         document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

         current_header = mode;
      }
   // ]]></script>'
;

   
// the routine for the info center upshrink
   
echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

         function shrinkHeaderIC(mode)
         {'
;

   if (
$context['user']['is_guest'])
      echo 
'
            document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
   else
      echo 
'
            smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

   echo 
'
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

            current_header_ic = mode;
         }
      // ]]></script>
</head>
<body>'
;

   echo 
'
   <div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
            <td class="catbg" height="32">'
;

   if (empty(
$settings['header_logo_url']))
      echo 
'
               <span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
$context['forum_name'], '</span>';
   else
      echo 
'
               <img src="'
$settings['header_logo_url'], '" style="margin: 4px;" alt="'$context['forum_name'], '" />';

   echo 
'
            </td>
            <td align="right" class="catbg">
               <img src="'
$settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
            </td>
         </tr>
      </table>'
;


   
// display user name
   
echo '
      <table width="100%" cellpadding="0" cellspacing="0" border="0" >
         <tr>'
;

   if(
$context['user']['is_logged'])
      echo 
'
            <td class="titlebg2" height="32">
               <span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>
            </td>'
;

   
// display the time
   
echo '
            <td class="titlebg2" height="32" align="right">
               <span class="smalltext">' 
$context['current_time'], '</span>';

   
// this is the upshrink button for the user info section
   
echo '
               <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
            </td>
         </tr>
         <tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
            <td valign="top" colspan="2">
               <table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
                  <tr>'
;

   if (!empty(
$context['user']['avatar']))
      echo 
'
                     <td class="windowbg" valign="middle">'
$context['user']['avatar']['image'], '</td>';

   echo 
'
                     <td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

   
// Send the guest a lovely greeting! 
     
echo $txt['welcome_guest'];

   
// Now, onto our second set of info, are they logged in again?
   
if ($context['user']['is_logged'])
   {
      
// Is the forum in maintenance mode?
      
if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo 
'
                        <b>'
$txt[616], '</b><br />';

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

// I'm a random comment, YAY! (don't delete me)      

if (!empty($modSettings['enableChatBelowPM'])){
         
$count count(chatOnlineUsers());
         if (
$count == )
            echo 
'<br />' $txt['chat_no_user'];
         elseif (
$count == )
           echo 
'<br />  1' $txt['chat_aUser']. '.<br />';
         else
           echo 
'<br /> ' $count $txt['chat_users']. '<br />';
      }
      echo 
'            </span>';
   }
   
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   
else
   {
      echo 
'            </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
   }

   echo 
'
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
      </table>'
;

   echo 
'
      <table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="4" cellspacing="0" border="0">
         <tr>'
;

   
// Show a random news item? (or you could pick one from news_lines...)
   
if (!empty($settings['enable_news']))
      echo 
'
            <td width="90%" class="titlebg2">
               <span class="smalltext"><b>'
$txt[102], '</b>: '$context['random_news_line'], '</span>
            </td>'
;
   echo 
'
            <td class="titlebg2" align="right" nowrap="nowrap" valign="top">
               <form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
                  <a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
                  <input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
                  <input type="hidden" name="advanced" value="0" />'
;

   
// Search within current topic?
   
if (!empty($context['current_topic']))
      echo 
'
                  <input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

      
// If we're on a certain board, limit it to this board ;).
   
elseif (!empty($context['current_board']))
      echo 
'
                  <input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

   echo 
'
               </form>
            </td>
         </tr>
      </table>
   </div>'
;


   
// Show the menu here, according to the menu sub template.
   
template_menu();


   
// The main content should go here.
   
echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

function 
template_main_below()
{
   global 
$context$settings$options$scripturl$txt;

   echo 
'
   </div>'
;

   
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   
echo '

   <div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
         }
      // ]]></script>
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
         <tr>
            <td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
               <a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
            </td>
            <td valign="middle" align="center" style="white-space: nowrap;">
               '
theme_copyright(), '
            </td>
            <td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
               <a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
               <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
            </td>
         </tr>
      </table>'
;

      
// Show the load time?
   
if ($context['show_load_time'])
      echo 
'
      <span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

   
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
   
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
   {
      
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
      
echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

      
// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
      
if ($context['browser']['is_safari'])
         echo 
'
         window.addEventListener("load", smf_codeFix, false);

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
            }
         }'
;
      elseif (
$context['browser']['is_firefox'])
         echo 
'
         window.addEventListener("load", smf_codeFix, false);
         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = 0; i < codeFix.length; i++)
            {
               if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
                  codeFix[i].style.overflow = "scroll";
            }
         }'
;
      else
         echo 
'
         var window_oldOnload = window.onload;
         window.onload = smf_codeFix;

         function smf_codeFix()
         {
            var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

            for (var i = codeFix.length - 1; i > 0; i--)
            {
               if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
                  codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
            }

            if (window_oldOnload)
            {
               window_oldOnload();
               window_oldOnload = null;
            }
         }'
;

      echo 
'
      // ]]></script>'
;
   }

   echo 
'
   </div>'
;

   
// The following will be used to let the user know that some AJAX process is running
   
echo '
   <div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global 
$context$settings$options;

   echo 
'<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

   
// Each tree item has a URL and name. Some may have extra_before and extra_after.
   
foreach ($context['linktree'] as $link_num => $tree)
   {
      
// 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 '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

      
// 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 
'&nbsp;>&nbsp;';
   }

   echo 
'</div>';
}

// Show WebsiteButton
function show_websiteButton()
{
   global 
$context$txt$modSettings;

   echo 
$context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
      <td valign="top" class="maintab_back">
         <a href="'
, isset($modSettings['websiteButton_url']) ? $modSettings['websiteButton_url'] : 'http://www.roadrunner.cx''" alt="', isset($txt['websiteButtonAlt_txt']) ? $txt['websiteButtonAlt_txt'] : 'Website''">',
            isset(
$txt['websiteButton_txt']) ? $txt['websiteButton_txt'] : 'Website''</a>
            </td>'
;
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global 
$context$settings$options$scripturl$txt$modSettings;

   
// Work out where we currently are.
   
$current_action 'home';
   if (
in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
      
$current_action 'admin';
   if (
in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
      
$current_action $context['current_action'];
   
  
        if (
$context['current_action'] == 'unreadreplies')
                
$current_action 'unreadreplies';
   if (
$context['current_action'] == 'unread')
                
$current_action 'unread';
    
        if (
$context['current_action'] == 'search2')
      
$current_action 'search';
   if (
$context['current_action'] == 'theme')
      
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

   
// Are we using right-to-left orientation?
   
if ($context['right_to_left'])
   {
      
$first 'last';


      
$last 'first';
   }
   else
   {
      
$first 'first';
      
$last 'last';
   }

   
// Show the start of the tab section.
   
echo '
         <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
            <tr>
               <td class="maintab_' 
$first '">&nbsp;</td>';

// Show the [website] button.

   
show_websiteButton();
   
// Show the [home] button.
   
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'home' 'active_back' 'back' '">
               <a href="'
$scripturl'">' $txt[103] , '</a>
            </td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Show the [help] button.
   
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'help' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=help">' $txt[119] , '</a>
            </td>' 
$current_action == 'help' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// How about the [search] button?
   
if ($context['allow_search'])
      echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=search">' $txt[182] , '</a>
            </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Is the user allowed to administrate at all? ([admin])
   
if ($context['allow_admin'])
      echo (
$current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
            </td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Edit Profile... [profile]
   
if ($context['allow_edit_profile'])
      echo (
$current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
            </td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Go to PM center... [pm]
   
if ($context['user']['is_logged'] && $context['allow_pm'])
      echo (
$current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
            </td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// The [calendar]!
   
if ($context['allow_calendar'])
      echo (
$current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
            </td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// the [member] list button
   
if ($context['allow_memberlist'])
      echo (
$current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
            </td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
   
// Show the [replies] button
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'unreadreplies' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'unreadreplies' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=unreadreplies">' $txt['tab_replies'] , '</a>
            </td>' 
$current_action == 'unreadreplies' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// Show the [unread] button
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'unread' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'unread' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=unread;all;start=0">' $txt['tab_unread'] , '</a>
            </td>' 
$current_action == 'unread' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



   
// If the user is a guest, show [login] button.
   
if ($context['user']['is_guest'])
      echo (
$current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=login">' $txt[34] , '</a>
            </td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


   
// If the user is a guest, also show [register] button.
   
if ($context['user']['is_guest'])
      echo (
$current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=register">' $txt[97] , '</a>
            </td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';



   
// the [chat] button
   
$chatPath str_replace("index.php""chat/index.php"$scripturl);
   
$num = (empty($modSettings['enableChatButtonNo'])) ? count(chatOnlineUsers());
   echo 
$context['browser']['is_ie4'] ? '<td class="maintab_active_' $first '">&nbsp;</td>' '''
      <td valign="top" class="maintab_back">
         <a href="'
$chatPath'"', empty($modSettings['chatPopUp']) ? 'target="_blank"' ' onclick="openWindow(this.href);this.blur();return false;"''>'$txt['chat'], ($num 0) ?  ('('.$num.')') : '' '</a>
      </td>'
;   
     
   
// Otherwise, they might want to [logout]...
   
if ($context['user']['is_logged'])
      echo (
$current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
            <td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
               <a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
            </td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

   
// The end of tab section.
   
echo '
            <td class="maintab_' 
$last '">&nbsp;</td>
         </tr>
      </table>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
   global 
$settings$buttons$context$txt$scripturl;

   
// Create the buttons...
   
foreach ($button_strip as $key => $value)
   {
      if (isset(
$value['test']) && empty($context[$value['test']]))
      {
         unset(
$button_strip[$key]);
         continue;
      }
      elseif (!isset(
$buttons[$key]) || $force_reset)
         
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

      
$button_strip[$key] = $buttons[$key];
   }

   if (empty(
$button_strip))
      return 
'<td>&nbsp;</td>';

   echo 
'
      <td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
      <td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
      <td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>
Title: Re: "unread" and "replies" tabs for main menu
Post by: Doyne on August 22, 2009, 05:53:08 PM
No Cigar.  Same error :(
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on August 22, 2009, 08:01:30 PM
I need a link to your site please, PM it if you're uncomfortable posting :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Doyne on August 22, 2009, 08:48:06 PM
Here you go

http://www.oldsettlersheritagecenter.com/forum/ (http://www.oldsettlersheritagecenter.com/forum/)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on August 22, 2009, 10:00:56 PM
Well that didnt work as expected. There should be a link to the file in the error message, can you click it to access the file directly and tell me what it says please?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Doyne on August 22, 2009, 10:14:52 PM
Hmmmm.  The link brings up a blank page.  ??
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on August 22, 2009, 11:11:48 PM
Can you please confirm you're uploading in Binary, and not ASCII?


Most FTP clients have a setting for this. FileZilla has a "transfer" tab which changes it :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: imrich on October 04, 2009, 09:22:27 AM
Hi Jade,

Thanks for this nice mod. Seems like it should be a default feature!

Two questions:

1) Will it work with 2.0 RC1.2? I'm starting with this version.

2) How about an option to your [Replies] and [Unread] buttons to the menu that is to the right of the 'go up' 'go down' functions

so the menu bar [Mark Read] [Notify] [New Topic] [Post new poll] would become:

[Replies] [Unread] [Mark Read] [Notify] [New Topic] [Post new poll] 

or maybe better yet, place them right next to the 'go up' and 'go down' feature links.

This will allow it easy to find new post for users without having to press 'go up' and then scroll up a bit more to see the main menu to access these very useful buttons, saving mouse clicks and a lot of needless scolling.

What do you think? Thanks!

Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on October 04, 2009, 01:48:37 PM
I think all menus should scroll with you.

On my forum AC, I have another menu on the bottom of the forum cause we tired of scrolling up too. On my other site, I'm developing a fixed menu ;D.

I could probably see about including the buttons in another menu :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: imrich on October 05, 2009, 07:56:22 AM
Quote from: Jade Elizabeth on October 04, 2009, 01:48:37 PM
I could probably see about including the buttons in another menu :).

Thanks, My users use the "Show unread posts since the last visit" a lot. They must be lazy as they complain of having to repeatedly clicking 'Go UP' and then, having to scroll up even further to find the "Show unread posts..", of course with your mod, they would still have to scroll up a bit to find the main menu, so they would still complain!  ::)

I'll keep an eye on this to see if you come up with anything. Thanks for your consideration and for your useful mod.
Title: Re: "unread" and "replies" tabs for main menu
Post by: TomW on December 30, 2009, 11:33:54 PM
Yes, this is a great mod, along with your Shadow People theme.  Do you have plans to upgrade them to 2.0 RC2 ?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Kimmen on January 09, 2010, 07:20:53 PM
I could really use this mod, as i have also deleted the original text/link from my theme. I use SMF 2 RC2, would be nice to have a update for it  :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: TravisM661 on January 10, 2010, 12:25:18 AM
RC2 Version? Please?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on January 10, 2010, 01:08:59 AM
Guy's honestly I DO plan to update this mod and the theme. I'm really really ill at the moment and can barely stay awake and or focused for 30 minutes. I went to the ER twice last week because of it.

I feel really guilty cause I can't update it all :(. It's pretty simple to update, and the buttons themselves shouldnt need changing for RC2. The theme does need to be re-written though. I use the theme on one of my sites and as you can see I havent upgraded it for the same reason.

I'll do it as soon as I can, promise :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: TomW on January 10, 2010, 10:05:20 AM
Sorry to hear, Jade Elizabeth.  Your health is WAY more important.  Take care of yourself.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Phat^Trance on February 16, 2010, 05:23:09 AM
does this mod also work with SMF 1.1.11?
anyone tried this?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 16, 2010, 02:17:19 PM
Quote from: Phat^Trance on February 16, 2010, 05:23:09 AM
does this mod also work with SMF 1.1.11?
anyone tried this?

It should most definitely work with 1.1.11.

I'll be updating this mod HOPEFULLY today. I got a lot on as usual, but at least I'm not sick anymore :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Phat^Trance on February 16, 2010, 06:25:09 PM
i just tested this on SMF 1.1.11 and installed both files and non of them worked, the installation went fine but i cannot see any unread / replies buttons on the nav bar.

any fix?  cause this feature is great! couldn't use my old forum without the unread button :)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi45.tinypic.com%2F2l9qu4y.jpg&hash=3c24a3f464f42c8e245f95154d68a60903eb72b7)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 22, 2010, 02:14:24 PM
Elizabeth, I came here to ask something but all I can say is, get better first, then comes everything else. Hope you get better soon, then we can see about an update :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 23, 2010, 04:02:32 PM
Phat^Trance <Love the name lol

Try CTR + F5. If it doesnt display after that ensure that your cache is cleared. If it still doesnt work I need to know what your language type is :).

Quote from: Gryzor on March 22, 2010, 02:14:24 PM
Elizabeth, I came here to ask something but all I can say is, get better first, then comes everything else. Hope you get better soon, then we can see about an update :)

Thank you! I'm actually working on it now :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 23, 2010, 06:11:37 PM
There we go, it should all work. If it doesnt please let me know!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 24, 2010, 02:58:27 AM
So you feel better? :)

Lemme try it with 2.0RC3...


Hmm... I get:

Execute Modification   ./Themes/default/index.template.php   Test failed
1.   Replace   ./Themes/default/index.template.php   Test failed

How do you get more info?? I get nothing apart from that, not even the link to the file...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 25, 2010, 04:06:43 AM
LOL wow.

Which version is that?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 25, 2010, 04:11:26 AM
Heh :) 3.0.1. Curve... I'd be glad to help you debug anything you might need...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 25, 2010, 04:20:46 AM
Well my issue is the way SMF is, and the way the package manager is.


It parses correctly... have you got any mods installed by any chance? Anything that edits things around the place where the greeting is?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 25, 2010, 04:28:48 AM
Hmmmm... I do have a couple of mods, but none that I can remember of that meddles with stuff in there. I'm attaching my /themes/default/index.template.php for you to look into, if you want. Going through it manually I can't see the stuff your mod tries to replace...

Ah, basically in my file I see:


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


So, if I ignore the errors it cr@ps out, continue with installation and then delete the lines you mention, it should work?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 25, 2010, 05:06:40 PM
Yeah, just don't forget the '; on the end of the last line there, it should move up to where the greeting line is :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Black Viper on March 25, 2010, 11:41:51 PM
Same as above error that the greeting line is not correct. SMF 2.0RC3. My greeting line is:
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

The default line of index.template.php curve (english, full version) is as above downloaded from SMF and viewed directly from the zip file with no
.
This could be why the package manager fails install as it is looking for this line:
<li class="greeting">', $context['greeting'], '</span></li>
Which does not exist...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 26, 2010, 04:34:27 AM
Are we absolutely sure that it works with an untouched 2.0RC3? Just asking - maybe we're banging our heads against the wrong wall here :D

Anyhow, I'll try a manual install tonight hopefully...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Black Viper on March 26, 2010, 05:16:39 AM
Quote from: Gryzor on March 26, 2010, 04:34:27 AM
Are we absolutely sure that it works with an untouched 2.0RC3? Just asking - maybe we're banging our heads against the wrong wall here :D

Anyhow, I'll try a manual install tonight hopefully...
I am not questioning the mods actual functionality, just the install routine.
The line is as stated above on an SMF 2.0 RC3 install as well as verified by me in the full install .zip file looking at it in that archive. This can be done just by viewing the file in that .zip file without installing anything.
It should be noted that this is non-UTF-8 if that makes a difference.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 26, 2010, 05:30:57 AM
I must have been looking at the wrong thing, sorry guys! I'll fix it up in the morning, I don't want to explode everything tonight 8-). I'm too tired lol.

Thanks for pointing it out though, I appreciate it :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 26, 2010, 09:30:22 AM
@Viper: oh, me neither, that's what I meant, too! Obviously it does work somehow!

@Jade: have a good night's rest then, a shame we're in different time zones as I reeeeally want to get this working... I'll post here if I have any luck with manual installation!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Black Viper on March 26, 2010, 10:23:35 AM
Quote from: Jade Elizabeth on March 26, 2010, 05:30:57 AM
I must have been looking at the wrong thing, sorry guys! I'll fix it up in the morning, I don't want to explode everything tonight 8-). I'm too tired lol.
Line number 187 is where I am looking.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 27, 2010, 12:16:03 AM
Should be fixed now guys! I think I might have been looking at one of the other SMF packages I have back here.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 27, 2010, 02:45:28 AM
Hmmm... I still get the same error. Can't replace:

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>


with
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>


:( :( :(


Tried to do it manually, the forum gets broken:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 208
199: if (!empty($context['user']['avatar']))
200: echo '
201: <p class="avatar">', $context['user']['avatar']['image'], '</p>';
202: echo '
203: <ul class="reset">
204: <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>;
205:
206:
207: // Is the forum in maintenance mode?
208: if ($context['in_maintenance'] && $context['user']['is_admin'])
209: echo '
210: <li class="notice">', $txt['maintain_mode_on'], '</li>';
211:
212: // Are there any members waiting for approval?


Yet my file reads:


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>;

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



so, you can see that the ';' is there... argh!

Nonetheless, I went ahead with the installation and now I have an "Unread posts" on the title bar of each main forum's title. Was that there before? :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 27, 2010, 05:34:29 AM
On 204, try adding a ' before the ;... I'll fix it again, sorry :-[.

Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 27, 2010, 06:03:56 AM
Quote from: Jade Elizabeth on March 27, 2010, 05:34:29 AM
On 204, try adding a ' before the ;... I'll fix it again, sorry :-[.

...d'oh!!! Even I knew how to fix that, I guess I was way too sleepy (up since 620am) to notice that... thanks, it now seems to work perfectly, albeit through manual installation.

Cheers!
T
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 27, 2010, 04:23:49 PM
LOL Ha! See, I'm not the only one XD.

I dunno why that happened. I checked my package and it shouldnt even touch the '; on the end....so I think it's your theme :(.

On a default install you have this:

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<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>';



My mod changes it to this:
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on March 29, 2010, 03:43:45 AM
Heheh.... is the mod itself working now? I mean, is it updated so I can test it?

...but then again it will fail, even if updated, since I did the changes by hand... oh well, next SMF upgrade!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on April 01, 2010, 07:36:50 PM
All my mod did was add buttons to the menu that were existing links in SMF (but not commonly found).

The other version does that and removes the visible links in the header to them because some people find that messy lol.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Siwrx on April 21, 2010, 05:49:42 AM
HI guys (and girls)

Since I've changed my forum to the theme "greenblacky", the "show unread post" tab as disapeared, I've tried to install this package and the set up should be fine but nothing change, is everything fixed ? should I do some mod more manually ?

thanks !
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on April 21, 2010, 08:37:16 PM
Try hitting the parse option and editing the files for themedir/default with the ones for your theme :).

Also, don't forget to clear cache :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on August 09, 2010, 01:23:27 PM
HI. When I try to uninstall this MOD, the forum default "#Show unread posts since last visit" and "#Show new replies to your posts" shows up twice. See attachment.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on September 03, 2010, 05:47:16 AM
Did you upload the wrong version to uninstall?
Title: Re: "unread" and "replies" tabs for main menu
Post by: uniektekniek on September 28, 2010, 02:26:12 AM
nice mod.. works very well.. thank you!

is there a possibilty at all to add a function in RC3 similar to msg's where it has a number of how many new replies there actually are?... eg Replies (3)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on October 11, 2010, 07:50:56 AM
That's an AWESOME request!!

Thanks for posting it!!! I'm actually going to look into that because it would REALLY help my forum to have a counter on both tabs.

That's a ******ing fantastic idea if I do say so myself :D. Thanks again!!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on October 11, 2010, 07:56:36 AM
Well.... thinking on it..

I could probably put a "new" image or text part on the tab...
Or maybe say how many pages it is...

But I think if I count the replies it might end up slowing forums down, especially large ones. I don't know if it would make a difference to count individual posts or just the topics (so 10 replies in posts vs 2 replies as topics sort of deal) though it would make a huge difference on a forum like this in terms of how huge the tab is (can you imagine seeing like 100,000 replies when you havent logged in in a while?).

If there's someone who's MySQL savy reading this I'd love some input :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Oya on October 11, 2010, 10:06:41 AM
you'd have to do it based on replies rather than topics and yes it would slow the forum down since youd be loading the unread page again every page
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on October 12, 2010, 02:33:59 AM
Why couldnt I base it on topics like the unread page does?
Title: Re: "unread" and "replies" tabs for main menu
Post by: impreza on January 03, 2011, 01:05:01 AM
Great stuff, thank you for fashion
Title: Re: "unread" and "replies" tabs for main menu
Post by: elguapo on January 03, 2011, 04:37:25 AM
not compatible with RC4 yet? :(
Title: Re: "unread" and "replies" tabs for main menu
Post by: MCK on February 10, 2011, 10:13:16 AM
I installed it on my test forum which is SMF 2 RC4. Had to switch on RC3 compatibility before installation and also had to ignore two replaces in one file (index) but it seems to work well. I need to go back and put the 2 replaces I ignored in manually but should be ok.

Would love to see this mod updated for RC4 of course. Its an awesome mod and hopefully it will not disappear. Thanks for making it.
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on February 13, 2011, 06:50:25 PM
Quote from: MCK on February 10, 2011, 10:13:16 AM
I installed it on my test forum which is SMF 2 RC4. Had to switch on RC3 compatibility before installation and also had to ignore two replaces in one file (index) but it seems to work well. I need to go back and put the 2 replaces I ignored in manually but should be ok.

Would love to see this mod updated for RC4 of course. Its an awesome mod and hopefully it will not disappear. Thanks for making it.

I totally agree. I just installed a new RC5 not thinking about compatiblity. In RC4, where is the RC3 compatibility option? I'd like to see if I can do the same thing, because this is one of my favorite mods. I honestly wish they'd do away with the default ones because they don't function the same. But that's just my preference.

If RC3 compatibility is not available in RC5, is there another way I can make this mod work in my RC5? If not, is there an easy way to roll back to RC3 or 4 without reinstalling?
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on February 13, 2011, 06:52:27 PM
Also Jade, how are developers funded for these projects? Do you create these mods on your personal time? I would assume donations are welcome? I'd love to see this mod continue its life span
Title: Re: "unread" and "replies" tabs for main menu
Post by: MCK on February 13, 2011, 11:39:13 PM
Quote from: lowburb on February 13, 2011, 06:50:25 PM
Quote from: MCK on February 10, 2011, 10:13:16 AM
I installed it on my test forum which is SMF 2 RC4. Had to switch on RC3 compatibility before installation and also had to ignore two replaces in one file (index) but it seems to work well. I need to go back and put the 2 replaces I ignored in manually but should be ok.

Would love to see this mod updated for RC4 of course. Its an awesome mod and hopefully it will not disappear. Thanks for making it.

I totally agree. I just installed a new RC5 not thinking about compatiblity. In RC4, where is the RC3 compatibility option? I'd like to see if I can do the same thing, because this is one of my favorite mods. I honestly wish they'd do away with the default ones because they don't function the same. But that's just my preference.

If RC3 compatibility is not available in RC5, is there another way I can make this mod work in my RC5? If not, is there an easy way to roll back to RC3 or 4 without reinstalling?

Look at Admin / Packages ... Right had lower corner you will see a link called Advanced. In RC4 and before there is a text field in there where we type in the version we want. In RC5 I heard they changed it to a drop-down but I'm not sure if its in the exact same place. Good luck.

On a related note though, more than likely not all updates / replaces will work depending on how many mods you've got installed in there. Make sure to apply anything missing manually and if you don't have experience doing that perhaps its best to wait for the update from the mod developer.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 14, 2011, 03:48:29 AM
Quote from: lowburb on February 13, 2011, 06:52:27 PM
Also Jade, how are developers funded for these projects? Do you create these mods on your personal time? I would assume donations are welcome? I'd love to see this mod continue its life span

We're not funded at all unless we ask. If you want to paypal me then my email alundra at jades-world.com will work :D.

And since everyone's asking, I will update tonight or tomorrow, depending on when my headache goes away. I just had my first day at college!! :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Arantor on February 14, 2011, 08:18:26 AM
QuoteIn RC5 I heard they changed it to a drop-down but I'm not sure if its in the exact same place. Good luck.

No, it's still a textbox - the 1.1.x version is a dropdown, but is supplied as a mod.
Title: Re: "unread" and "replies" tabs for main menu
Post by: MCK on February 14, 2011, 08:33:18 AM
Thanks for keeping me honest. I must have read this half-witted.
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on February 14, 2011, 05:16:07 PM
Quote from: Jade Elizabeth on September 03, 2010, 05:47:16 AM
Did you upload the wrong version to uninstall?

3.0.1 on RC5 in RC3 mode
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 14, 2011, 06:56:33 PM
Quote from: lowburb on February 14, 2011, 05:16:07 PM
Quote from: Jade Elizabeth on September 03, 2010, 05:47:16 AM
Did you upload the wrong version to uninstall?

3.0.1 on RC5 in RC3 mode

I'm not sure what happened but if you send me your index template I can fix it :). Just paste it into a code box on here :D.

I'll update this hopefully tonight, I totally passed out last night lol.
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on February 15, 2011, 09:11:48 AM
So I reinstalled it. The only reason I attempted to remove it was because it didn't removed the text versions. This mod IS supposed to removed the text version, right?

I'd prefer to leave it installed, but would also like to get rid of the text in the header. What file is that located in?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 15, 2011, 06:34:47 PM
The header text is in the index.template.php file of your theme.


It should remove the text in the 3.0 versions.

Again sorry I'm late, school is taking more out of me than expected :(.
Title: Re: "unread" and "replies" tabs for main menu
Post by: lowburb on February 15, 2011, 08:10:04 PM
Jade. No need to apologize. I am not going to be pushy for free things. My patience is raised when things are free.

However, see attachment. Again, RC5 in RC3 mode. I also have another board running RC3 with the same results. You can see in the screen shot the text is there, the buttons are there, and I have 3.0.1 installed, and obviously you can see the curve theme.


**Edit - I mis-spoke. I am running in RC5 mode. Hmm. However, I still have an RC3 board running on another site. So that still stands. There was an error when I installed it on RC5. I installed it anyways. When I uninstall, the buttons go away but it doubles the text
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 21, 2011, 03:53:14 AM
Try uploading the one that only does the buttons, and uninstalling that?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on February 21, 2011, 04:48:25 AM
I've updated, but I'm not going to update for Core anymore.

It's simple enough to change the text, and there wasnt any real discrepancy with Curve so I'm unsure what the issue was.
Title: Re: "unread" and "replies" tabs for main menu
Post by: diegog on March 11, 2011, 02:45:40 AM
Hi!; i'm using SMF 2 RC 5 and i can't install this mod.

When i try to install it the mod show:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fd6RlS.png&hash=6480c0922447b3ae7b190d666c71853d8eb71b5f)

The theme is Reference (http://custom.simplemachines.org/themes/index.php?lemma=1311) and i try to install unread and replies tabs v2.0.2.zip or unread_and_replies_tabs_v3.0.2 CURVE.zip and none doesn't work.

have any idea where i'm failing ?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Sting on March 11, 2011, 11:20:58 AM
Nice idea. I personally won't be using the mod at this time, but I can see the usefulness of this for some sites. Good job.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 14, 2011, 04:39:13 AM
Quote from: Sting on March 11, 2011, 11:20:58 AM
Nice idea. I personally won't be using the mod at this time, but I can see the usefulness of this for some sites. Good job.

Thank you :D
When I do themes I remove the unread and replies links so I definitely needed it!

Quote from: diegog on March 11, 2011, 02:45:40 AM
Hi!; i'm using SMF 2 RC 5 and i can't install this mod.

When i try to install it the mod show:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fd6RlS.png&hash=6480c0922447b3ae7b190d666c71853d8eb71b5f)

The theme is Reference (http://custom.simplemachines.org/themes/index.php?lemma=1311) and i try to install unread and replies tabs v2.0.2.zip or unread_and_replies_tabs_v3.0.2 CURVE.zip and none doesn't work.

have any idea where i'm failing ?


It's not the themes fault. Can you attach the file it errors on? It's /sources/subs.php I need :). I'll fix it up for you/see what the issue is :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: diegog on March 14, 2011, 01:28:24 PM
this one ?  :P

Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 15, 2011, 08:15:53 AM
It didnt work because you edited the menu via subs.php instead of the theme...which you could have done via the theme. I've edited the code, just add your own unread.png and replies.png images to the folder and it will work out :).

If you parse the mod on the mods page it will tell you what text strings to add, then the mod is installed for you :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: diegog on March 15, 2011, 10:20:21 AM
thks Jade! now it works =D

greetings from Uruguay :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on March 16, 2011, 10:47:25 AM
You're welcome :D

And greetings from Aus!! :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: fasterthanyours on June 12, 2011, 07:28:45 PM
Jade,

Are you going to have the SMF 2.0 Gold Version soon?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on July 02, 2011, 02:19:33 AM
I will, but I don't think much has changed - at least not from the tab side :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: fasterthanyours on July 02, 2011, 11:43:41 AM
Great.  I upgraded, then to realize that your mod was not upgraded yet :(
Title: Re: "unread" and "replies" tabs for main menu
Post by: Robert. on July 02, 2011, 11:46:29 AM
You should be able to use it without any problems :) Just emulate your package manager to 2.0 RC5 ;)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on July 03, 2011, 04:21:46 AM
Thanks Dr. Deejay :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Robert. on July 03, 2011, 04:43:13 AM
No problem :P
Title: Re: "unread" and "replies" tabs for main menu
Post by: kingkingston on August 23, 2011, 02:45:23 AM
Quote from: Jade Elizabeth on March 16, 2011, 10:47:25 AM
You're welcome :D

And greetings from Aus!! :D
Greetings from Aus too :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: kingkingston on August 23, 2011, 03:36:27 AM
So the remove replies link and that doesn't work on themes other than default ?
Title: Re: "unread" and "replies" tabs for main menu
Post by: gjtoth on October 10, 2011, 01:22:32 PM
Will you be updating this for 2.01 anytime in the near future?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Suki on October 10, 2011, 01:24:32 PM
This mod can be installed on a 2.0.1 installation if you Emulate version 2.0 RC5:

In order to use the emulation feature you must go to Admin-Packages.

Below your mod list there is an Advanced link, click on it.

It will display an Advanced Options box with a text field, on the text field you will type the SMF version you want to emulate, after typing the SMF version, click on the button Apply.

Now you can install-uninstall the mod.
Once you have done with it, click on the Advanced link again, below the Emulate Version: description there is a link called


or you can manually edit your files by following the parser:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=1497;attach=170090;smf_version=2.0_RC5
Title: Re: "unread" and "replies" tabs for main menu
Post by: teos55 on December 16, 2011, 04:39:57 PM
SMF 2.0.1  simple box 2.3.4  default theme

Hi,
  Using the mod for a long time. 
User request: Is it possible to exclude some categories from the unread button func ?
All the best

Title: Re: "unread" and "replies" tabs for main menu
Post by: teos55 on December 24, 2011, 01:01:33 PM
 No reply for the above request. There are some other ways of excluding boards directly coding in the source code, but this effects Simple Portal 2.3.4 in the first place. ( like blocks for recents posts etc.)
  So the question is :  Can something be done on the mod side to exclude some boards/posts ?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 12:32:22 AM
I believe it can but I don't know how. Sorry I took like a year to reply. If you figure it out let me know :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 02:26:04 AM
Oh wow Jade, welcome back!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 06:09:05 AM
Ha ha thanks. I found myself on bed rest with a lot of time to catch up on my projects so I thought I would say hi here :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 06:11:29 AM
About the best you could have done (well, ok, except for reading some books, watching Game of Thrones etc etc). Hope your creativity is up to speed, for the sake of us ;)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 06:19:33 AM
Definitely is. Just working on my main website to get the theme done and new features in. I posted a help wanted topic but no one seems interested in doing the coding I need. I will have to outsource away from SMF it seems.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 06:23:17 AM
Aw, that's a shame, hope you do find some help. I can't code myself, so good luck with it... just took a look, some nifty things you've done there!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 08:53:46 AM
Yeah! You seen my site? It's pretty good so far. Here's the new theme:

www.bunnyrabbitsex.com/?theme=7

It's a work in progress. Only done Board Index, Message Index, and Display Template. Been working on the Post Template but it's not done yet :D.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 08:58:49 AM
Wow. You have really given it a very distinct look, it's unrecognizable!  Which portal do you use? Nice scroller, too, and it's lovely how you have make everything fit together. Want an admin position on my forum (http://www.cpcwiki.eu/forum)? :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 09:11:39 AM
No portal, that's the board index lol. What's a scroller? lol
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 09:14:41 AM
Hat's off to you then, lady.

By scroller I mean the News scroll (the one with the little carrots).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 09:20:41 AM
Oh, I call that a ticker ha ha. It's the recent topics by order of post :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 09:27:42 AM
Looks really nice, is it a mod of yours?

(And yes, it's a ticker, but it's a scroller if you've ever played any Atari (http://www.old-computers.com/museum/computer.asp?st=1&c=25) or Amiga (http://www.old-computers.com/museum/computer.asp?c=65) games :D )
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 09:51:05 AM
Ha ha no it's not a mod :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 09:52:09 AM
Then... am I missing something? How....?

(and yes, we're terribly off-topic here)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on May 31, 2012, 09:53:15 AM
I did it myself, same as with the board index stuff. I coded all that from scratch.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Arantor on May 31, 2012, 10:05:23 AM
It does look like it's been cleaned up since the original version of the ticker ;)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on May 31, 2012, 10:12:48 AM
As I said, hat's off to you. You should really make this into a mod!
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on June 01, 2012, 05:13:13 AM
Danke guys :D
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on September 29, 2016, 08:59:49 AM
Seemed to work fine till .11, unfortunately it doesn't with .12 any more...?
Title: Re: "unread" and "replies" tabs for main menu
Post by: Matthew K. on September 29, 2016, 11:26:52 AM
Is your entire menu gone? If so, it probably isn't this mod.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on September 30, 2016, 08:08:22 PM
LOL Matthew nice slide in there.

As far as I know Gryzor... (please let me know if it doesn't work and I will fix it up for you :))
Quote from: Suki on October 10, 2011, 01:24:32 PM
This mod can be installed on a 2.0.1 installation if you Emulate version 2.0 RC5:

In order to use the emulation feature you must go to Admin-Packages.

Below your mod list there is an Advanced link, click on it.

It will display an Advanced Options box with a text field, on the text field you will type the SMF version you want to emulate, after typing the SMF version, click on the button Apply.

Now you can install-uninstall the mod.
Once you have done with it, click on the Advanced link again, below the Emulate Version: description there is a link called


or you can manually edit your files by following the parser:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=1497;attach=170090;smf_version=2.0_RC5
Title: Re: "unread" and "replies" tabs for main menu
Post by: Matthew K. on September 30, 2016, 08:57:57 PM
No, I was being serious. There's an issue in SMF 2.0.12 with serializing the cache, and one of the problems this causes is the menu to disappear. I'd hate for people to think a problem was being caused by your mod, when it's not.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 01, 2016, 02:16:52 AM
Aha, so it might have been a cache issue?

In any case, I decided it was time to refresh-install my forum; after that (or maybe it was because I emptied the cache?) it works flawlessly, so apologies for alarming everyone :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Jade Elizabeth on October 03, 2016, 08:23:23 PM
Quote from: Matthew K. on September 30, 2016, 08:57:57 PM
No, I was being serious. There's an issue in SMF 2.0.12 with serializing the cache, and one of the problems this causes is the menu to disappear. I'd hate for people to think a problem was being caused by your mod, when it's not.

Oh, thank you <3

I haven't seen that error, sounds horrible!

Quote from: Gryzor on October 01, 2016, 02:16:52 AM
Aha, so it might have been a cache issue?

In any case, I decided it was time to refresh-install my forum; after that (or maybe it was because I emptied the cache?) it works flawlessly, so apologies for alarming everyone :)

You can run the delete cache thing in admin too, that might help. I always do so after installing or uninstalling a mod :).
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 04, 2016, 05:48:12 AM
Yup, that's what I did. And probably a good idea to do it after modding...
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 07, 2021, 05:53:24 AM
Raise from the dead...

Anyone got this working with 2.0.18? :)
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 25, 2021, 07:47:44 AM
Nobody? A pity :(
Title: Re: "unread" and "replies" tabs for main menu
Post by: KittyGalore on October 25, 2021, 08:29:11 AM
Quote from: Gryzor on October 07, 2021, 05:53:24 AMRaise from the dead...

Anyone got this working with 2.0.18? :)
Yes it works .
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 26, 2021, 10:22:26 AM
Thanks for confirming! Can you tell me how you did it? I did install it but it produced no result, strangely...

[EDIT] nah nevermind, doing it manually :)

Just one question, before reinstalling my forum I had checkboxes next to the messages in the Unread list so I could mark as read only the part of the list I was looking of (or separate posts). Does anyone know where this functionality comes from? I thought it came with this mode, obviously wrong...
Title: Re: "unread" and "replies" tabs for main menu
Post by: KittyGalore on October 26, 2021, 03:58:32 PM
Quote from: Gryzor on October 26, 2021, 10:22:26 AMThanks for confirming! Can you tell me how you did it? I did install it but it produced no result, strangely...

[EDIT] nah nevermind, doing it manually :)

Just one question, before reinstalling my forum I had checkboxes next to the messages in the Unread list so I could mark as read only the part of the list I was looking of (or separate posts). Does anyone know where this functionality comes from? I thought it came with this mode, obviously wrong...
In your Look and layout in your profile

Show quick moderation as checkboxes.
Title: Re: "unread" and "replies" tabs for main menu
Post by: Gryzor on October 27, 2021, 03:19:37 AM
WHAT?! I'd have never found it there, what's this have to do with moderation? :D  Thanks for pointing out, I had really given up on it!!

Is this visible for normal users too?
Title: Re: "unread" and "replies" tabs for main menu
Post by: KittyGalore on October 27, 2021, 12:48:57 PM
Quote from: Gryzor on October 27, 2021, 03:19:37 AMWHAT?! I'd have never found it there, what's this have to do with moderation? :D  Thanks for pointing out, I had really given up on it!!

Is this visible for normal users too?
I've no idea why it's referred to as moderation and yes all members have this from their profile.