"unread" and "replies" tabs for main menu

Started by Jade Elizabeth, November 06, 2008, 12:34:59 PM

Previous topic - Next topic

Jade Elizabeth

Oh. I don't think I can help with that one lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kreator

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 !

Jade Elizabeth

How to remove the text? Attach your index.template.php :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kreator

QuoteHow to remove the text? Attach your index.template.php

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kreator

Unfortunately I get a parsing error with your mod !! what have you changed?

RAV TUX

#26
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



Jade Elizabeth

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)?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Sakae

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.
http://www.tigrelog.com.br
l: simple p: machines

Jade Elizabeth

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.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kreator

[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

Jade Elizabeth

Okay. I havent changed anything, so I will take a look asap :). Where/what is the error?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

RAV TUX

#32
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

Jade Elizabeth

Okay so where exactly in the menu do you want my mod buttons? I'm confused now.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

RAV TUX

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.




Jade Elizabeth

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>';

}
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

RAV TUX

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

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

RAV TUX

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>';

}

Jade Elizabeth

I wanted the whole file so I could see the code properly..

I need the unedited, working version :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: