Author Topic: Shop Button Request: Verde (by Crip)  (Read 2648 times)

Offline BlackVenom

Shop Button Request: Verde (by Crip)
« on: March 04, 2008, 05:47:11 am »

Offline Faust

Re: Shop Button Request: Verde (by Crip)
« Reply #1 on: March 06, 2008, 01:57:30 pm »
Find

Code: [Select]
// 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
Code: [Select]

// 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
Code: [Select]
// 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

Code: [Select]
       //Begin SMFShop code
        echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</td>' : '';
        //END SMFShop code

Offline BlackVenom

Re: Shop Button Request: Verde (by Crip)
« Reply #2 on: March 09, 2008, 10:03:51 am »
 Ah...

Parse error: parse error, unexpected T_ECHO in .../Themes/Verde/index.template.php on line 437
Code: [Select]
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
« Last Edit: March 09, 2008, 10:21:36 am by BlackVenom »

Offline Faust

Re: Shop Button Request: Verde (by Crip)
« Reply #3 on: March 09, 2008, 02:16:51 pm »
I am sorry,  I was not thinking properly when I pasted that code, please replace  this  section

Code: [Select]
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


Code: [Select]
//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

Offline BlackVenom

Re: Shop Button Request: Verde (by Crip)
« Reply #4 on: March 10, 2008, 07:06:56 am »
on the first replace code w/ code thing you left a line off:
Code: [Select]
$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!
« Last Edit: March 10, 2008, 07:09:49 am by BlackVenom »