*

Author Topic: There is no Treasury link in my custom theme menu bar.  (Read 5041 times)

Offline Resourcez

  • Administrator
  • Hero Member
  • *
  • Posts: 1425
    • Resourcez
There is no Treasury link in my custom theme menu bar.
« on: February 25, 2008, 02:05:42 PM »
Cause:
Treasury only installs to the default theme, standard procedure for mods.
It is not possible to account for all the different themes out there.

Cure:
Use the Package Parser to view the change that Treasury makes to your Themes/default/index.template.php file.

Then find the menu area of your custom theme, view how it provides links, and add your own link.

Note:
The better themes allow addition of extra menu items through your admin "Themes and Settings" panel.

DilberMC Theme
Find
Code: [Select]
   // the [member] list button
   if ($context['allow_memberlist'])
   echo'
            <td align="center" class="menubg' , $current_action == 'mlist' ? '2' : '' , '">
               <a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
            </td>';
   // the [gallery] button
   echo'
            <td align="center" class="menubg' , $current_action == 'gallery' ? '2' : '' , '">
               <a href="', $scripturl, '?action=gallery">Gallery</a>
            </td>';
Insert after this
Code: [Select]
   // The [treasury] button!
   if ($context['allow_view_treasury'])
   echo'
            <td align="center" class="menubg' , $current_action == 'treasury' ? '2' : '' , '">
               <a href="', $scripturl, '?action=treasury">' , $txt['treasury_menu'] , '</a>
            </td>';

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

Helios Multi TP (similar for the normal SMF version)
  • index.php?action=theme;sa=admin - click on the tab "Themes and Settings"
  • Click on the Helios theme
  • Check the "Use button 1" box
  • enter path "treasury.gif"
  • enter link "?action=treasury"
  • right click the Treasury button in the attachment below and save it
  • upload to "Themes/helios_multi11final_tp/images/treasury.gif"

Ancient and Rusted
This is the code to be added in that theme's index.template.php file, editable from the theme's admin panel, just after the code for the member list
Code: [Select]
   // the [treasury] button
   if ($context['allow_view_treasury'])
      echo ($current_action == 'treasury' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'treasury' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=treasury">' , $txt['treasury_menu'] , '</a>
            </td>' , $current_action == 'treasury' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


There may also be a need to change the tborder class which exists simply to place a border around the normal background.  This is the class in the theme stylesheet that you need to alter that background to something of your choosing - #FFFFFF will do to get you started.  You can edit that through your SMF admin panel for that theme.
Code: [Select]
/* This is used on tables that should just have a border around them. */

.tborder
{

border: 1px solid #000000;

background-color: #000000;

padding: 0px;

}

« Last Edit: April 03, 2008, 10:46:46 AM by Resourcez »
If you have everything under control, you're not moving fast enough.
• Apache 2.2.24 • PHP 5.3.24 • MySQL 5.1.68 •

 

Please Support Us!

Something for Here
Donate with PayPal!
October Goal: $30.00
Due Date: Oct 31
Total Receipts: $0.00
Below Goal: $30.00
Site Currency: USD
 0%

Content