MyBB Community Forums

Full Version: Menu Bar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,
I would like some assistance on how to add this to my Mybb 1.6. I need to know how to add this code <a href="{$mybb->settings['bburl']}/misc.php?action=rules" class="rules">Rules</a> to my menu bar. I need to have the rule keys next to my rule link. Can you guys tell me where to add

.upper_panel a.rules {
background: url(images/toplinks/rules.gif) no-repeat;
}

When i installed Forum Rules I added the rules.gif image to the Images >Toplinks folder in my server. I hope you guys understand what I'm wanting to do. Thanks
<a href="{$mybb->settings['bburl']}/misc.php?action=rules" class="rules">Rules</a>

goes in the header template ACP >> Templates & Style >> Templates >> {your template set} >> Default Templates >> Header Templates >> header

.upper_panel a.rules {
background: url(images/toplinks/rules.gif) no-repeat;
}

goes in global.css for the theme you are using ACP >> Templates & Style >> Themes >> {your theme} >> Global.CSS

be sure the images you want to toplinks are in the theme's toplinks folder (or the toplinks folder of the images folder you specify for the theme)

at least this is what I think you are asking for
Hey man 1 question where do I put this in the Global.css?
.upper_panel a.rules {
background: url(images/toplinks/rules.gif) no-repeat;
}
I know the Advanced mode but where?

Thanks for the help man yes thats what I was wanting.
you can put it anywhere, but you should put near the existing upper_panel items for easy tracking
The codes not working correctly. I need a new code because of 1.6.
Bumparoo.

I'm guessing this is the wrong code.
<li class="rules_link"><a href="{$mybb->settings['bburl']}/misc.php?action=rules"><img src="{$theme['imgdir']}/toplinks/rules.gif" border="0" alt="" />Rules</a></li>

If someone could fix that, that would be great!
first, your not telling us what is wrong with the code, just that it "doesn't work". second, the link used was the link you provided in the op, so the link itself should be perfectly fine. third, if you put in the code for the image there, in line with the link, why do you want to put the rule key in the background of the section as well? why did you do that in the first place if all you wanted was an image of a key near some text?

you asked for help, someone provided what looks to be perfectly working code and then you modified that and now it doesnt work? post a link to the forums it's located on so we can look and see what you mean rather then having to describe it. but looking at the html you posted as well, it looks perfectly fine. the link should appear, but maybe in the css theres something set against rules_link. dont know without seeing the site and/or codes
Use this in the header template:
<a href="{$mybb->settings['bburl']}/misc.php?action=rules" class="rules">Rules</a>

And this is global.css
.upper_panel a.rules {
background: url(images/toplinks/rules.gif) no-repeat;
}

That's looking in the ./images/toplinks folder for the image, not your themes toplinks folder. If you want to store the image in the themes folder you'll need the change the url.
I also have same problem in my bb Theme.....I also try it lot but no result ?????
Well it's theme dependant, your theme probably doesn't use the same CSS classes.

Provide a link to your forum and we can give the correct code.
Pages: 1 2