SMF Shop
SMFShop => Shop Button Requests => Completed Requests => Topic started by: Hyperguy on February 23, 2006, 05:28:29 am
-
Board Address: http://www.hyperguy.net/forum/index.php
Theme Name: HG Alpha
Address of Search button:
http://hyperguy.net/forum/Themes/hg_alpha/images/english/search.gif
Address of Home button:
http://hyperguy.net/forum/Themes/hg_alpha/images/english/home.gif
Address of Help button:
http://hyperguy.net/forum/Themes/hg_alpha/images/english/help.gif
Hi! I can make a shop button myself, but need help because I don't know what code to replace with what. Please tell me what files I need to edit and what code I need to change.
-
Hi,
Glad to hear that you can make the button yourself. Please post it here when you are done ;)
You'll need to edit your Index.template.php file to include the button. Search the file for a 'calendar' section, and post it here. I'll give you the code needed for the shop button. Also, to show the amount of points that users have next to their posts, please use the code in the 'How to get shop working in other themes (http://www.daniel15.com/forum/index.php?topic=39.0)' topic.
--daniel15
-
Alrighty. Here's my shop button:
(http://hyperguy.net/forum/Themes/hg_alpha/images/english/shop.gif)
http://hyperguy.net/forum/Themes/hg_alpha/images/english/shop.gif
Is this the code for the calendar section that you need?
// 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'];
This is kind of unrelated, but is it possible to not use a decimal point for money amount? I could probably figure it out on my own if knew which files to edit.
-
Thank you for posting that code. Here's the code for the shop button:
// The shop
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'];
That should work. Please tell me if it doesn't.
This is kind of unrelated, but is it possible to not use a decimal point for money amount? I could probably figure it out on my own if knew which files to edit
SMFShop doesn't show the decimal places, although it does store all the money amounts as decimal. Only certain sections show the money amount as decimal.
-
I added the code and it appears to be working correctly. Thanks!