TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 117
  • Total: 117

Creating Buttons with TP 1.0 5-1 & SMF 2.0RC3

Started by cralor, April 25, 2010, 07:55:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cralor

Hi.

I know the old index.template.php editing process, but with the new updates, I no longer understand how to add a custom button to the navigation menu/strip.

Could anyone assist?

Thanks!!

bloc

The buttons in SMF2.0 are now inside an array, which you will find in Sources/Subs.php. Search for "menu_buttons".

cralor

Sweet. Thanks.

Now, where can I define "actions"? When I visit the "Chat" page, it believes the current action is Home. This is because I am linking to a ?page file instead of an ?action file. How can I go about fixing this?

I can either:
1) Define the "action" for Home. And make "Chat" the default.
2) Define the "action for "Chat".

Thanks.


cralor

Quote from: robbie93 on April 25, 2010, 08:38:00 PM
What about this?

http://www.simplemachines.org/community/index.php?topic=261880.0

Thanks :) I should've searched there the first time around, but Bloc already answered that for me :P

I just need to figure out how to make my new button an "action".

Crip

easy way , copy + paste [Home] tab and then add your [name] + URL
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



cralor

Quote from: Crip on April 25, 2010, 09:05:21 PM
easy way , copy + paste [Home] tab and then add your [name] + URL

Problem: my URL is a 'page' not an 'action'. So TinyPortal does not register it as the 'current_action', so when I access my new "Chat" page, it highlights the "Home" button as the 'current_action'.

To fix this, I must make '?action=chat' defined. How can I do this?

Thanks!

Crip

direct URL==> echo '<a href="http://www.yoursite.com" title="" '?action=chat">Chat</a>';
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



cralor

Quote from: Crip on April 25, 2010, 09:44:07 PM
direct URL==> echo '<a href="http://www.yoursite.com" title="" '?action=chat">Chat</a>';

My problem is that the "action" 'chat' is not defined. Putting that in my URL just brings me to the forums.

How do I make '?action=chat' go to the "chat page".

Thanks! :)

Crip

#9
can U show a link to theme + [chat] ?

...you can PM link if you wanna.
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



This website is proudly hosted on Crocweb Cloud Website Hosting.