Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Solved] Shop Button in SMF

Started by Miss Nile, October 02, 2009, 11:15:54 PM

0 Members and 1 Guest are viewing this topic.

Miss Nile

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][/spoiler]

However, I want it to be something like this,



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

Lazer Ki

#1
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.
Hi

Miss Nile

Ahh the mod is SMFshop mod. lol The button should be the default since that's the theme that comes with it.

Roph

What version of SMF?

And what URL should the shop button link to? ex: "site.com/index.php?action=smfshop" or something.
[fright]bringing sexy back[/fright]

Miss Nile

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. :(

Roph

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 =_=
[fright]bringing sexy back[/fright]

Miss Nile

Ahh thank you very much, Roph! It worked like a charm! ^^