Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Miker1029 on May 09, 2015, 12:38:58 PM

Title: Adding Second Logo To SMF 2.0.10
Post by: Miker1029 on May 09, 2015, 12:38:58 PM
MODS: If I'm in the wrong spot please Relocate, Thanks.

Hey all,

Ok I'm Using SMF 2.0.10 and I'm Trying to Add a Second Logo Next to My First one And Need to know How...

So Far I Have  in index.php:


#logo a {
display: block;
clear: both;
overflow: hidden;
background: url(../images/theme/logo.png) no-repeat;
float: left;
width: 368px !important;
height: 93px !important;
margin-top: 2px;

}
#logo1 a {
display: block;
clear: both;
overflow: hidden;
background: url(../images/theme/logo1.png) no-repeat;
float: center;
width: 368px !important;
height: 93px !important;
margin-top: 2px;
}


And My Issue is I can't find where to add (I Guess) This in index.templete.php


<div id="logo1">
<a href="'.$scripturl.'" title=""></a>
</div>


My Issues Is My Left Logo Is an Animated .GIF,  And I want to put the Site Name Image to the right (center)..

Any help appreciated.

Mike
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Miker1029 on May 20, 2015, 09:06:00 AM
BUMP?

Alls I need is to know where to look for the Original Logo On the Left (CODE WISE), I'll figure the rest out...

Again Thanks for ANY Help.

Mike
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Kindred on May 20, 2015, 09:13:09 AM
the entire header is defined in index.template.php for each theme
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Miker1029 on May 20, 2015, 09:38:56 AM
Ok, But I'm not that great at Coding, and this one really got me Confused, because it's all variables, and I really get confused on were one thing Links to Another like in this Code Bit, it says "<div id="logo">", So I assume this is the Code bit I need to look at, BUT, div id=logo, ok then were do I put logo2??? I'm still in a learning mode on most code html so-so, php, less, SO Basically If I could just find WERE to Place the Second Logo in the Code I'd Probably just Output it in HTML from the PHP Code... I'll Attach the Entire INDEX.TEMPLATE.PHP if you have time to check it out....

And Actually now that I'm looking at the Preview here, I could probably figure out how to put it in the wrapper, but need to know if this is the right spot.....

Mike


<body>';
}

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="wrapper"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
<div id="header"><div class="frame">
<div id="top_section" style="vertical-align: bottom;">
<div id="logo">
<a href="', $scripturl, '"></a>
</div>';
echo '
<div id="news">';
if (!empty($settings['enable_news']))
echo '
<strong>', $txt['news'], ': </strong> <span>', $context['random_news_line'], '</span>';
echo '
</div>';

echo '
<div id="user">';
if ($context['user']['is_logged'])
{
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'], '</li>';
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Kindred on May 20, 2015, 10:38:55 AM
well, see?   The div id=logo uses a background image definition in the CSS file to display the logo...
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Miker1029 on May 20, 2015, 12:52:30 PM
I do now!, And that's a very valuable piece of Info I didn't know that is how it works, I mean of course I knew it was assigned, Just not where... ok I'll check out the CSS, And see if I can Figure it there..

Thanks

Mike
Title: Re: Adding Second Logo To SMF 2.0.10
Post by: Miker1029 on May 31, 2015, 03:35:00 PM
Update,

Well I cheated by I got it, I can't figure them wrappers to save my life, even inspecting elements on the page... BUT I guess this works.....

Mike