Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: PrimalPrime on July 31, 2023, 05:13:44 PM

Title: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 05:13:44 PM
I am speaking of the logo/forum name which is set here in the screenshot below. Thank you very much.

https://prnt.sc/qCFDJ7lTu1lt
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 05:15:16 PM
What do you want it to show?
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 05:16:21 PM
Nothing. I have a banner displayed elsewhere, in index.templete.php.
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 05:22:11 PM
Ok, sure. Just be aware that the standard one includes the h1 tag, which is generally regarded as a good thing to keep, and the link to the home page, which is also useful. But you can get those with a custom banner too (easy to arrange).

You can remove the standard one from the template, or you can just hide it with CSS.

#header {display: none;}
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 05:24:17 PM
Hi, thank you. The banner I am using in index.templete.php is tagged H1. Where can the standard one be removed in the template, please?
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 05:34:41 PM
It's this code:

echo '
<div id="header">
<h1 class="forumtitle">
<a id="top" href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name_html_safe'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name_html_safe'] . '">', '</a>
</h1>';

echo '
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.svg" alt="Simple Machines Forum" title="Simple Machines Forum">' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '';

echo '
</div>

That's the entire header div. You can just take that out if you haven't put anything else in it.
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 05:37:14 PM
Can you please tell me what file that is in?
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 05:55:42 PM
index.template.php, of course. :)
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 06:54:25 PM
Hmmm, I seem to be a bit lost then. I am trying to track a file being loaded on every page load https://mysite/Themes/default/images/blank.png. Can I remove the code calling this image?

Thanks
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 07:12:33 PM
Probably. It's just code. Not sure what is calling it, though. Is it a problem?
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: Antechinus on July 31, 2023, 07:26:50 PM
Just taking a quick look through the 2.1 codebase, it appears to be related to an icon for the Alerts drop menu.

B:\z_SMF_Elk\smf_2-1-1_install\Themes\default\scripts\alerts.js (1 hit)
Line  10: notificationIcon = smf_images_url + '/blank.png';

In which case I would not worry about it. Apparently it can also be used as a placeholder for broken avatars, which I wouldn't worry about either.

B:\z_SMF_Elk\smf_2-1-1_install\Themes\default\Profile.template.php (5 hits)
Line  234: <li><a href="', $context['member']['website']['url'], '" title="' . $context['member']['website']['title'] . '" target="_blank" rel="noopener">', ($settings['use_image_buttons'] ? '<span class="main_icons www" title="' . $context['member']['website']['title'] . '"></span>' : $txt['www']), '</a></li>';
Line 1053: <a href="', $server['url'], '" target="_blank" rel="noopener"', '>', $server['name'], '</a><br>';
Line 2499: <span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank" rel="noopener">', $txt['profile_warning_new_template'], '</a>]</span>
Line 2960: <img id="avatar" src="', $context['member']['avatar']['choice'] == 'server_stored' ? $context['member']['avatar']['href'] : $modSettings['avatar_url'] . '/blank.png', '" alt="">
Line 2971: if (avatar.src.indexOf("blank.png") > -1)
Title: Re: Can I disable the logo image from showing both the forum name and default logo?
Post by: PrimalPrime on July 31, 2023, 07:30:14 PM
That makes sense. Thank you very much.