News:

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

Main Menu

[tip/trick] Logo and Banners in 1.1.x

Started by coucnilhomeswap, February 14, 2009, 08:54:03 AM

Previous topic - Next topic

coucnilhomeswap

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


coucnilhomeswap

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


Kermit


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

Rather use <div style="text-align: center;"> {stuff} </div> instead.
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

coucnilhomeswap

ok thanks duncan85. The center tag does seem to work ok on my site though

coucnilhomeswap

read the first post again Duncan85 and see if thats ok

Kermit

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  :)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

coucnilhomeswap

thanks for your help Duncan85 as always greatly appreciated

Marcus Forsberg


dollarbabe

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

coucnilhomeswap


MissyNL

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 :)
Sorry for my poor English, but i think it's probably better then your Dutch :)

TDNY

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

coucnilhomeswap

centering the logo is easy. no need to worry. the other stuff is probably a css issue i think

TDNY

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

coucnilhomeswap

yes i replaced my code with the code duncan gave me and its working fine.

TDNY

#17
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

coucnilhomeswap

it will not work with the site name you need a custom banner for it to take effect

TDNY

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

Advertisement: