Author Topic: Shop Button for Modified Babylon Theme Required  (Read 4733 times)

Offline Hyperguy

Shop Button for Modified Babylon Theme Required
« 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.

Offline Daniel15

Re: Shop Button for Modified Babylon Theme Required
« Reply #1 on: February 25, 2006, 07:18:15 am »
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' topic.

--daniel15

Offline Hyperguy

Re: Shop Button for Modified Babylon Theme Required
« Reply #2 on: March 02, 2006, 03:11:05 am »
Alrighty.  Here's my shop button:


Code: [Select]
http://hyperguy.net/forum/Themes/hg_alpha/images/english/shop.gif
Is this the code for the calendar section that you need?
Code: [Select]
// 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.

Offline Daniel15

Re: Shop Button for Modified Babylon Theme Required
« Reply #3 on: March 02, 2006, 06:12:53 pm »
Thank you for posting that code. Here's the code for the shop button:
Code: [Select]
// 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.

Quote
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.

Offline Hyperguy

Re: Shop Button for Modified Babylon Theme Required
« Reply #4 on: March 14, 2006, 02:07:36 am »
I added the code and it appears to be working correctly.  Thanks!