Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: isytamer71 on December 15, 2022, 08:52:32 AM

Title: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 08:52:32 AM
My smf forums recently underwent a server change and now the header image banner is not linked to the main page. I have looked and looked to try and find the the css/index file under themes and layout settings to find this url link and change it to the right one. Could anyone point me in the right direction for where I can find this header banner image link url to change it? Thank You!
Title: Re: Header Banner Image Url Problem
Post by: Doug Heffernan on December 15, 2022, 09:04:43 AM
Have a look at the option called: Logo image URL located under Theme Settings.
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 09:17:23 AM
Quote from: Doug Heffernan on December 15, 2022, 09:04:43 AMHave a look at the option called: Logo image URL located under Theme Settings.


I must be on overload, where is this located in the admin section. I am assuming it is in the themes and layout section?
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 09:22:44 AM
This is all I seem to see, probably not in the right area.
(https://i.imgur.com/UmfT0Z5.jpg)
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 09:28:49 AM
If this is what your talking about. I need to change the link this goes to when clicked not the actual image itself.
(https://i.imgur.com/FAT2rg5.jpg)
Title: Re: Header Banner Image Url Problem
Post by: Doug Heffernan on December 15, 2022, 09:39:11 AM
Quote from: isytamer71 on December 15, 2022, 09:28:49 AMIf this is what your talking about. I need to change the link this goes to when clicked not the actual image itself.
(https://i.imgur.com/FAT2rg5.jpg)

Yes, that is the one.
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 09:41:06 AM
The image itself isn't the problem. It is not linked to the correct web address. I need to change that. Any ideas on where I can find this and change it? Thanks for the help.
Title: Re: Header Banner Image Url Problem
Post by: Doug Heffernan on December 15, 2022, 09:59:24 AM
Quote from: isytamer71 on December 15, 2022, 09:41:06 AMThe image itself isn't the problem. It is not linked to the correct web address. I need to change that. Any ideas on where I can find this and change it? Thanks for the help.

At the index.template.php file of the theme that you are using as default, find this code:

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
And replace it with this:

<a href="redirection_url_link_here">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
Replace redirection_url_link_here with the actual link that you want your logo to point to when clicked upon.
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 10:08:51 AM
Any clue at to a quick way to navigate to this in the index template php file?
Title: Re: Header Banner Image Url Problem
Post by: isytamer71 on December 15, 2022, 10:15:10 AM
I found it. It begins on the third part with line 168. Thank You!

It is now fixed!
Title: Re: Header Banner Image Url Problem
Post by: Doug Heffernan on December 15, 2022, 11:29:24 AM
Quote from: isytamer71 on December 15, 2022, 10:15:10 AMI found it. It begins on the third part with line 168. Thank You!

It is now fixed!

Glad to hear that. I am marking this as solved.