Default Theme...adding to and modifying the menu

Started by Mareid, October 03, 2022, 10:57:17 AM

Previous topic - Next topic

Mareid

I am using the SMF version 2.12 & the default theme.

 I would like to replace the word Home next to the Home icon with the word Forums
 
I also want to make the first menu item a link back to the website the forum lives on.  I think I can figure that out, but I'm wondering if I can use my site's favicon as the icon for the website link.
If you have any suggestions or hints, I'd like to hear them.


Sir Osis of Liver

Subs.php


// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'website' => array(
'title' => $txt['home'],
'href' => 'https://www.simplemachines.org',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),

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

'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

1- https://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
(same basically holds true for 2.1.x)
The text string is defined in index.english.php -- but you might want to ADD a $txt['forum'] = 'Forum'; to modifications.english.php and change the $txt reference in Subs.php to that instead of changing the actual Home text (not sure if that text string is used in other places)

2- https://wiki.simplemachines.org/smf/Favicon.ico
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: