MyBB Community Forums

Full Version: How to add a Notice or a Message at the top of the forums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Introduction:
Have you ever wanted to add something like this to your website? 
[Image: mukJzQM.png]
Well now you can! The easy way. Images are provided.

Steps:
Go to your website>ACP>Templates and Style> Templates>Your Theme>Options--expand templates>

1. [Image: 9MMEuS7.png]

2. [Image: kUGyftr.png]


3. [Image: eGWLqzM.png]


4. [Image: JWpTNIb.png]



5.

 [Image: Vt0v5CN.png]


After you clicked on Index, find this code.
<div class="forum" style="float: left; width: 76%;">{$forums}</div>
{$boardstats}
<br class="clear" />
{$footer}
</body>
</html>

This will be at the very bottom.

Add this code above that code:

<div style="background: #fff6bf;border: 1px solid #ffd324;border-radius: 5px;padding: 8px 12px;margin: 10px auto 0;text-align:center;font-weight: bold;">First bar text goes here!</div>
<div style="background: #D6ECA6;border: 1px solid #8DC93E;border-radius: 5px;padding: 8px 12px;margin: 10px auto 0;text-align:center;font-weight: bold;">Second bar text goes here!</div>
<br /> 

If you end up with a completely different result. Then tell me.


***Fixed thanks to SvePu
Your way will produce a validation error while user has a new PM, it's because of doubled ID.

If you want have info bars like here, you can do it like this:
<div style="background: #fff6bf;border: 1px solid #ffd324;border-radius: 5px;padding: 8px 12px;margin: 10px auto 0;text-align:center;font-weight: bold;">First bar text goes here!</div>
<div style="background: #D6ECA6;border: 1px solid #8DC93E;border-radius: 5px;padding: 8px 12px;margin: 10px auto 0;text-align:center;font-weight: bold;">Second bar text goes here!</div>
<br />

[Image: wd0qGd]
Thank you for correcting my mistake, should I add that code and replace the old?
but i do not like to have inline css... i prefer this way: http://community.mybb.com/thread-163110.html
Is there a way to add a close button for it if a certain person doesn't want to see it?