Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: coucnilhomeswap on February 14, 2009, 08:54:03 AM

Title: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on February 14, 2009, 08:54:03 AM
i do not know if this is in the right place. if its not could the mods move it to the appropriate board.

this tip will do two things to the default (core) theme on SMF 1.1.8 and i think other versions too. I did these with out using mod's adn you can to. but if someone wishes to make them into mods then please feel free to do so and give me a bit of credit at least please.

tip 1, to remove the SMF logo in the Core theme look for this code in index.template.php
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
Highlight all of that code in your index.template.php and then delete it then save the file and if you did it correctly you should see that the SMFlogo has gone.

tip 2, to center you custom banner on the Core theme go back to your index.template.php and find the following code.

<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

Replace with<div style="text-align: center;"><img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" /></div>';
save the file and your custom banner will now be centered

both tips are so easy that even a 3 year old could do it. but if you are having problems then ask me and i'll see what i can do for you.

*EDIT* if you use this tip could you post a reply here so i know if its working cheers
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: phpMyTony on February 14, 2009, 09:13:44 AM
Wicked, thanks :)
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on February 14, 2009, 09:22:46 AM
your welcome CSS. i found a mod that removes the smf logo for people. but sometimes it dont work if another perticular mod is installed thats why id like some clever cloggs to do a mod for these tips that will do it in one go
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: phpMyTony on February 14, 2009, 09:30:14 AM
Oh, I see.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Kermit on February 14, 2009, 09:44:45 AM

Don't use <center> as that tag is deprecated.

Rather use <div style="text-align: center;"> {stuff} </div> instead.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on February 14, 2009, 10:14:19 AM
ok thanks duncan85. The center tag does seem to work ok on my site though
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on February 14, 2009, 10:15:46 AM
read the first post again Duncan85 and see if thats ok
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Kermit on February 14, 2009, 10:16:11 AM
Quote from: alan1979 on February 14, 2009, 10:14:19 AM
ok thanks duncan85. The center tag does seem to work ok on my site though


I didn't claim,that it won't work ^^

For centering it should be better used div tags


Quote from: alan1979 on February 14, 2009, 10:15:46 AM
read the first post again Duncan85 and see if thats ok

Yep,it's ok now  :)
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on February 14, 2009, 10:18:50 AM
thanks for your help Duncan85 as always greatly appreciated
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Marcus Forsberg on February 15, 2009, 03:52:00 AM
Moved to Tips and Tricks (http://www.simplemachines.org/community/index.php?board=72.0) and added to Tips and Tricks (index) (http://www.simplemachines.org/community/index.php?topic=15899.0). Thanks for your tip.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: dollarbabe on February 16, 2009, 05:49:57 AM
thanks for this great tip allan1979.. ive been looking for something like this for weeks and this helps a lot. now my banner is already centered... youre a champ.. thanks again..
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on February 16, 2009, 06:21:43 AM
your very welcome dollarbabe.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: MissyNL on February 25, 2009, 04:37:47 PM
great tips :)

but i think with tip 1, i replaced the image with my own PNG image.. with no effort i have a decent logo with the background transparant and with a dropshadow :) It looks very nice :)

Also.. for the TS.. i would rename this topic to Tips for 1.1.8 - Logo  or something. This would be more clear for users who run thru the tips :)
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 03:48:17 PM
Wow Thanks again for the tip, I did the first part step 1. removed the logo
thanks for the tip ;)

A little nervous to do step 2 I would love to center my site title, make it bigger, a different color and font style. I'll keep looking around, thanks so much.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 03:54:50 PM
centering the logo is easy. no need to worry. the other stuff is probably a css issue i think
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 03:59:02 PM
Quote from: my S-M-F mods on March 02, 2009, 03:54:50 PM
centering the logo is easy. no need to worry. the other stuff is probably a css issue i think

