Author Topic: Help me please (ASAP) Thankyou!  (Read 2133 times)

Offline leofe

Help me please (ASAP) Thankyou!
« on: May 13, 2008, 02:40:46 am »
Hello im trying to add the shopmod to my forum... I have installed it all and just need the button to be added...
Im using the Ferry Tema custom Template

Code: [Select]
// 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', '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'] == 'shop')
$current_action = 'shop';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';


   // Show the start of the tab section.
   echo '
         <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>';

   // Show the [home] button.
   echo '
         <td  align="center"><a href="', $scripturl, '">' , $txt[103] , '</a></td>';

   // Show the [help] button.
   echo '
         <td  align="center"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></td>';



   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></td>';
           
   // How about the [search] button?
   if ($context['allow_search'])
      echo '
            <td  align="center">
               <a href="', $scripturl, '?action=search">' , $txt[182] , '</a></td>';
            // The [shop]!
   if ($context['allow_shop'])
      echo '
         <a href="', $scripturl, '?action=shop">' , Shop , '</a></td>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></td>';
           

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
         echo '
            <td  align="center"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></td>';
           

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '
            <td  align="center" ><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></td>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></td>';


   // If the user is a guest, show [login] button.
   if ($context['user']['is_guest'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></td>';


   // If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></td>';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo '
            <td  align="center"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></td>';

   // The end of tab section.
   echo '
         </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>';
}

?>


i just need a button/Text linking to index.php?action=shop

Thanks for your help!
Heres a link to the forum www.custombats.co.uk/cbforum