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
Wicked, thanks :)
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
Oh, I see.
Don't use <center> as that tag is deprecated.
Rather use <div style="text-align: center;"> {stuff} </div> instead.
ok thanks duncan85. The center tag does seem to work ok on my site though
read the first post again Duncan85 and see if thats ok
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 :)
thanks for your help Duncan85 as always greatly appreciated
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.
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..
your very welcome dollarbabe.
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 :)
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
centering the logo is easy. no need to worry. the other stuff is probably a css issue i think
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
yes i replaced my code with the code duncan gave me and its working fine.
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
it will not work with the site name you need a custom banner for it to take effect
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
leave it the way it is. whats the name of your site and i will knock some up for you. only do 6 designs
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
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)
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
hehe is it ok for you
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?
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
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
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.
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.
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
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
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?
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
tried it on my site and it worked great thanks Duncan ,,,I'm looking for more tricks from you
it wasnt duncan that did this post. duncan only cleaned the code up so people didnt get errors
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 ,,,,
Worked Great! Thank You
Thanks for the great tip, found it by accident in Hints and Tips. Have been looking for this for ages.
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.
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
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
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
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.
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!!!
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>';
Arantor, you are a legend! :D Thanx so much...worked like a charm!!!!!!!!
This worked for me and I am using SMF version 1.1.10 and the default template. Thanks for much for the hint.
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?
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
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.
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.
Thanks a lot, my S-M-F mods. :D
Another great job, as expected of you.
as always sharks your welcome.
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.
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
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.
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
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...
Thanks my S-M-F mods.
Excellent mod.