SMF Shop

SMFShop => Shop Button Requests => Completed Shop Buttons => Topic started by: Daniel15 on August 19, 2006, 03:43:55 pm

Title: Button for 'WoW-DK' theme
Post by: Daniel15 on August 19, 2006, 03:43:55 pm
This is a shop button for the 'WoW-DK' theme.  Note that like a lot of the 'modern'-style themes, this theme does not use images for each button in the menu. This makes it easier to code a button for it, as I don't need to put together an image :)

Anyways, here's the code for it:

Code modifications:
Open Themes/wowdk11rc2e/Index.template.php
Find:

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
Add after:

// Shop
if ($context['current_action'] == 'shop')
$current_action = 'shop'

Also, find:

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '<td class="maintab_off_' . $first . '">&nbsp;</td>' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

Add after:

// The Shop
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '<td class="maintab_off_' . $first . '">&nbsp;</td>' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=shop">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

Then, your shop button should be working :D