Add buttons to toolbar

Started by metRo_, July 23, 2010, 06:07:34 PM

Previous topic - Next topic

metRo_

What are the easy way to add buttons to toolbar?, like: Home, Forum, Blog,...
Thanks

xenovanis

For adding buttons you'll need to edit the file /Sources/Subs.php

Make a backup of the file first!

Open the file with a code-editor and search for

$buttons = array(


After that the buttons are coded. You'll need to decide where to add your button. For example, if you want it after the [Home] button, search for this


'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),


and add this after:

// [Blog] button
'blog' => array(
'title' => 'Blog',
'href' => 'http://www.url.com',
'show' => true,
'icon' => '',
),


How do I modify files?
"Insanity: doing the same thing over and over again and expecting different results."


ɔɔɔɔɔɔuɥoɾ

This must be the 10th time I have heard this request this week, lol

Someone also made a tutorial too..


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Matthew K.

I am going to start development on a menu editing mod very shortly that will allow Forum Admins to completely edit/remove/add things to the current navigation system.
Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 07:01:36 PM
This must be the 10th time I have heard this request this week, lol

Someone also made a tutorial too..

ɔɔɔɔɔɔuɥoɾ

I was just thinking the same thing lol

Maybe a mod which allows you to add upto 5 buttons, you can label them, set the links and enable and disable them, that should be pretty easy to code up


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

ɔɔɔɔɔɔuɥoɾ

Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 07:27:35 PM
I was just thinking the same thing lol

Maybe a mod which allows you to add upto 5 buttons, you can label them, set the links and enable and disable them, that should be pretty easy to code up

Its in the making now, I have almost completed making this mod, it will be on the mod site tonight :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Matthew K.

I believe there is already such a mod.

The mod I am working on developing is Database Driven so that as many buttons can be added as you want, or removed easily. They will also be fully editable with not only a href/title, but target and possibly some other aspects. Sub-menu's will be supported.

There will also be an Ajax "UI" to drag around the tabs placement which will then go live after saving.
Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 08:40:03 PM
Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 07:27:35 PM
I was just thinking the same thing lol

Maybe a mod which allows you to add upto 5 buttons, you can label them, set the links and enable and disable them, that should be pretty easy to code up

Its in the making now, I have almost completed making this mod, it will be on the mod site tonight :)

ɔɔɔɔɔɔuɥoɾ

I'm actually already done with it, just got to package it up and test it on clean forum then upload.

I'm wondering why the href HAS to have http:// with the address, or else the link will include the forum url too, weird...


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Matthew K.

Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 09:47:45 PM
I'm actually already done with it, just got to package it up and test it on clean forum then upload.

I'm wondering why the href HAS to have http:// with the address, or else the link will include the forum url too, weird...
I'd be very interested in seeing your code, if you wouldn't mind shooting me a PM?

ɔɔɔɔɔɔuɥoɾ

Well, its quiet a bit, I managed to make the entire thing in a matter of 3 files only

Completely customizable labels, urls and if their on or off, upto 5 of them too :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Matthew K.

A modsetting to determine if it's on or off which is used for whether it's shown or not, and then simply calling the title and href via another modSettings in Subs.php.

Modifications.english.php edits for the labels, correct? Very simple. 5 minutes to throw together I would assume.

ɔɔɔɔɔɔuɥoɾ

Quote from: Labradoodle-360 on July 24, 2010, 10:02:47 PM
A modsetting to determine if it's on or off which is used for whether it's shown or not, and then simply calling the title and href via another modSettings in Subs.php.

Modifications.english.php edits for the labels, correct? Very simple. 5 minutes to throw together I would assume.
As a matter of fact yes, about maybe 8 minutes lol.
Ive been working on the HTTP href problem for a while though, its just some bug I cannot track very easily at this time.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Matthew K.

Quote from: ♪ JohnCcCcCc ♫ on July 24, 2010, 10:05:50 PM
Quote from: Labradoodle-360 on July 24, 2010, 10:02:47 PM
A modsetting to determine if it's on or off which is used for whether it's shown or not, and then simply calling the title and href via another modSettings in Subs.php.

Modifications.english.php edits for the labels, correct? Very simple. 5 minutes to throw together I would assume.
As a matter of fact yes, about maybe 8 minutes lol.
Ive been working on the HTTP href problem for a while though, its just some bug I cannot track very easily at this time.
Feel free to PM me more information about the problem and I can help you work it out. For now though, lets get this topic back on subject or have it split.

ɔɔɔɔɔɔuɥoɾ

Speaking of which, The OP never returned....


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

vivekm

Nice to see a mod is getting developed for this aspect, is it been published if so may I have the link Pls.

CapadY

Quote from: JohnCcCcCc on July 24, 2010, 07:01:36 PM
This must be the 10th time I have heard this request this week, lol

Someone also made a tutorial too..
And everybody is first using the search option :s
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

andwin

Quote from: JohnCcCcCc on July 24, 2010, 09:58:22 PM
Well, its quiet a bit, I managed to make the entire thing in a matter of 3 files only

Completely customizable labels, urls and if their on or off, upto 5 of them too :)

Any news of this mod?

ɔɔɔɔɔɔuɥoɾ

Actually I had to make it 6 buttons with 4 menu items, which is better,

Search the Modsite for "buttons" then you will see the 6 buttons mod or click the link in my signature "My mods (15)".


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers


Advertisement: