Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: coucnilhomeswap in Februar 14, 2009, 08:54:03 VORMITTAG

Titel: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in Februar 14, 2009, 08:54:03 VORMITTAG
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: phpMyTony in Februar 14, 2009, 09:13:44 VORMITTAG
Wicked, thanks :)
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in Februar 14, 2009, 09:22:46 VORMITTAG
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: phpMyTony in Februar 14, 2009, 09:30:14 VORMITTAG
Oh, I see.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Kermit in Februar 14, 2009, 09:44:45 VORMITTAG

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

Rather use <div style="text-align: center;"> {stuff} </div> instead.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in Februar 14, 2009, 10:14:19 VORMITTAG
ok thanks duncan85. The center tag does seem to work ok on my site though
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in Februar 14, 2009, 10:15:46 VORMITTAG
read the first post again Duncan85 and see if thats ok
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Kermit in Februar 14, 2009, 10:16:11 VORMITTAG
Zitat von: alan1979 in Februar 14, 2009, 10:14:19 VORMITTAG
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


Zitat von: alan1979 in Februar 14, 2009, 10:15:46 VORMITTAG
read the first post again Duncan85 and see if thats ok

Yep,it's ok now  :)
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in Februar 14, 2009, 10:18:50 VORMITTAG
thanks for your help Duncan85 as always greatly appreciated
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Marcus Forsberg in Februar 15, 2009, 03:52:00 VORMITTAG
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.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: dollarbabe in Februar 16, 2009, 05:49:57 VORMITTAG
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..
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in Februar 16, 2009, 06:21:43 VORMITTAG
your very welcome dollarbabe.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: MissyNL in Februar 25, 2009, 04:37:47 NACHMITTAGS
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 :)
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 03:48:17 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 03:54:50 NACHMITTAGS
centering the logo is easy. no need to worry. the other stuff is probably a css issue i think
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 03:59:02 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 03:54:50 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 04:10:56 NACHMITTAGS
yes i replaced my code with the code duncan gave me and its working fine.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 04:14:36 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 04:10:56 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 04:24:55 NACHMITTAGS
it will not work with the site name you need a custom banner for it to take effect
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 04:28:28 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 04:24:55 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 04:33:57 NACHMITTAGS
leave it the way it is. whats the name of your site and i will knock some up for you. only do 6 designs
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 04:39:06 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 04:33:57 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 04:50:54 NACHMITTAGS
try this. when you click the link you can right click and save it to your desktop (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.xtupload.com%2Fnew%2Fthumb-FF5A_49AC54A6.jpg&hash=676a4609e63a02eacf975158efe768ba3c2127d3) (http://www.xtupload.com/new/share-FF5A_49AC54A6.html)
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:09:34 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 04:50:54 NACHMITTAGS
try this. when you click the link you can right click and save it to your desktop (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.xtupload.com%2Fnew%2Fthumb-FF5A_49AC54A6.jpg&hash=676a4609e63a02eacf975158efe768ba3c2127d3) (http://www.xtupload.com/new/share-FF5A_49AC54A6.html)

I have it on the desktop, you did that quick wow
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 05:12:31 NACHMITTAGS
hehe is it ok for you
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:15:17 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:12:31 NACHMITTAGS
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?
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 05:24:12 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:28:23 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:24:12 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:32:03 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:24:12 NACHMITTAGS
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.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:38:53 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:24:12 NACHMITTAGS
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.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:42:49 NACHMITTAGS
Zitat von: TDNY in März 02, 2009, 05:38:53 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:24:12 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 02, 2009, 05:47:45 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 05:56:04 NACHMITTAGS
Zitat von: my S-M-F mods in März 02, 2009, 05:47:45 NACHMITTAGS
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?
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: TDNY in März 02, 2009, 06:04:52 NACHMITTAGS
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: crazy2002 in März 02, 2009, 10:34:33 NACHMITTAGS
tried it on my site and it worked great thanks Duncan ,,,I'm looking for more tricks from you
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: coucnilhomeswap in März 03, 2009, 09:41:02 VORMITTAG
it wasnt duncan that did this post. duncan only cleaned the code up so people didnt get errors
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: crazy2002 in März 03, 2009, 07:45:22 NACHMITTAGS
Zitat von: my S-M-F mods in März 03, 2009, 09:41:02 VORMITTAG
it wasnt duncan that did this post. duncan only cleaned the code up so people didnt get errors
ok thanks to who did ,,,,
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Morrell in März 11, 2009, 09:06:07 VORMITTAG
Worked Great! Thank You
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Chas Large in Mai 09, 2009, 03:44:55 VORMITTAG
Thanks for the great tip, found it by accident in Hints and Tips. Have been looking for this for ages.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: Geargarious in Mai 11, 2009, 02:14:08 NACHMITTAGS
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.
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: andy40 in Mai 13, 2009, 08:59:21 VORMITTAG
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
Titel: Re: [tip/trick] for SMF 1.1.8 users
Beitrag von: H in Juli 06, 2009, 07:13:40 NACHMITTAGS
andy40, do you still need help with this? Which theme are you using? Please attach your index.template.php

Zitat von: Geargarious in Mai 11, 2009, 02:14:08 NACHMITTAGS
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
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: Pinball Nation in August 21, 2009, 06:02:39 NACHMITTAGS
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
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: Pinball Nation in August 22, 2009, 07:13:07 NACHMITTAGS
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.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: Banthe in September 19, 2009, 08:15:45 VORMITTAG
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!!!
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: Arantor in September 19, 2009, 08:23:01 VORMITTAG
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>';
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: Banthe in September 19, 2009, 08:27:33 VORMITTAG
Arantor, you are a legend!  :D Thanx so much...worked like a charm!!!!!!!!
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: nycrican2 in September 23, 2009, 12:30:12 NACHMITTAGS
This worked for me and I am using SMF version 1.1.10 and the default template. Thanks for much for the hint.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: sharks in August 12, 2010, 02:57:48 NACHMITTAGS
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?
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in August 13, 2010, 07:54:19 VORMITTAG
Zitat von: sharks in August 12, 2010, 02:57:48 NACHMITTAGS
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
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in August 13, 2010, 07:57:10 VORMITTAG
Zitat von: nycrican2 in September 23, 2009, 12:30:12 NACHMITTAGS
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.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in August 13, 2010, 08:07:29 VORMITTAG
Zitat von: sharks in August 12, 2010, 02:57:48 NACHMITTAGS
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.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: sharks in August 16, 2010, 12:26:16 NACHMITTAGS
Thanks a lot, my S-M-F mods. :D

Another great job, as expected of you.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in August 16, 2010, 01:18:47 NACHMITTAGS
as always sharks your welcome.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: IRFletcher in September 02, 2010, 11:43:53 VORMITTAG
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.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in September 02, 2010, 12:06:26 NACHMITTAGS
Zitat von: IRFletcher in September 02, 2010, 11:43:53 VORMITTAG
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
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: IRFletcher in September 02, 2010, 12:36:35 NACHMITTAGS
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.
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: coucnilhomeswap in September 02, 2010, 01:15:46 NACHMITTAGS
Zitat von: IRFletcher in September 02, 2010, 12:36:35 NACHMITTAGS
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
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: IRFletcher in September 02, 2010, 07:21:21 NACHMITTAGS
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...
Titel: Re: [tip/trick] Logo and Banners in 1.1.x
Beitrag von: JoeMumme in September 03, 2010, 01:57:19 VORMITTAG
Thanks my S-M-F mods.

Excellent mod.