News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to remove SMF logo on default theme

Started by I JaR oF JaM I, November 09, 2009, 10:44:45 PM

Previous topic - Next topic

I JaR oF JaM I

Hey guys, just installed RC2 and am liking it so far.   However, I still am not super familiar with the way that any of the SMF 2.x versions are coded.   How do I go about removing the SMF logo on the default theme?
Death smiles at us all... All we can do is smile back.

hadesflames

go into your index.template.php file and search for:

<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />

remove that and that's it.

Talismen

I tried removing that exact line but got an error.
I think it was due to the remaining ' marks left on the outside of that line.

Anyone know exactly which characters (along with that line) to remove, to the right and left?

Thanks.
Do you feel.....like I do?

Forum Guy

another way is take the logo image and erase the graphics - this way it becomes completely translucent.

hadesflames

#4
Quote from: Talismen on November 10, 2009, 03:09:52 PM
I tried removing that exact line but got an error.
I think it was due to the remaining ' marks left on the outside of that line.

Anyone know exactly which characters (along with that line) to remove, to the right and left?

Thanks.

When you remove the code, that line should look like this:

', empty($settings['site_slogan']) ? '' : '<div id="siteslogan" class="align_right">' . $settings['site_slogan'] . '</div>', '

you need to leave the two single quotes in after the question mark.

Alternatively you can go into Admin > Configuration > Current Theme

Then in the box next to "Site slogan:" just put a space, then save those settings. That should get rid of the logo without showing any text either, you can also enter text and it will display that text instead of the logo.

Talismen

#5
Quote from: hadesflames on November 10, 2009, 05:07:27 PM
Quote from: Talismen on November 10, 2009, 03:09:52 PM
I tried removing that exact line but got an error.
I think it was due to the remaining ' marks left on the outside of that line.

Anyone know exactly which characters (along with that line) to remove, to the right and left?

Thanks.

When you remove the code, that line should look like this:

', empty($settings['site_slogan']) ? '' : '<div id="siteslogan" class="align_right">' . $settings['site_slogan'] . '</div>', '

you need to leave the two single quotes in after the question mark.

Alternatively you can go into Admin > Configuration > Current Theme

Then in the box next to "Site slogan:" just put a space, then save those settings. That should get rid of the logo without showing any text either, you can also enter text and it will display that text instead of the logo.

Great! That worked! YOU ROCK!!! ;)

But - one thing left (on this topic) - how do I center my logo name or custom logo,
(from admincp->configuration->themes and layout->Logo image URL) ???

I know I need to put in the :


<center> </center>


tags around something, but, is it the same in 2.0 as it has always been in 1.1.x versions?


THANKS AGAIN!!!!
Do you feel.....like I do?

tyty1234

One more thing to add...you should not use <center> as it is deprecated in XHTML 1.0 Transitional. It should be used like this.


<div align="center">Code</div>
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

I JaR oF JaM I

Okay, so then one more question.   If I add my own logo, will it expand the header to fit the size of the image I use for the logo?
Death smiles at us all... All we can do is smile back.

tyty1234

My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

busterone



Quote
Great! That worked! YOU ROCK!!! ;)

But - one thing left (on this topic) - how do I center my logo name or custom logo,
(from admincp->configuration->themes and layout->Logo image URL) ???

I know I need to put in the :


<center> </center>


tags around something, but, is it the same in 2.0 as it has always been in 1.1.x versions?


THANKS AGAIN!!!!

Use this -
<div align="center"><a href="', $scripturl, '">', empty($settings['header_logo_url']) ? $context['forum_name'] : '<img src="' . $settings['header_logo_url'] . '" alt="' . $context['forum_name'] . '" />', '</a></div>

Talismen

Quote from: busterone on November 10, 2009, 10:38:47 PM

Use this -
<div align="center"><a href="', $scripturl, '">', empty($settings['header_logo_url']) ? $context['forum_name'] : '<img src="' . $settings['header_logo_url'] . '" alt="' . $context['forum_name'] . '" />', '</a></div>


Hmmm...I tried this, but it's not centering the logo....
Here's the link to the test site...Right now I just have a test image up there that's about the same size as the logo. I'm using it, just for the size comparison:

http://testcurve.allsidespoliticalforums.com/index.php

I inserted the "div align center" tags you noted above, but it's not centering.
I confused 8)
Do you feel.....like I do?

busterone

Ahh- yes, my mistake. That code works, but you also need to go to your /Themes/default/css folder and change one css property.
open index.css and look for  h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
   float: left;
}

Remove the line- float: left;

babjusi

Quote from: tyty1234 on November 10, 2009, 10:20:02 PM
One more thing to add...you should not use <center> as it is deprecated in XHTML 1.0 Transitional. It should be used like this.


<div align="center">Code</div>


This has been depricated too btw :P

Talismen

Quote from: busterone on November 12, 2009, 11:39:26 AM
Ahh- yes, my mistake. That code works, but you also need to go to your /Themes/default/css folder and change one css property.
open index.css and look for  h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
   float: left;
}

Remove the line- float: left;

That worked! Thanks so much! ;)

And thanks to all who helped! I'll be bookmarking this thread, just so I know where to find this stuff, when SMF 2.x goes "gold".
Do you feel.....like I do?

busterone


Advertisement: