Author Topic: Button for Blue Sapphire theme  (Read 5853 times)

Offline Daniel15

Button for Blue Sapphire theme
« on: March 17, 2006, 06:40:08 pm »
This is a shop button for the 'Blue Sapphire' theme. The button is courtesy of Revolink24  :)

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
« Last Edit: March 18, 2006, 02:10:02 pm by daniel15 »

Offline Revolink24

Re: Button for Blue Sapphire theme
« Reply #1 on: March 17, 2006, 11: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'])

Offline Daniel15

Re: Button for Blue Sapphire theme
« Reply #2 on: March 18, 2006, 02:10:20 pm »
Sorry, I left out a bracket.

Try the new code posted above.

Offline Revolink24

Re: Button for Blue Sapphire theme
« Reply #3 on: March 19, 2006, 09:52:34 am »
Thank you, it works now.