Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: petewadey on January 11, 2018, 10:39:41 AM

Title: How to add a logo for the theme "Core"?
Post by: petewadey on January 11, 2018, 10:39:41 AM
Is it possible to put 2 logo's side by side?
Thanks
Pete
Title: Re: How to add a logo for the theme "Core"?
Post by: Sir Osis of Liver on January 11, 2018, 03:25:42 PM
index.template.php



<div id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
<div class="tborder">
<div class="catbg">
<img class="floatright" id="smflogo" src="', $settings['images_url'], '/smflogo.gif" alt="Simple Machines Forum" />
<h1 id="forum_name">';
echo '
<image src="http://www.domain.com/forum/Themes/core/images/logo1.png">
<image src="http://www.domain.com/forum/Themes/core/images/logo2.png">';
echo '
</h1>
</div>';

// Display user name and time.


Title: Re: How to add a logo for the theme &quot;Core&quot;?
Post by: petewadey on January 12, 2018, 10:23:38 AM
Thanks for reply.
Do I add this in current theme script? and will this then give me 2 boxes in admin to add url to logo images?
Lastly, do I need to resize my image to fit, or is that automatic?
Pete
Title: Re: How to add a logo for the theme &quot;Core&quot;?
Post by: Deaks on January 12, 2018, 11:39:47 AM
Quote from: petewadey on January 12, 2018, 10:23:38 AM
Thanks for reply.
Do I add this in current theme script? and will this then give me 2 boxes in admin to add url to logo images?
Lastly, do I need to resize my image to fit, or is that automatic?
Pete

You do this proposed change in index.template.php
It is a direct call to the image and does not include any admin interface for the images.
Yes you need to set sizes yourself with the suggestion given.
Title: Re: How to add a logo for the theme &quot;Core&quot;?
Post by: petewadey on January 15, 2018, 09:30:49 AM
Thanks, I'll give it a go and see how I get on. Is it ok to just add this script to the end of index template php? or does it matter where it is placed? And will my image need to be a png or can it be a jpeg?
Pete
Title: Re: How to add a logo for the theme &quot;Core&quot;?
Post by: Sir Osis of Liver on January 15, 2018, 12:24:24 PM
Noooooooooooo!!! (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Feek.gif&hash=47a7f570d6bf6d5cfe83418f6485d47ce689555d)  You can't just add code anywhere.  It replaces existing code in the template.  Search for the first line, you'll see where it is.  Image can be jpg, png, gif - just make sure you upload it to the correct theme directory.