News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Girly Man

Started by Gobo, February 22, 2007, 08:14:31 AM

Previous topic - Next topic

avidum

Quote from: Gobo on May 01, 2007, 08:39:11 PM
just search for in index.template.php

   // Show the [home] button.

all the buttons are defined from there onwards...

To add a new one simply copy a chunk of code and add it underneath the existing button


// Show the [home] button.
echo' <td valign="top" class="mentab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>';


After u copy the code for the button, in the new button code Replace:

  <a href="', $scripturl, '">

with

<a href="http://yourlink.com">



$current_action == 'home'

  with

$current_action == 'name of your action'



' , $txt[103] , '

with the text of your link....(make sure u replace the whole text including the ' single quotes

Finally you may want to set it so that when the person is in that section that relevant tab is highlighted...

for that simply add the action you defined as name of your action above to this array


if (in_array($context['current_action'], array('search', 'admin', 'calendar',


So for example u are adding gallery so it would become

if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'gallery',


hope that helps

Thank you! I will try this out. Keep your fingers crossed, lol.

avidum

I'm not sure what this is:

Code:
' , $txt[103] , '
with the text of your link....(make sure u replace the whole text including the ' single quotes


avidum

Can someone explain what this means?
QuoteCode:
' , $txt[103] , '
with the text of your link....(make sure u replace the whole text including the ' single quotes


luvme99

Yeah girl themes would be great right now! Everything is so dark or so bright! I just want a nice simple pink theme. Something like salava, can't use that one because its for smf 1.0.6!!

weblady

Well... I did adjust the colors some on the girlyman theme that I'm running... it was getting a little "too pink" even for my all lady group!

Now it looks like orange and raspberry sherbet!  LOL!
http://www.ladiesplace.net/community [nofollow]
---the Ladies Place on the Net --- Stop by, the coffee's always on!

memyselfandI

Any chance you will be making this compatible with 1.1.2 ? Thanks! I really love the colors!

Gobo

Quote from: avidum on May 04, 2007, 10:13:04 PM
Can someone explain what this means?
QuoteCode:
' , $txt[103] , '
with the text of your link....(make sure u replace the whole text including the ' single quotes
oh that means that lets say you wanted to make a link for Videos so you would put...

<a href="http://whatever.com/gallery/html">Gallery</a>


so basically instead of ' , $txt[103] , ' you put Gallery

------------------------

As for updates, yes I will try and update it sometime soon.
Just my dads been in the hospital, so I dont have time much for stuff right now.
But hopefully in a week or so it will be oki doki

DreamDoll

Can you please teach me how to apply this theme?  :-\

5cakids

Can I snag the icons? Anywhere were I can get them? Not even sure how to add them but they are great!

ishy

The pink fans on my all female site love it, but since I hate pink it's relegated to only one forum.  Very nice job, though. :D

amber333

Anyone try this theme out on 1.1.3? I really like it but am having a hard time applying themes for the current version.

Leigh Anne

I was able to successfully add a shop button to this theme, but I can't for the life of me add the arcade button, . . .

this is the code as I have it. ANy help is appreciated! Thanks!

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


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

   // Show the [home] button.
   echo'         <td valign="top" class="mentab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '">' , $txt[103] , '</a>
            </td>';

   // Show the [help] button.
   echo'         <td valign="top" class="mentab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
            </td>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
            </td>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
            </td>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
            </td>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
               <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 valign="top" class="mentab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
            </td>';
// SMFShop   
echo'      <td valign="top" class="mentab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">               <a href="', $scripturl, '?action=shop">Shop</a>            </td>';



   // the [member] list button
   if ($context['allow_memberlist'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
               <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 valign="top" class="mentab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
               <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 valign="top" class="mentab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
            </td>';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo'      <td valign="top" class="mentab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
            </td>';

   // The end of tab section.
   echo '</tr>
      </table>';

}

Advertisement: