Hello members my first post in this section.
Here i share something which may helpful.
Add Home button in Footer area just below SMF copyright area.
Tips/tricks:
Theme/default/index.template.php
Search
<li class="copyright">', theme_copyright(), '</li>
Add after
<li class="last"><a id="button_home" href="', $scripturl , '"class="new_win"><span>', $txt['home'], '</span></a></li>
languagedir/Modifications.english.php
Search
?>
Add before
$txt['home'] = 'Home';
And see the result
(https://i.postimg.cc/K87WZdCv/New-Bitmap-Image.png)
Before we can approve this, there's just one thing that's missing:
QuoteYou should also add the version number in the title. If it works in more than one version, you can add both.
For example, is this for 2.1.x series or 2.0.x series or both?
I've fixed your post to conform to the other requirements of this board (check the sticky topic).
Quote from: Steve on November 24, 2022, 08:24:21 AMBefore we can approve this, there's just one thing that's missing:
QuoteYou should also add the version number in the title. If it works in more than one version, you can add both.
For example, is this for 2.1.x series or 2.0.x series or both?
I've fixed your post to conform to the other requirements of this board (check the sticky topic).
It's work in SMF 2.1.x i did not test in SMF 2.0
href="', $scripturl , '?home"
as far as i know this url, ?home does not exist in SMF so it would send you back to the home page anyway. so your mod is using code that it does not need to use. it should just go back to the $scripturl. of course if the forum is using a portal this may vary.
also you are not defining $txt['home'] anywhere so the error log will get filled up and your button will not show correctly.
Quote from: Illori on November 24, 2022, 08:38:01 AMhref="', $scripturl , '?home"
as far as i know this url, ?home does not exist in SMF so it would send you back to the home page anyway. so your mod is using code that it does not need to use. it should just go back to the $scripturl. of course if the forum is using a portal this may vary.
also you are not defining $txt['home'] anywhere so the error log will get filled up and your button will not show correctly.
But i am using it and no error log there.
yes if forum using portal this may vary.
I removed just the ?home and it works fine for me. Can a coder verify that this is correct without it so we can get this topic approved?
The use of ?home is wrong, because it does not exist.
And any txt string needs to be added to modifications.english.php
In other words, this "tip" is wrong in all sorts of ways.
Rejected.
Quote from: Kindred on November 24, 2022, 09:18:19 PMThe use of ?home is wrong, because it does not exist.
And any txt string needs to be added to modifications.english.php
In other words, this "tip" is wrong in all sorts of ways.
Rejected.
Modified please check
Looks good so far.
Quote from: Rumpa on November 24, 2022, 08:05:23 AMlanguagedir/Modifications.english.php
Search
end
Add before
$txt['home'] = 'Home';
Please fix this, there's no
end word, could cause confusion.
Use
?>, or simply advice to add it at the end of the file.
Quote from: Diego Andrés on November 25, 2022, 06:42:19 PMLooks good so far.
Quote from: Rumpa on November 24, 2022, 08:05:23 AMlanguagedir/Modifications.english.php
Search
end
Add before
$txt['home'] = 'Home';
Please fix this, there's no end word, could cause confusion.
Use ?>, or simply advice to add it at the end of the file.
fixed please check
Looks like she's got all the problems corrected, any reason not to approve it now?
isn't that the same $txt var that the menu uses, which should mean that it is always defined?