MyBB Community Forums

Full Version: Replace Default Logo with HTML [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I would like to replace the MyBB logo (at top left of forum) with HTML text. The text will be the name of my forum. The text also needs to function as link in same way default logo now does, I.E. link to forum home page. I am using version 1.6.3

I’ve already made one modification to the software and if I’m able to substitute HTML text for the MyBB logo that should be all I need in terms of cosmetics. Thank you for your help.
In your header template, you should find something a little bit like this:

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>

And to show the forum name you would do this:

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php">{$mybb->settings['bbname']}</a></div>

Basically just replace the <img> element with {$mybb->settings['bbname']}, which will output your forum's name.
Thank you for your quick reply. I would have gotten back sooner but was busy creating other bits on my forum. I’ll stick with this as much as possible now.

(2011-07-15, 10:47 AM)faviouz Wrote: [ -> ]In your header template, you should find something a little bit like this:

Your solution works good, all that’s visible in front-end is HTML text. As you specified here is what I have now in header template (shown as PHP to prevent wrap):

<a href="{$mybb->settings['bburl']}/index.php">{$mybb->settings['bbname']}</a></div>

I forgot to ask but, could you please tell me how to change the size and color of the HTML title text in the front-end to, for example H1 and green like this:

Green #009900

Here’s a link to my test forum so you can see what it looks like. Thank you.
Use this instead:

<div class="logo">
	<a href="{$mybb->settings['bburl']}/index.php">
		<h1>{$mybb->settings['bbname']}</h1>
	</a>
</div>

And add this to your global.css:

.logo h1 {
	color: #009900;
	font-size: 25px;
	padding: 0;
	margin: 0;
}

Be sure to change 25px to the size you want.

(2011-07-16, 01:20 PM)faviouz Wrote: [ -> ]Use this instead:

That works perfectly except this part has no effect:

color: #009900;

I'm guessing that's because H1 is a link. Can you please tell me how can the color be fixed?
I'm pretty sure it does have effect. I just looked at your website and it seems to be working fine. The link is in green, just like you asked.
I believe you however it's not working for me now.

For a few minutes there I was fiddiling with code and viweing site but I may have forgotten to do a “Force reload” so you might have seen something I didn’t. The part of code I fiddled with was the part you gave me. In any event here is what I have now and the color doesn’t work:

 .logo {
background: url(images/mastheadGC.gif);
background-repeat:repeat-x;
background-position:right top;
width: 95%;        
margin: auto auto;
padding: 20px;
text-align: left;
height: 105px;
}

.logo h1 {
    color: #009900;
    font-size: 25px;
    padding: 0;
    margin: 0;
} 

Note that part of above is for masthead graphic. I show it here because that is the only other change I made to global css prior to this.

I hope H1 link color problem is not a browser issue. In Windows I use K-Meleon and in Linux I use Seamonkey. I’ve tried both and no joy. Forced a reload in both several times and still no joy.
It is working, just like it should. I hard-refresh the page dozens of times, emptied my cache and even tried three different web browsers. I don't think this is related with the web browsers you're using because they're both based on Firefox, which I tested and it's working just fine.

But try replacing h1 with a (in global.css). How does that work?
(2011-07-16, 02:36 PM)faviouz Wrote: [ -> ]It is working, just like it should. I hard-refresh the page dozens of times, emptied my cache and even tried three different web browsers. I don't think this is related with the web browsers you're using because they're both based on Firefox, which I tested and it's working just fine.

I rebooted one of my PC and it's still not green so I have no clue why we don't see the same thing. That's not good becuse we need to see the same thing in order to fix this problem. It's frustrating to be so close to a solution.

Quote:But try replacing h1 with a (in global.css). How does that work?

I dont understand what you just said. What do you want me to replace h1 with?
Replace h1 with a in global.css.
Pages: 1 2