Author Topic: button request for hayat v2  (Read 2429 times)

Offline haha_no

button request for hayat v2
« on: November 06, 2007, 11:03:12 am »
Hayat v2: <hayat v2>
http://custom.simplemachines.org/themes/index.php?lemma=384: <http://custom.simplemachines.org/themes/index.php?lemma=384>


Thanks!

www.waterpoloforums.com

you guys are the greatest!

Offline benji

Re: button request for hayat v2
« Reply #1 on: November 27, 2007, 05:01:54 am »
I also need this same button and instructions for adding this button to the navigation bar of the hayat v2 theme!

Thanks!

Offline benji

Re: button request for hayat v2
« Reply #2 on: November 27, 2007, 06:36:58 am »
Looks like I've got it figured out myself!

2 MODIFICATIONS ARE NEEDED
Both modifications are done to index.template.php in the Themes/hayatv2/ folder


STEP 1

FIND THE FOLLOWING;
Code: [Select]
$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';

ADD AFTER;
Code: [Select]
// SMFShop
if ($context['current_action'] == 'shop')
$current_action = 'shop';

STEP 2

FIND THE FOLLOWING
Code: [Select]
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td align="center" 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>' : '';

ADD AFTER;
Code: [Select]
// SMFShop
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td align="center" valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop"> Shop </a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';