News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Home Button

Started by @rjen, November 15, 2023, 01:37:40 PM

Previous topic - Next topic

@rjen

Link to the mod

Custom Home Button

A modification for Simple Machines Forum 2.1 that allows the admin to change the URL for the Home Menu button.

This modification is inspired by the "Customizable Home Button" mod: https://custom.simplemachines.org/index.php?mod=2870 by Labradoodle-360
It is hooks only and supports SMF2.1 only

Settings

There are two settings for this mod, allowing the admin to maintain a URL for the home menu and chosing to open the page in a new browser tab. When an URL is maintained the Home menu button will link to the specified URL and an extra menu option is added to link to the forum.

License

Custom Home Button is released under the MIT License. A full copy of this license is included in the package file.


Changelog

Version 1.1:
  • Added option to open in new page
Version 1.0:
  • Initial release
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Bugo

This thing is cool, but why not provide the ability to change not only the URL, but also the text of the button?

@rjen

Sure, that can be added if desired. Mind you: it would be a fixed string and not language dependent...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

uhav2laf

Thank you. It works like a charm  :D

ColinJM

OK - This was raised elsewhere and I have been instructed by kindred to post it here...still finding my way around

Doug posted this and my reply:


[/quote]

Quote from: ColinJM on March 17, 2024, 10:23:53 PM
Quote from: Doug Heffernan on February 13, 2024, 08:57:06 AM
Quote from: ColinJM on February 13, 2024, 02:52:39 AM1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain

You can use this mod for that.

https://custom.simplemachines.org/index.php?mod=4379


Thanks Doug that fixed the Home link in the forum - now goes to my website


@Doug Heffernan - I've implemented that but I want it to open the same browser tab not a new tab in the same browser session - what do I have to change?

Then Soos posted:

Quote from: Sir Osis of Liver on March 17, 2024, 10:38:07 PMYou can do that in Subs.php, look for "all the bottons".  That's the main menu buttons array. 



Soos what directory is subs.php in and is it subscriptions.php?

Kind Regards

Colin

ColinJM

OK - I believe I MAY have found the Subs.php path >Sources - have found the array but need some help with the code to move to unique URL within same tab please.
Kind Regards

Colin

ColinJM

Actually I found it in customhomebutton.php - just removed the "target=Blank" to reinstate the W3 default.
Kind Regards

Colin

@rjen

Quote from: ColinJM on March 18, 2024, 01:00:54 AMActually I found it in customhomebutton.php - just removed the "target=Blank" to reinstate the W3 default.

That's correct if you want to change this mod behavior
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Changelog

Version 1.1:
Added option to open in new page
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Advertisement: