Custom Picture in forum header

Started by dkitchen, May 21, 2009, 01:03:52 AM

Previous topic - Next topic

dkitchen

How do I add my own custom pic or logo in the forum header?

[SiNaN]

Admin > Current Theme > Logo image URL:

Enter the logo image url there, like: http://yoursite.com/images/mybanner.gif
Former SMF Core Developer | My Mods | SimplePortal

dkitchen

How do i center the pic on the forum?

[SiNaN]

./Themes/default/index.template.php

Code (Find) Select
<td class="catbg" height="32">';

Code (Replace) Select
<td class="catbg" height="32" style="text-align: center;">';

Code (Find and Remove) Select
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
Former SMF Core Developer | My Mods | SimplePortal

tfs

Might this one have been broken by RC1-1?  The instructions don't seem to be correct anymore.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

[SiNaN]

That was for SMF 1.1 versions. If you are using SMF 2.0 RC1-1:

Same file.

Code (Find) Select
<div class="catbg">
<img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" />


Code (Replace) Select
<div class="catbg" style="text-align: center;">
Former SMF Core Developer | My Mods | SimplePortal

tfs

Hey thanks!  That put the picture where I wanted it, and centered it.

Do you also know how to make it so that if the banner image is very wide (the one I want to use is 1300x160) to have it gracefully work when the browser window is narrower than the image?  I'd like it to stay centered and to have the left and right edges of the banner just disappear and slip behind the edges of the forum, not stick out of the forum boundary like it does now.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

GPz750

Try this:

<img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" width="100%" />

That should stretch the image across the header regardless of the window size.

alke

Quote from: GPz750 on May 28, 2009, 04:56:31 PM
Try this:

<img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" width="100%" />

That should stretch the image across the header regardless of the window size.

This is obviously for 1.1.x is there a similar code for 2.0 RC1-1
ATHLONEONLINE.COM
        "The Talk Of The Town"

[SiNaN]

This is for SMF 2.0 RC1-1 SMF Default Theme - Core. It might be different though, if you are using a custom theme.

Quote from: [SiNaN] on May 26, 2009, 04:50:28 AM
That was for SMF 1.1 versions. If you are using SMF 2.0 RC1-1:

Same file.

Code (Find) Select
<div class="catbg">
<img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" />


Code (Replace) Select
<div class="catbg" style="text-align: center;">
Former SMF Core Developer | My Mods | SimplePortal

tfs

Can someone update this one for SMF 2.0 RC2?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Still looking for help centering the banner image on SMF 2.0 RC2.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jakob Fel

<center><img src='http://img138.imageshack.us/img138/3848/joquanlogoproto.jpg'</center> is the code I use on my main forum, joquanltdhq.smfforfree.com (use your own image please  ;) )

Go to Admin->Manage Styles->Headers and Footers and enter the code in the section marked "Headers"

Hope that helped!
Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

tfs

I don't seem to have a "Manage Styles" in my admin menu.  Might you have a mod installed that I don't have?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Gurbet_42

#14

* Admin Center »
    * Themes and Layout »
    * Theme Settings »
    * (Choose your theme from the list) »
    * Logo Image URL »
    * Save

Jakob Fel

Quote from: tfs on January 22, 2010, 11:29:59 PM
I don't seem to have a "Manage Styles" in my admin menu.  Might you have a mod installed that I don't have?

No, I have no mods whatsoever on my site. What is your site hoster? (smfforfree, mysmf, etc?) It is under the admin menu.

Configuration->Manage Styles->Headers/Footers

If you cannot figure it out, I will try to get a video of me doing it with my test forum.
Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

tfs

Quote from: Gurbet_1907 on January 24, 2010, 03:05:35 PM

* Admin Center »
    * Themes and Layout »
    * Theme Settings »
    * (Choose your theme from the list) »
    * Logo Image URL »
    * Save

I'm confused as to what your post means.  There's no "Manage Styles" in any of the menus you posted.  ?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Quote from: Joquan Games Studios on January 24, 2010, 03:58:53 PM
Quote from: tfs on January 22, 2010, 11:29:59 PM
I don't seem to have a "Manage Styles" in my admin menu.  Might you have a mod installed that I don't have?

No, I have no mods whatsoever on my site. What is your site hoster? (smfforfree, mysmf, etc?) It is under the admin menu.

Configuration->Manage Styles->Headers/Footers

If you cannot figure it out, I will try to get a video of me doing it with my test forum.

My host is 1and1, but I'm not sure what that could have to do with it.  I'm talking about the admin menu inside of SMF 2.0 RC2.

Perhaps if you could post the URL of the path to the Manage Styles that you're talking about?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jakob Fel

Quote from: tfs on January 24, 2010, 04:46:37 PM
Quote from: Joquan Games Studios on January 24, 2010, 03:58:53 PM
Quote from: tfs on January 22, 2010, 11:29:59 PM
I don't seem to have a "Manage Styles" in my admin menu.  Might you have a mod installed that I don't have?

No, I have no mods whatsoever on my site. What is your site hoster? (smfforfree, mysmf, etc?) It is under the admin menu.

Configuration->Manage Styles->Headers/Footers

If you cannot figure it out, I will try to get a video of me doing it with my test forum.

My host is 1and1, but I'm not sure what that could have to do with it.  I'm talking about the admin menu inside of SMF 2.0 RC2.

Perhaps if you could post the URL of the path to the Manage Styles that you're talking about?

I have SMF 1.1, but I think you are misunderstanding our directions. Follow the exact path of this and it should show up.

Configuration->Manage Styles->Headers/Footers

Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

tfs

We seem to be at an impasse.  I have both 1.1.11 forums and 2.0 forums, and the menu path you give does not exist in either of them.

As I mentioned above, why don't you give us the URL of where you're at?  As an example...

http://www.simplemachines.org/community/index.php?action=post;topic=311936.0;num_replies=18

That is the url to what I'm posting right now.  You could sanitize it to remove the path to your forum if you like, such as this...

http://www.xyz/index.php?action=post;topic=311936.0;num_replies=18

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jerry

That is because Jason is probably using smf4free or other premodified hosts out there, while you probably are not.. So you probably don't have the same menu options as Jason would have :) If you are using a curve type theme with rc2 you could just modify the index.css

/* ..so does the SMF logo */
img#smflogo
{
margin-left: 1em;
}
would be the section you modify.

Replace it with something like:
/* ..so does the SMF logo */
img#smflogo
{
    margin-left: auto;
    margin-right: auto;
}
that should center it.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

tfs

Thanks for the response Jerry.  I think you're right about Jason using his web hosts pre-installed SMF package, and making changes in their proprietary configurator.

Unfortunately, the changes you listed don't seem to do it.  I was able to mess up the image placement by purposely leaving out a bracket, so I know I'm in the right spot, but it doesn't center when the suggested changes are made.

I used to have the ability to do this in v2.0 RC1.  Further up in this very thread SiNaN showed me how to do it by editing ./Themes/default/index.template.php, but that was broken in the RC2 release.  I've been looking for an answer since.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jakob Fel

Do you mean like this?

http://www.joquan/index.php?action=style;sa=admin;sesc=003aec0bbd60d8200c471ecff53428d8
Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

tfs

Quote from: Joquan Games Studios on January 28, 2010, 06:39:46 PM
Do you mean like this?

http://www.joquan/index.php?action=style;sa=admin;sesc=003aec0bbd60d8200c471ecff53428d8

Link is broken.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jakob Fel

Hmm, it may mean that it only works for my forum. I am not sure why Manage Styles doesn't appear on your forum. It should show up, but maybe you have a mod installed that hides it. If you give me a link to your site, I can see what I can do. I do not mean for you to give me admin access, I just mean that I would like to see your site, so I can furthermore help you.


Have a nice day,
Jake
Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

kat

Not sure I understand this...


If you want a banner like I have here: http://www.tlakoc.org.uk


Just add this, after the first body tag in index.template.php.


<img style="margin-top:6px" border="0" src="/Banner.gif" width="800" height="90" alt="whatever" title="whatever" /></a>


Obviously, you'll need to modify bits, to suit, and the image needs to be in the root of your forum's directory.




tfs

Quote from: Joquan Games Studios on January 29, 2010, 12:19:19 PM
It should show up, but maybe you have a mod installed that hides it.

Maybe so.  Thanks anyway.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Jakob Fel

No problem. Sorry I couldn't help more.  :(
Freelance writer and advocate for security, privacy & DRM-free distribution
Support and Community Management at SMFNew Free Forum Hosting

thesorceress

Thanks for all the great info in this topic  :)
I finally was able to find the codes and alter them  ;D

Just one question left, what is the size i can use best as banner/logo size?

kat

Mine's only 800x90 and it seems to work OK.

thesorceress

I would really like to have it the same size as the Banner "field" but i have no idea what size that is. Or how to get the banner looking good in other screenresolutions.

I use SMF 1.1.11


kat

Well, if you look at the code I put, above, and make the image the same size as mine, it ought to look like it does on my site.


http://www.tlakoc.org.uk/

thesorceress

Thanks St. Kat i think i can work something out with that, but i still have a few questions  :)
I'm a complete novice at this so forgive me for asking stupid questions  :-[

Is the first body tag the first line in the body?
Can i change the width and height sizes?
Is there a way to remove the field where my banner is now on top of.

I hope you understand what i mean, English is not my native language.

Thank you for helping  ;D

kat

Pleasure, darlin'!


The first body tag will look like this:


<body>';


You can use whatever size image you like! :) (Might look weird if it's too big/small, though.)


Not sure what you mean by "Is there a way to remove the field where my banner is now on top of."


Worry not. You're English is better than mine! (I'm English!)

thesorceress

LOL  ;D

I understand now where to put the code, thank you for explaining it :)

What i mean by "Is there a way to remove the field where my banner is now on top of." is this,
When you look at the attachment in my post above the banner in the middle has a plain colored part behind it that is a lot wider than the banner. At the moment i've created another banner and put it up but there is still a part of the plain colored part sticking out left and right. It is part of the template imho, i think it would look better if it's removed but i don't know if that's possible and how to do that.

I really appreciate your help  :)

kat

I really have no idea!


Maybe, if you make the image wide enough, it'll fill that.

z3us

I will explain here my problem.
I want my image to fill the gaps that I point at with red arrows in the attached SS, so the image matchs the whole width of my forum (not the dark blue background)
I attach my index.template too, the name of the image is logo1.jpg
Thanks

kat

Why not make it a gif, with a transparent background?


It won't need to fit, then. Unless it's a graphic, rather than text...

Snogmarr

Question If You Do Not Mind

I have put the code as described for RC2 and I am getting a tepmlate error....

Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 261

252:       <script type="text/javascript">
253:       var wot_rating_options = {
254:       selector: ".inner a[href], .post a[href]"
255:       };
256:       </script>
257: <script type="text/javascript"
258: src="http://api.mywot.com/widgets/ratings.js"></script>
259: </head>
260: <body>';
261: <img style="margin-top:6px" border="0" src="/fancyforsite.gif" width="800" height="90" alt="whatever" title="whatever" /></a>
262:       //Show the efloating bar only if the MOD is enabled for Guest and Guests are not on Register or Login Pages
263:      if ($context['user']['is_guest'] && !empty($modSettings['efloatingbar_mode_guest']) && $context['current_action'] != 'login' && $context['current_action'] != 'register')
264:      {   
265:       echo '<div id="topbar">

kat

Ah...


On my v2.x site, I used two lines, thus:


<a href="http://www.tlakoc.co.uk/index.php?action=forum">
<img style="margin-top:6px" border="0" src="/Banner.gif" width="800" height="90" alt="whatever" title="whatever" /></a>




Obviously, the URL will be different, for you. You'll want to change "whatever" to something else, too.

z3us

Quote from: St. Kat on February 27, 2010, 04:58:09 PM
Why not make it a gif, with a transparent background?


It won't need to fit, then. Unless it's a graphic, rather than text...
Its a unfinished graphic, transparency is not possible. Any help would be welcome

Snogmarr


[/quote]
Its a unfinished graphic, transparency is not possible. Any help would be welcome
[/quote]

This may sound stupid but why not finish it then make it transparent?

z3us

Its a photo, not simple words. I cant use transparency, and I want it to fill the whole width of the header

kat

Result!


Heaven knows why the code I put threw up that error, though.


Weird.

tfs

Quote from: xnathansxdadx on February 27, 2010, 07:08:57 PM
I THink My New Banner Is Brill

It's a beautiful banner, but it's 5 1/2 megs!  :)
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Snogmarr


Thanks tfs, that s kind to say!

but that's because of all the animated graphics. if i strip them out its only 130k,, the fireworks graphics alone are 2.5 meg, then theres the hearts and searchlights etc.

thesorceress

Thanks St. Kat for the help i'm so much further than i was. I just keep on trying with my banner till it's right.  ;)


z3zus, i think we have kind of the same problem.
What is the width of the banner you're using on the picture?


thesorceress

Thanks for replying z3us  :) i hope we'll figure this out somehow.
Good luck  :)

TbChampions

Quote from: z3us on February 27, 2010, 12:36:34 PM
I will explain here my problem.
I want my image to fill the gaps that I point at with red arrows in the attached SS, so the image matchs the whole width of my forum (not the dark blue background)
I attach my index.template too, the name of the image is logo1.jpg
Thanks


I have the same issue -- I don't want my forum to extend beyond the width of my banner, and for the life of me, I can't figure out how to take out the padding (I assume) that is making this happen.  I've set my forum to be the width of my banner, and taken out the only padding that seemed possible in my css file, but that only took out some padding from the top. 

I just want a nice, straight, clean forum that extends perfectly down on both sides from my banner image. 

If anyone can help, it'd be most appreciated.  By the way, I'm running 2.0 RC2.

Advertisement: