The RPG Maker Resource Kit

RMRK General => General Chat => Topic started by: Miss Nile on October 02, 2009, 11:15:54 PM

Title: [Solved] Shop Button in SMF
Post by: Miss Nile on October 02, 2009, 11:15:54 PM
Hi all,

Yea, I have another little question. ^^; So I made some forums using SMF, installed the shop mod and all went well. The shop works very fine and points work as well. However, there is no shop button in the menubar above. So I checked the SMF site, and I saw a piece of code that adds the shop like this,

[Forums under development, obviously.]

Spoiler for:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fbb.xieke.com%2Ffiles%2Funtitled26.PNG&hash=0690e38a3043490b089f0eebf2914c2144e1fda0)

However, I want it to be something like this,

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fbb.xieke.com%2Ffiles%2Funtitled27.PNG&hash=b24580daeaf034f21c1b71ff7a8da46dd2c9ace7)

What should I do? Everything is written in PHP and I have no idea about this. I have basic knowledge about HTML but not PHP. T-T

Help, please? I'll really appreciate it. ^^
Title: Re: Shop Button in SMF
Post by: Lazer Ki on October 02, 2009, 11:35:09 PM
I think then you should look for another one. There are plenty out there, but I'm a bit lazy to find you one. Might edit this post later.

And why are you using byethost that is the crappiest host in the world

EDIT: Tell me the mod you are using. I see twenty other mods and I don't know which mod you are using.
Title: Re: Shop Button in SMF
Post by: Miss Nile on October 03, 2009, 08:42:49 AM
Ahh the mod is SMFshop mod. lol The button should be the default since that's the theme that comes with it.
Title: Re: Shop Button in SMF
Post by: Roph on October 03, 2009, 09:31:10 AM
What version of SMF?

And what URL should the shop button link to? ex: "site.com/index.php?action=smfshop" or something.
Title: Re: Shop Button in SMF
Post by: Miss Nile on October 03, 2009, 10:11:41 AM
Version SMF 1.1.10

And ahh yes, I know that but it only goes for HTML and the language used here is PHP- which I have no idea about. :(
Title: Re: Shop Button in SMF
Post by: Roph on October 03, 2009, 10:30:08 AM
In themes\default\index.template.php, search for:

// If the user is a guest, also show [register] button.

BEFORE it, put this:


if ($context['user']['is_logged'])
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop;sesc=', $context['session_id'], '">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



That's assuming that the action is "shop", which you didn't tell me =_=
Title: Re: Shop Button in SMF
Post by: Miss Nile on October 03, 2009, 10:49:06 AM
Ahh thank you very much, Roph! It worked like a charm! ^^