Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: tennis4you on December 27, 2010, 04:31:55 PM

Title: Center Logo
Post by: tennis4you on December 27, 2010, 04:31:55 PM
I would like to center the logo at the top of the forum.  What file do I need to edit.  I thought it might be on the index.php but I was wrong  :)

Thanks!
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 04:36:17 PM
index.template.php
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 04:39:55 PM
Interesting.  I searched for "logo-smf.gif" and did not find it.  I guess it is not as simple as I had hoped.  Can you tell me what code to edit to make it centered?  Sorry and thanks!
Title: Re: Center Logo
Post by: cicka on December 27, 2010, 04:44:45 PM
Can you please upload that file here?
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 04:48:03 PM
Here it is.  I grabbed this from the "Themes" - "Default" folder.  I assume that was correct...
Title: Re: Center Logo
Post by: cicka on December 27, 2010, 05:01:39 PM
Quote from: tennis4you on December 27, 2010, 04:48:03 PM
Here it is.  I grabbed this from the "Themes" - "Default" folder.  I assume that was correct...

If you are using the default skin then it is ok. Otherwise you must upload here the index.template.php file of the skin that you are using. Now do you want to center the logo that you have entered fom the admin panel or the smf logo? If it is for the first then please see my other post at this thread.

http://www.simplemachines.org/community/index.php?topic=414681.msg2891662#msg2891662

If it is for the second then find this code at the index.css file

.floatright
{
float: right;
}


and change it to this other code

.floatright
{
text-align: center;
}
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:08:57 PM
Well that did a few weird things.  One it pushed the logo to the top color and made a lot of space between the logo the menu below.  Any way to reduce that space?

Also, I had installed a mod earlier that centered the menu below the logo.  That menu is now left justified again. 

It also pushed the white arrow that collapses the top down.

Any thoughts?

Here is the forum:  tennis4you.com/forum

Thanks!
Title: Re: Center Logo
Post by: cicka on December 27, 2010, 05:14:03 PM
Quote from: tennis4you on December 27, 2010, 05:08:57 PM
Well that did a few weird things.  One it pushed the logo to the top color and made a lot of space between the logo the menu below.  Any way to reduce that space?

Also, I had installed a mod earlier that centered the menu below the logo.  That menu is now left justified again. 

It also pushed the white arrow that collapses the top down.

Any thoughts?

Here is the forum:  tennis4you.com/forum

Thanks!

I think the problem might be at the logo image that is bigger than the smf logo. Some extra edits are required but unfortunately I do not have much free time now to look into that.

The other mod, can you check the code and see if it conflicts with the edits I posted above?
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:15:24 PM
Yikes, not sure how to do that.  :)
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 05:18:36 PM
That logo would look far better if it had a transparent background like this  http://www.uk-exhibitionist.net/index.php
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:24:16 PM
Yeah, the guy who made the logo is going to send me one with a transparent background.  I am just waiting for that and trying to figure out the centering for the time being.  :)
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:25:10 PM
How did you get your logo into the lower color?  Mine seems to straddle the color and messed with other stuff on the forum.  Yours is perfect.
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 05:32:11 PM
Here's the section of code from the index.template.php file on the test site I linked you to, that placed that code there.

You would obviously need to tailor it with your own details.

// the upshrink image, right-floated
echo '

<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
echo '
', !empty($settings['site_slogan']) ? '<div id="siteslogan" class="align_right">' . $settings['site_slogan'] . '</div>' : '', '
</div>
<div class="centertext">
        <a href="http://amateurflashers.co.uk/">
        <center><img style="margin-bottom:12px" border="0" src="http://uk-exhibitionist.net/Themes/default/images/banner.jpg" width="68%"  alt="uk-exhibitionist.net" title="uk-exhibitionist.net" /></a></center>
        </div>
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="user">'; 
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:33:50 PM
Hmmm, tailoring code is not my strong suit.  Would I just need to tailor the image size?
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 05:41:13 PM
It may look OK if you play with the width="68%" setting, that will change the size of the logo.
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:43:06 PM
LOL, I am in for some problems but I will toy with it.  I never mess with code other than copy paste.  :)
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 05:52:12 PM
That is actually some extra code that was added to place the logo image there.

It is not the original logo location, that has been removed.
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 05:56:15 PM
When you say place it "there", where is "there"?  The center or somewhere else?  I assume I have to find some code that is similar to what you attached and replace it and then modify?
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 06:12:17 PM
Give me a little while to play about with your file !
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 06:16:22 PM
Much appreciated.  :)
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 06:51:21 PM
Try the attached file.

You will need to place your logo image at the location in the file, ie

www.tennis4you/forum/Themes/default/images/banner.jpg

Give it the new name


Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 07:11:39 PM
OK, that put the logo in the right spot but removed the "collapsible" arrow on the right?  And how do I blitz the text that says "Tennis4you Forum" on the left?

So close, thank you!!!
Title: Re: Center Logo
Post by: Paul_Pauline on December 27, 2010, 07:19:04 PM
Admin > Server Settings > Forum Title > Leave The Field Blank & Save > That should remove the title.

Try this new file
Title: Re: Center Logo
Post by: tennis4you on December 27, 2010, 10:15:17 PM
Awesome.  Almost there!  So  2 questions left:

1.  Any way possible to make the light blue bar at the top not quite as tall?

2.  If I remove the Text that says "Tennis4you Forums" at the top left (The one I set under Server Settings - Forum Title) it leaves the name of the forum blank in the browser tab.  Probably leaves it blank for bookmarking too?  Any way to keep that title there for the browser but remove it from the forum?

Thanks!!!