Advertisement:

Author Topic: How to add a logo for the theme "Core"?  (Read 642 times)

Offline petewadey

  • Jr. Member
  • **
  • Posts: 122
How to add a logo for the theme "Core"?
« on: January 11, 2018, 10:39:41 AM »
Is it possible to put 2 logo's side by side?
Thanks
Pete

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,935
  • 'Tis the gift to be simple (duh)
Re: How to add a logo for the theme "Core"?
« Reply #1 on: January 11, 2018, 03:25:42 PM »
index.template.php

Code: [Select]

<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.


Offline petewadey

  • Jr. Member
  • **
  • Posts: 122
Re: How to add a logo for the theme &quot;Core&quot;?
« Reply #2 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

Offline BryanD

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,092
  • Gender: Male
Re: How to add a logo for the theme &quot;Core&quot;?
« Reply #3 on: January 12, 2018, 11:39:47 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.
Former Project Manager and Customizer of SMF
Former Marketing and Vice-President of Simple Machines

Offline petewadey

  • Jr. Member
  • **
  • Posts: 122
Re: How to add a logo for the theme &quot;Core&quot;?
« Reply #4 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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,935
  • 'Tis the gift to be simple (duh)
Re: How to add a logo for the theme &quot;Core&quot;?
« Reply #5 on: January 15, 2018, 12:24:24 PM »
Noooooooooooo!!!   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.