Help:Latest News Bar


The MyBB Community Forums has a bar at the top of the index page. This is a simple template modification as follows:

Index only

For the bar only on the index page, follow this procedure:

  1. Go to Admin CP --> Templates & Style --> Templates --> *expand your template set* --> Index Page Templates --> index.
  2. Find:
    {$headerinclude}
  3. Add after:
    <style type="text/css">
    .newsbar {
    	background: #D6ECA6;
    	border-top: 2px solid #8DC93E;
    	border-bottom: 2px solid #8DC93E;
    	text-align: center;
    	margin: 10px auto;
    	padding: 5px 20px;
    	font-weight: bold;
    }
    </style>
    
  4. Change the colors above to the colors of your choice if you wish.
  5. Find:
    {$header}
  6. Add after:
    <p class="newsbar">Your Important Announcement Here</p>
For multiple news bars, repeat step 6. For multiple news bars in different colours, you'll need to duplicate the CSS with a different class name (say .newsbar_red) and change the CSS colours accordingly. Then you will need to use
<p class="newsbar_red">...</p>
for example in your code.

Global

For the bar to show up on all pages, follow this procedure:

  1. Go to Admin CP --> Templates & Style --> Templates --> *expand your template set* --> Ungrouped Templates --> headerinclude.
  2. At the end of the template, add:
    <style type="text/css">
    .newsbar {
    	background: #D6ECA6;
    	border-top: 2px solid #8DC93E;
    	border-bottom: 2px solid #8DC93E;
    	text-align: center;
    	margin: 10px auto;
    	padding: 5px 20px;
    	font-weight: bold;
    }
    </style>
    
  3. Change the colors above to the colors of your choice if you wish.
  4. Go to Admin CP --> Templates & Style --> Templates --> *expand your template set* --> Header Templates --> header.
  5. At the end of the template, add:
    <p class="newsbar">Your Important Announcement Here</p>
For multiple news bars, repeat step 6. For multiple news bars in different colours, you'll need to duplicate the CSS with a different class name (say .newsbar_red) and change the CSS colours accordingly. Then you will need to use
<p class="newsbar_red">...</p>
for example in your code.
This page was last modified on 27 September 2010, at 15:26.