Author Topic: question  (Read 5592 times)

Offline Sableye

question
« on: August 08, 2006, 05:50:49 am »
What does applaud and smite mean and what does it do?  Also, I have made a Shop button for my theme.  How do I display it on the page?
« Last Edit: August 08, 2006, 01:36:05 pm by Sableye »

Offline Veej

Re: question
« Reply #1 on: August 08, 2006, 07:05:04 pm »
Applaud and Smite are for the Karma system built into SMF, nothing directly related to SMF Shop.
It's sort of like a reputation system. If someone does something good, you can applaud (+ rep) them, and if they do somthing bad you can smite (-rep) them.

You can also change the 'applaud' and 'smite' labels from your admin panel. So they will say, for example, '+ rep' or '- rep'.

About the shop buttons, you will need to edit the template file of you theme, Daniel will be able to help you better with that than me.

Offline Sableye

Re: question
« Reply #2 on: August 08, 2006, 11:40:52 pm »
I followed the instructions at http://www.daniel15.com/forum/index.php?topic=39.0
Display.template has been modified with those extra lines and it has been uploaded.  Now I want to know where to upload my new Shop button and install it into the theme.

Offline JRSofty

Re: question
« Reply #3 on: August 10, 2006, 05:33:16 pm »
Normally you will install the image in the following directory

Themes/{Theme Name}/images/{language}

Replace {Theme Name} with the name of your theme. For example classic, or default (or the name of your custom theme).

Replace {language} with the language that your button is. For example english


Offline Daniel15

Re: question
« Reply #4 on: August 12, 2006, 02:41:42 pm »
Like JRSofty said, you need to upload the shop image to the images folder of your theme.
After you've done that, you need to edit the actual theme. Open the index.template.php file, and look for the buttons section (I usually search for 'calendar').

If you give me the name of your theme, and a copy of the button, I'll create the code for you, and add your theme to the list of themes with SMFShop buttons :)

Offline Sableye

Re: question
« Reply #5 on: August 16, 2006, 06:24:28 am »
Please, could you create the code for me?

Theme name: Darkness
Button: http://pokenightmare.com/forums/Themes/darkness/images/english/shop.gif

Thank you

Offline Daniel15

Re: question
« Reply #6 on: August 19, 2006, 12:34:18 pm »
Sableye, I've done the code for you. Please see http://www.daniel15.com/forum/index.php?topic=265.0 (I borrowed your button image :))

Offline Sableye

Re: question
« Reply #7 on: August 20, 2006, 12:40:41 am »
I added the code in after the calendar part of index.template.php

When I upload it, I get an error message:

Template Parse Error!
There was a problem loading the /Themes/darkness/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.

I have no idea what that means.

Offline Daniel15

Re: question
« Reply #8 on: August 24, 2006, 07:48:10 pm »
Sableye, make sure you've copied the code exactly as I posted it (punctuation is very important!).

Offline Sableye

Re: question
« Reply #9 on: August 27, 2006, 03:31:37 am »
I'm sure it's correct.  Here's the code that I have in:

// 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'];

Offline Daniel15

Re: question
« Reply #10 on: August 27, 2006, 11:52:20 am »
Sableye, I'm very sorry about this. There was a mistake in the code.
The correct code reads:


// 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'];


Offline Sableye

Re: question
« Reply #11 on: August 28, 2006, 06:08:48 am »
Thanks.  Works perfectly :)