SMF Shop

SMFShop => Shop Button Requests => Completed Shop Buttons => Topic started by: Daniel15 on March 17, 2006, 04:40:08 pm

Title: Button for Blue Sapphire theme
Post by: Daniel15 on March 17, 2006, 04:40:08 pm
This is a shop button for the 'Blue Sapphire' theme. The button is courtesy of Revolink24 (http://www.daniel15.com/forum/index.php?action=profile;u=67)  :)

The file for the button is attached to this post. Please save this to Themes/[themename]/images/english/shop.gif

Code modifications:
Open Themes/[themename]/Index.template.php
Find:

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];


Add after:

echo '
<a href="', $scripturl, '?action=shop">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/shop.gif" alt="Shop" style="margin: 2px 0;" border="0" />' : 'Shop'), '</a>', $context['menu_separator'];


Then, your shop button should be working :D

EDIT: Fixed code
Title: Re: Button for Blue Sapphire theme
Post by: Revolink24 on March 17, 2006, 09:36:29 pm
sorry, but here's what I see now:


Template Parse Error!
There was a problem loading the /Themes/noflsh/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: parse error, unexpected ',' in .../Themes/noflsh/index.template.php on line 962

953:       echo '
954:             <a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];
955:
956:    // The [calendar]!
957:    if ($context['allow_calendar'])
958:       echo '
959:             <a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];
960:
961: echo '

962: <a href="', $scripturl, '?action=shop">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/shop.gif" alt="Shop" style="margin: 2px 0;" border="0" />' : 'Shop', '</a>', $context['menu_separator'];

963:
964:
965:    // If the user is a guest, show [login] and [register] buttons.
966:    if ($context['user']['is_guest'])
Title: Re: Button for Blue Sapphire theme
Post by: Daniel15 on March 18, 2006, 12:10:20 pm
Sorry, I left out a bracket.

Try the new code posted above.
Title: Re: Button for Blue Sapphire theme
Post by: Revolink24 on March 19, 2006, 07:52:34 am
Thank you, it works now.