I'll center it for now, I was just nervous cause I saw what Duncan said about using Div instead of center. If the code in your 1st post is good to go let me know, thanks.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 04:10:56 PM
yes i replaced my code with the code duncan gave me and its working fine.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 04:14:36 PM
Quote from: my S-M-F mods on March 02, 2009, 04:10:56 PM
yes i replaced my code with the code duncan gave me and its working fine.

Not working :( is it supposed to take effect right away? I reloaded my site logged in and out, nothing, my site title is still on the left.
TD

Note, I don't have a custom banner I'm trying to move my default site title to center.
TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 04:24:55 PM
it will not work with the site name you need a custom banner for it to take effect
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 04:28:28 PM
Quote from: my S-M-F mods on March 02, 2009, 04:24:55 PM
it will not work with the site name you need a custom banner for it to take effect

Phewf well thanks for that, thought I screwed something up. I need to get a banner I guess.

Should I change the codes back or just leave it?

Thanks again so much for your help, advice and support I really appreciate it.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 04:33:57 PM
leave it the way it is. whats the name of your site and i will knock some up for you. only do 6 designs
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 04:39:06 PM
Quote from: my S-M-F mods on March 02, 2009, 04:33:57 PM
leave it the way it is. whats the name of your site and i will knock some up for you. only do 6 designs

Really? Thanks so much. it's new and my first ever site so be easy on me :D

it's www.treasuredigging.com a metal detecting forum.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 04:50:54 PM
try this. when you click the link you can right click and save it to your desktop (http://www.xtupload.com/new/thumb-FF5A_49AC54A6.jpg) (http://www.xtupload.com/new/share-FF5A_49AC54A6.html)
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:09:34 PM
Quote from: my S-M-F mods on March 02, 2009, 04:50:54 PM
try this. when you click the link you can right click and save it to your desktop (http://www.xtupload.com/new/thumb-FF5A_49AC54A6.jpg) (http://www.xtupload.com/new/share-FF5A_49AC54A6.html)

I have it on the desktop, you did that quick wow
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 05:12:31 PM
hehe is it ok for you
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:15:17 PM
Quote from: my S-M-F mods on March 02, 2009, 05:12:31 PM
hehe is it ok for you

Ha Ha.....lmao it's GREAT man. You DID see what's there now right?

How do I post it to the site?
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 05:24:12 PM
firstly upload it to your image file in either your root directory or the images folder in the theme directory and then in current theme in admin you need to add the full url and click save for it to show
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:28:23 PM
Quote from: my S-M-F mods on March 02, 2009, 05:24:12 PM
firstly upload it to your image file in either your root directory or the images folder in the theme directory and then in current theme in admin you need to add the full url and click save for it to show

OOH That's a big to do for me not being so computer savvy but here goes, wish me luck.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:32:03 PM
Quote from: my S-M-F mods on March 02, 2009, 05:24:12 PM
firstly upload it to your image file in either your root directory or the images folder in the theme directory and then in current theme in admin you need to add the full url and click save for it to show

Uploaded succesfully into the default theme images folder ;), let me try the rest.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:38:53 PM
Quote from: my S-M-F mods on March 02, 2009, 05:24:12 PM
firstly upload it to your image file in either your root directory or the images folder in the theme directory and then in current theme in admin you need to add the full url and click save for it to show

I don't know where on my site in Admin I am supposed to add the full URL.
still looking.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:42:49 PM
Quote from: TDNY on March 02, 2009, 05:38:53 PM
Quote from: my S-M-F mods on March 02, 2009, 05:24:12 PM
firstly upload it to your image file in either your root directory or the images folder in the theme directory and then in current theme in admin you need to add the full url and click save for it to show

I don't know where on my site in Admin I am supposed to add the full URL.
still looking.

I got it but lmao it's sooo tiny :D
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 02, 2009, 05:47:45 PM
go back to page 3 were the logo is. now click it and another window will open. a bigger version will apear then you can save that one
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 05:56:04 PM
Quote from: my S-M-F mods on March 02, 2009, 05:47:45 PM
go back to page 3 were the logo is. now click it and another window will open. a bigger version will apear then you can save that one

Looks great but it's a little too big now and over to the right too far any way to fix that?
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: TDNY on March 02, 2009, 06:04:52 PM
Forget my last post, I had the screen res enlarged for something else so I did Ctrl and scrolled the mouse wheel.

That Banner is GREAT thanks so much I really appreciate it.

I went to donate on your site but says I need to join, I'm off to join. Thanks again for the help I couldn't be happier.

TD
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: crazy2002 on March 02, 2009, 10:34:33 PM
tried it on my site and it worked great thanks Duncan ,,,I'm looking for more tricks from you
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: coucnilhomeswap on March 03, 2009, 09:41:02 AM
it wasnt duncan that did this post. duncan only cleaned the code up so people didnt get errors
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: crazy2002 on March 03, 2009, 07:45:22 PM
Quote from: my S-M-F mods on March 03, 2009, 09:41:02 AM
it wasnt duncan that did this post. duncan only cleaned the code up so people didnt get errors
ok thanks to who did ,,,,
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Morrell on March 11, 2009, 09:06:07 AM
Worked Great! Thank You
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Chas Large on May 09, 2009, 03:44:55 AM
Thanks for the great tip, found it by accident in Hints and Tips. Have been looking for this for ages.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: Geargarious on May 11, 2009, 02:14:08 PM
I want to do this for my forum but when I go to the adminsection it doesn't give me the option to mod core, only classic yabb and babylon. Am  i missing something here, I'm pretty new at this.
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: andy40 on May 13, 2009, 08:59:21 AM
i want my own banner at the top but i have mods installed and cant find this code in index.template.php can anyone help
Title: Re: [tip/trick] for SMF 1.1.8 users
Post by: H on July 06, 2009, 07:13:40 PM
andy40, do you still need help with this? Which theme are you using? Please attach your index.template.php

Quote from: Geargarious on May 11, 2009, 02:14:08 PM
I want to do this for my forum but when I go to the adminsection it doesn't give me the option to mod core, only classic yabb and babylon. Am  i missing something here, I'm pretty new at this.

When modifying the default theme, you need to use the option in the admin area to create a copy of the default theme. This is so that if you break your theme you can still revert to the default and fix the problem
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: Pinball Nation on August 21, 2009, 06:02:39 PM
Hello everyone,Im kinda new at this stuff.Does this code remove just the part where the smf logo an the name of your site.Or does it remove that an the search an news also.I would like to add a banner but i want to keep the enhanced profile an news an search.Thanks
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: Pinball Nation on August 22, 2009, 07:13:07 PM
hello again, i have done everything except.But what admin url do i need to add.I have added some but the image is centered but no banner just an red x.Im using smf 1.1.10.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: Banthe on September 19, 2009, 08:15:45 AM
Hi all, I've got the same problem as many others...I can't seem to center my logo! :-[ I've tried to change the code in my index.template but it doesn't seem to be the same as described in these suggestions? I am using the SMF default - core theme, which  has quite a few mods installed (I would think thats why the code is slightly different). The code in question is:
<body onload="PreloadFlag = true;">';

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else

{
$domain = parse_url($scripturl);
$domain = $domain['scheme'].'://'.$domain['host'];
echo '
<a href="', $domain, '"><img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $domain, '" /></a>';
}

echo '
</td>

</tr>
</table>';

Any help would be greatly appreciated, as I have no idea what I'm doing!!!
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: Arantor on September 19, 2009, 08:23:01 AM
You should be able to do it thus:
<body onload="PreloadFlag = true;">';

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else

{
$domain = parse_url($scripturl);
$domain = $domain['scheme'].'://'.$domain['host'];
echo '
<div align="center"><a href="', $domain, '"><img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $domain, '" /></a></div>';
}

echo '
</td>

</tr>
</table>';
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: Banthe on September 19, 2009, 08:27:33 AM
Arantor, you are a legend!  :D Thanx so much...worked like a charm!!!!!!!!
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: nycrican2 on September 23, 2009, 12:30:12 PM
This worked for me and I am using SMF version 1.1.10 and the default template. Thanks for much for the hint.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: sharks on August 12, 2010, 02:57:48 PM
This is the best piece of advice that i've found in a long time. It's a very accurate post, simple and with proper English.

Tested both code edits. Definitely amazing work!


BTW, i want to add some text under my now centered banner. How to do that?
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on August 13, 2010, 07:54:19 AM
Quote from: sharks on August 12, 2010, 02:57:48 PM
This is the best piece of advice that i've found in a long time. It's a very accurate post, simple and with proper English.

Tested both code edits. Definitely amazing work!


BTW, i want to add some text under my now centered banner. How to do that?

Hi sharks. Im glad my tip/trick was helpful to you. Im not sure how to add text under the banner. Id have to set up a test copy of smf 1.1.11 to try it out
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on August 13, 2010, 07:57:10 AM
Quote from: nycrican2 on September 23, 2009, 12:30:12 PM
This worked for me and I am using SMF version 1.1.10 and the default template. Thanks for much for the hint.

Hi nycrican2 im glad i could help.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on August 13, 2010, 08:07:29 AM
Quote from: sharks on August 12, 2010, 02:57:48 PM
This is the best piece of advice that i've found in a long time. It's a very accurate post, simple and with proper English.

Tested both code edits. Definitely amazing work!


BTW, i want to add some text under my now centered banner. How to do that?

Ok sharks ive sussed how to put text under your newly centered logo using the default theme.

Find the code you used to center your logo. if you have used the tip/trick code i gave you in the first post it should look like this.

<div   style="text-align: center;"><img src="',   $settings['header_logo_url'], '" style="margin: 4px;" alt="',   $context['forum_name'], '" /></div>';

At the end of that line create a new blank line and add this

<center><font color=red>your text goes here</font></center>

you can add edit or remove what you want to make it what you want.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: sharks on August 16, 2010, 12:26:16 PM
Thanks a lot, my S-M-F mods. :D

Another great job, as expected of you.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on August 16, 2010, 01:18:47 PM
as always sharks your welcome.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: IRFletcher on September 02, 2010, 11:43:53 AM
In order to place a banner on my site at the top, what file do I alter and what code do I change in the file, is it the index.template.php in the Default Themes folder?

Is the banner pic supposed to be named Banner.gif and placed in the Default Themes folder of the root?

Thanks.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on September 02, 2010, 12:06:26 PM
Quote from: IRFletcher on September 02, 2010, 11:43:53 AM
In order to place a banner on my site at the top, what file do I alter and what code do I change in the file, is it the index.template.php in the Default Themes folder?

Is the banner pic supposed to be named Banner.gif and placed in the Default Themes folder of the root?

Thanks.

for the banner at the top you need to edit the index.template.php file of what ever theme your using.

as for the banner pic it can be named anything and can be placed in either the root folder of the site or the images folder of the theme your using
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: IRFletcher on September 02, 2010, 12:36:35 PM
Okay, can you please post the code that I am to edit in the index.template.php and what code I am to replace it with?
Thanks.
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: coucnilhomeswap on September 02, 2010, 01:15:46 PM
Quote from: IRFletcher on September 02, 2010, 12:36:35 PM
Okay, can you please post the code that I am to edit in the index.template.php and what code I am to replace it with?
Thanks.

if you look at the first post it gives you the general area to look
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: IRFletcher on September 02, 2010, 07:21:21 PM
I placed the Banner.gif into the the Default Themes image folder and edited the index.template.php file in the Default Themes folder and located the code:

<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

and replaced it with:

<div style="text-align: center;"><img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" /></div>';

and nothing happened?

So I am not sure what I am doing wrong here as I also went into
Admin>Current Theme> and under 'This theme's images URL:'
put the path to the Banner.gif file:

http: //www.yourwebsite.com/Themes/default/images/Banner

and still no change...
Title: Re: [tip/trick] Logo and Banners in 1.1.x
Post by: JoeMumme on September 03, 2010, 01:57:19 AM
Thanks my S-M-F mods.

Excellent mod.