SMF Shop
SMFShop => Shop Button Requests => Topic started by: BlackVenom on March 04, 2008, 05:47:11 am
-
Verde
http://custom.simplemachines.org/themes/index.php?lemma=532
I tried making one... lol.
-
Find
// 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')
Replace with
// 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', 'shop', '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';
// Begin SMFShop code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory'
, 'shop_restock', 'shop_usergroup')))
$current_action = 'admin';
// End SMFShop code
Find
// The [calendar]!
if ($context['allow_calendar'])
echo '<li', $current_action == 'calendar' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';
Add below it
//Begin SMFShop code
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td 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 . '"> </td>' : '';
//END SMFShop code
-
Ah...
Parse error: parse error, unexpected T_ECHO in .../Themes/Verde/index.template.php on line 437
428: if ($context['user']['is_logged'] && $context['allow_pm'])
429: echo '
430: <li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';
431:
432: // The [calendar]!
433: if ($context['allow_calendar'])
434: echo '
435: <li', $current_action == 'calendar' ? ' id="active"' : '', '><a href="',
436: //Begin SMFShop code
437: echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
438: <td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
439: <a href="', $scripturl, '?action=shop">Shop</a>
440: </td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
441: //END SMFShop code
-
I am sorry, I was not thinking properly when I pasted that code, please replace this section
436: //Begin SMFShop code
437: echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
438: <td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
439: <a href="', $scripturl, '?action=shop">Shop</a>
440: </td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
441: //END SMFShop code
with this
//Begin SMFShop code
echo '<li', $current_action == 'shop' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=shop"><span>' , Shop , '</span></a></li>';
//END SMFShop code
I believe that should clear it up
-
on the first replace code w/ code thing you left a line off:
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
add that to the end of the original to be replaced script. And thanks for the help!