vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Newsbar/Announcements (https://vborg.vbsupport.ru/showthread.php?t=300609)

Fatal Hazard 07-29-2013 10:00 PM

Newsbar/Announcements
 
1 Attachment(s)
What is it?

This is a simply yet very effective newsbar that you can display at the top of your forum. You can display 1 or as many as you like and change the colour and border of each one.


How to Install?


1. Go to AdminCP --> Styles & Templates --> Your Style --> Edit Templates --> Forum Home Templates --> FORUMHOME
2. Find:
Code:

{vb:raw headinclude}
    <title>{vb:raw vboptions.bbtitle}</title>
    <script type="text/javascript" src="clientscript/vbulletin_read_marker.js?v={vb:raw vboptions.simpleversion}"></script>

and below place:
Code:

<styletype="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>

Additionally you can instead add this code to the end of your additional CSS by going to your AdminCP --> Templates & Styles --> YOUR STYLE --> Edit Templates --> Additional CSS. If you decide to do this please make sure you remove the <style> tags so the code would look:
Code:

.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;}
If you put the CSS in the FORUMHOME you do not put it in the additional.css. The same goes for if you put the CSS in the additional.css you do not put it in the FORUMHOME.
3. Find (in FORUMHOME):
Code:

<p id="welcomemessage" class="description">{vb:rawphrase welcome_to_the_x, {vb:raw vboptions.bbtitle}}</p>
    </div>

and below place:
Code:

<p class="newsbar"><strong>Latest News:</strong> <a href="http://yoursitehere.com/THREADURL" target="_blank">Your Important Announcement Here</a></p>
4. Save and enjoy




If you want to have multiple just repeat step 3 by placing the same code below. If you want to have multiple that are different colours then you'll need to duplicate the CSS with different class names (say .newsbar_red) and change the CSS colours accordingly.

https://vborg.vbsupport.ru/external/2013/07/7.png

If you use this please mark as installed :)
Support (if any) will be prioritized to those who have this modification marked as installed.
Thanks and Enjoy :)

dandanch 07-30-2013 08:08 PM

Thanks, I added the style to my additional.css and not forumhome :)

Fatal Hazard 07-30-2013 08:57 PM

Okay, it should work either way, for this tutorial I put it in the FORUMHOME :)

joeychgo 07-30-2013 10:23 PM

Quote:

Originally Posted by dandanch (Post 2436168)
Thanks, I added the style to my additional.css and not forumhome :)


Could you explain how please

dandanch 07-30-2013 11:14 PM

Quote:

Originally Posted by Fatal Hazard (Post 2436178)
Okay, it should work either way, for this tutorial I put it in the FORUMHOME :)

The only reason I put it in additional.css is when I tried forumhome for what ever reason it wouldn't work for me.

Just add the style code to the bottom of additional.css with out the tags:
Code:

.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;}

joeychgo 07-31-2013 02:37 AM

oh, I misread the instructions - my mistake.

Fatal Hazard 07-31-2013 09:12 AM

Quote:

Originally Posted by dandanch (Post 2436199)
The only reason I put it in additional.css is when I tried forumhome for what ever reason it wouldn't work for me.

Just add the style code to the bottom of additional.css with out the tags:
Code:

.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;}

I'm glad you managed to get it working and I am going to add this to the tutorial so if others get the same issue (custom style) then they can hopefully resolve it.


Thanks.

Fatal Hazard 07-31-2013 09:13 AM

Quote:

Originally Posted by joeychgo (Post 2436211)
oh, I misread the instructions - my mistake.

No problem, if you have successfully installed it don't forget to mark as installed :)

Fatal Hazard 07-31-2013 09:15 AM

Quote:

Originally Posted by joeychgo (Post 2436188)
Could you explain how please

I've added the additional CSS option to the tutorial.

stevieb 07-31-2013 10:33 AM

all over the shop in vB4.2.0 lol

* uninstalled


All times are GMT. The time now is 12:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01312 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete