Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: NanoSector on November 28, 2011, 12:39:21 PM

Title: Back to the index
Post by: NanoSector on November 28, 2011, 12:39:21 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3249)

Back to the index
If you need to report a bug, please do so on GitHub! (https://github.com/Yoshi2889/BackToTheIndex)

This mod allows you to add a button to the menu with a customized title/text, URL and position (either on the end or the start of the menu), and the option to open the link in a new tab.

Features:
- You can enter a custom title,
- You can also enter a custom link/URL,
- Can be put either at the start or at the end of the menu,
- Can open the link in a new tab.

Settings found in:
Admin > Configuration > Modification Settings > Miscellaneous

How to install:
The Package Manager (http://wiki.simplemachines.org/smf/Package_manager) should work in most cases.

Languages:
- English
- English UTF8
- Dutch
- Dutch UTF8
- Polish (by phantomm) - INCOMPLETE
- Polish UTF8 (also by phantomm) - INCOMPLETE

Translations are welcome!

Changelog:
v0.4.2:
- Fixes a parse error in the Dutch language

v0.4.1:
- Reorganised bits of code

v0.4:
- Added option to open the link in a new tab
- Code cleanup
- Bug fixes

v0.3:
- Now uses hooks
- Is now compatible with portals
- Code cleanup

v0.2.1:
- Smacked some bugs

v0.2:
- Added Polish translation (thanks phantomm!)
- Added option to change menu position (also thanks phantomm!)

v0.1:
- Initial release

License:
This mod is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported license. (http://creativecommons.org/licenses/by-sa/3.0/)
Title: Re: Back to the index
Post by: Adrek on November 28, 2011, 02:21:46 PM
If it's for home page (I think that) this should be before forum Home tab :)

Here's polish lang:
ISO:

$txt['backtotheindex_enabled'] = 'Wł±cz modyfikację "Wróć do indeksu"';
$txt['backtotheindex_title'] = 'Tytuł przycisku "Wróć do indeksu" w menu';
$txt['backtotheindex_href'] = 'Adres URL przycisku "Wróć do indeksu"';


UTF8:

$txt['backtotheindex_enabled'] = 'Włącz modyfikację "Wróć do indeksu"';
$txt['backtotheindex_title'] = 'Tytuł przycisku "Wróć do indeksu" w menu';
$txt['backtotheindex_href'] = 'Adres URL przycisku "Wróć do indeksu"';

Title: Re: Back to the index
Post by: NanoSector on November 29, 2011, 09:20:47 AM
Quote from: phantomm on November 28, 2011, 02:21:46 PM
If it's for home page (I think that) this should be before forum Home tab :)

Here's polish lang:
ISO:

$txt['backtotheindex_enabled'] = 'Wł±cz modyfikację "Wróć do indeksu"';
$txt['backtotheindex_title'] = 'Tytuł przycisku "Wróć do indeksu" w menu';
$txt['backtotheindex_href'] = 'Adres URL przycisku "Wróć do indeksu"';


UTF8:

$txt['backtotheindex_enabled'] = 'Włącz modyfikację "Wróć do indeksu"';
$txt['backtotheindex_title'] = 'Tytuł przycisku "Wróć do indeksu" w menu';
$txt['backtotheindex_href'] = 'Adres URL przycisku "Wróć do indeksu"';

I will add that to my Thoughts list, an option to add it at the beginning or at the end of the menu :)

If you could translate these pieces of text, I am able to add a full Polish translation into the mod for version 0.2:


$txt['backtotheindex_position'] = 'Position of the Back to the index button';
$txt['backtotheindex_beginofmenu'] = 'At the beginning of the menu (before Home button)';
$txt['backtotheindex_endofmenu'] = 'At the end of the menu (after Logout/Register button)';


Thanks :)
Title: Re: Back to the index
Post by: Adrek on November 30, 2011, 04:57:53 AM
ISO:

$txt['backtotheindex_position'] = 'Pozycja przycisku "Wróć do indeksu"';
$txt['backtotheindex_beginofmenu'] = 'Na pocz±tku menu (przed przyciskiem Strona główna)';
$txt['backtotheindex_endofmenu'] = 'Na końcu menu (po przycisku Wyloguj się/Rejestracja)';

UTF8:

$txt['backtotheindex_position'] = 'Pozycja przycisku "Wróć do indeksu"';
$txt['backtotheindex_beginofmenu'] = 'Na początku menu (przed przyciskiem Strona główna)';
$txt['backtotheindex_endofmenu'] = 'Na końcu menu (po przycisku Wyloguj się/Rejestracja)';


;)
Title: Re: Back to the index
Post by: NanoSector on November 30, 2011, 09:27:49 AM
Thanks a lot :)

Updating the mod & uploading it in a while.

Updated. When updating your installation, just uninstall the old version and install the newer one.
Title: Re: Back to the index
Post by: NanoSector on November 30, 2011, 09:50:24 AM
I just found out that the mod doesn't like portals damn well.

That's going to kick in for a manual installation for a while I suppose (unless you aren't looking for an installation with the button at the beginning of the menu) :-\

Adding to my to-do list: Make BTTI compatible with portals.
Title: Re: Back to the index
Post by: ryanknoll on December 08, 2011, 06:36:03 PM
Just the mod I was looking for.  Thank you.
Title: Re: Back to the index
Post by: NanoSector on December 26, 2011, 04:03:46 PM
Fixed a few bugs, version 0.2.1 is uploaded (now compatible with SMF 2.0.2)!

Uninstall the old package before you begin though (I'm sorry if you lose any data), it's not upgrade-proof.
Title: Re: Back to the index
Post by: NekoJonez on June 07, 2012, 04:19:25 AM
No offence but to my opinion this mod is completely useless since it doesn't add a thing.
Since you can use in this case for example.. "Simple Machines Community Forum » Customizing SMF » Modifications and Packages"

To get back easily to the index.
Title: Re: Back to the index
Post by: NanoSector on June 07, 2012, 09:35:03 AM
Quote from: JonezJeA on June 07, 2012, 04:19:25 AM
No offence but to my opinion this mod is completely useless since it doesn't add a thing.
Since you can use in this case for example.. "Simple Machines Community Forum » Customizing SMF » Modifications and Packages"

To get back easily to the index.
Not if you have a forum on lessay http://lol.com/forum and need a button that goes back to http://lol.com...
Title: Re: Back to the index
Post by: NanoSector on December 17, 2012, 09:59:46 AM
Mod works with 2.0.3 as-is.
Title: Re: Back to the index
Post by: NanoSector on January 05, 2013, 10:31:35 AM
Mod updated to 0.3, now uses hooks and fixes the issue that occured with portals. Happy buttoning! :)
Title: Re: Back to the index
Post by: gatorfan59 on January 12, 2013, 10:30:02 AM
Installed and working great... One question, is there anyway to have the link open in a new window? Can I add a target=_blank somewhere in the script? Thanks!
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 11:07:40 AM
Quote from: gatorfan59 on January 12, 2013, 10:30:02 AM
Installed and working great... One question, is there anyway to have the link open in a new window? Can I add a target=_blank somewhere in the script? Thanks!
Hmm, I will look into creating a switch for this, thanks for reporting :)

(shouldn't be too hard - just a couple of lines)
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 12:14:48 PM
Updated - version 0.4 should provide the feature you wanted :)
Title: Re: Back to the index
Post by: Shambles on January 12, 2013, 12:26:57 PM
This mod is called "Back to the index", but why is that?

Post #1 in this thread doesn't say what the mod actually does, and the mod download page says it's about adding a customisable button...

QuoteAdds a custom button on the button row. The button this mod adds is completely customizable, with a custom URL, name, and the option to place it at the beginning and the end of the menu

So, why does it have the name it does?

Just askin'
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 12:30:46 PM
Quote from: ®Shambles on January 12, 2013, 12:26:57 PM
This mod is called "Back to the index", but why is that?

Post #1 in this thread doesn't say what the mod actually does, and the mod download page says it's about adding a customisable button...

QuoteAdds a custom button on the button row. The button this mod adds is completely customizable, with a custom URL, name, and the option to place it at the beginning and the end of the menu

So, why does it have the name it does?

Just askin'
The button is customizable the way you like it with your own text and URL and such.

It is called Back to the index, because it is a button which should bring you, well, Back to the index ;)

If you want me to rewrite the description, I'll be more than glad to do so :)
EDIT: Oh wow I didn't enter a description at all... :-[
/me is horrible with descriptions
Title: Re: Back to the index
Post by: Shambles on January 12, 2013, 01:26:41 PM
Quote
It is called Back to the index, because it is a button which should bring you, well, Back to the index ;)
Meh, I don't buy that :P

If the sole objective of the modification is to create a custom button in a customisable position on the button row, to contains customisable content, surely the mod should be "Create Custom Button"...?


Hey, it's your mod but I was just curious that's all...
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 01:37:58 PM
Quote from: ®Shambles on January 12, 2013, 01:26:41 PM
Quote
It is called Back to the index, because it is a button which should bring you, well, Back to the index ;)
Meh, I don't buy that :P

If the sole objective of the modification is to create a custom button in a customisable position on the button row, to contains customisable content, surely the mod should be "Create Custom Button"...?
Yeah, but I wanted to be original! :P
Search "Custom button" on the mod site and you're bombarded with mods :P
Title: Re: Back to the index
Post by: gatorfan59 on January 12, 2013, 02:32:23 PM
Perfect! Thanks for the quick update!
Title: Re: Back to the index
Post by: Shambles on January 12, 2013, 02:59:48 PM
Quote from: Yoshi2889 on January 12, 2013, 01:37:58 PM
Search "Custom button" on the mod site and you're bombarded with mods :P

You're right :D

It bombarded me with two mods (http://custom.simplemachines.org/mods/index.php?action=search;basic_search=custom+button)  8)
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 03:00:50 PM
Quote from: ®Shambles on January 12, 2013, 02:59:48 PM
Quote from: Yoshi2889 on January 12, 2013, 01:37:58 PM
Search "Custom button" on the mod site and you're bombarded with mods :P

You're right :D

It bombarded me with two mods (http://custom.simplemachines.org/mods/index.php?action=search;basic_search=custom+button)  8)
Five for me (unapproved mods), though I believe like there are like 10 more on the site, somewhere :)
Title: Re: Back to the index
Post by: Shambles on January 12, 2013, 03:13:23 PM
Last word from me on this then...

If I came to sm.org looking for a customisable button mod, what would I put into the [search modifications] box that would find yours?  ???
Title: Re: Back to the index
Post by: NanoSector on January 12, 2013, 03:37:16 PM
Quote from: ®Shambles on January 12, 2013, 03:13:23 PM
Last word from me on this then...

If I came to sm.org looking for a customisable button mod, what would I put into the [search modifications] box that would find yours?  ???
No idea, I'm rewriting the short description atm, you can find it by searching for custom button now.
Title: Re: Back to the index
Post by: vmr101 on January 15, 2013, 02:58:47 AM
This is great. Thank you!
Title: Re: Back to the index
Post by: NanoSector on January 15, 2013, 07:19:58 AM
Thank you :)
Title: Re: Back to the index
Post by: NanoSector on February 01, 2013, 05:31:29 PM
Works with 2.0.4 as-is.
Title: Re: Back to the index
Post by: NanoSector on May 24, 2013, 01:50:29 PM
Mod updated to 0.4.1, which is a maintenance release!

If you already have version 0.4 installed, there is no need to update to 0.4.1, all functionality remains the same. 0.4.1 just reorganises bits of code.

Release notes:
- Reorganised bits of code.

Happy buttoning!
Title: Re: Back to the index
Post by: The Wizard on October 03, 2013, 07:01:13 AM
Hello Yoshi:

I am want to link in a page, or two that I created in simple portal, but I need the answers to the questions below.

1. Does the button show up for guests? - I only want users, admins. moderators to see this button
2. Does this mod allow you to add more then one button?

Wiz
Title: Re: Back to the index
Post by: NanoSector on October 03, 2013, 07:10:48 AM
Hi the wizard,

1. This mod does not use permissions, though I can make it use permissions in a later versions.
2. No, this mod just adds a single button.
Title: Re: Back to the index
Post by: live627 on October 03, 2013, 11:08:29 AM
Suggestion: Put all language entries into a separate language file and load it in btti_settings(). Then you don't need to edit any files.


(That quote in your sig is the best ever)
Title: Re: Back to the index
Post by: NanoSector on October 03, 2013, 11:14:06 AM
Thanks, I'll note that down for a future version.
Title: Re: Back to the index
Post by: NanoSector on August 14, 2014, 09:22:07 AM
Released a small update which fixes a language string missing in some cases where other mods which add language strings were added to Modifications.{language}.php.
Title: Re: Back to the index
Post by: mysimplesite on July 05, 2017, 12:06:05 PM
Works great in 2.0.14. Simple to install, easy to add menu item. Made my day.