Adrian.
09-18-2006, 10:00 PM
Quick News v2
By Adrian at Development Chat (developmentchat.com)
Tested on v3.6.1, should work on 3.6.0 and 3.5.x
Hey,
This is a very simple mod', it allows you to add news/important notes or announcements, on the homepage of your forum.
You can enable/disable or add news via the admin panel.
The "Quick News" box, matches your forum theme. Just so it doesn't look out of place. ;)
New in Version two.
Abilty to hide Quick News from guests
Abilty to show Quick News to admins only
Abilty to choose to show Quick News on everypage, or just forum home
Installation
Import the product-quicknews.xml
Go to vBulletion Options > Quick News (Read option descriptions before configuring)
Template Edit:
Open Forum Home Templates > FORUMHOME
Find:
<!-- main -->
After Add:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_forumhome'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Now open Navigation / Breadcrumb Templates > navbar
Add at the very bottom:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_everypage'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Done. :)
Upgrading:
If you are upfrading from Quick News v1 to v2.
Do the following.
Import the new product-quicknews.xml (Overwriting old version)
Then, open up:
Forum Home Template > FORUMHOME (if you installed it in FORUMHOME)
Find:
<if condition="$vboptions['qnews_enabled'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
And replace it with:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_forumhome'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
If you added the code into Navigation / Breadcrumb Templates > navbar, do the following
Find:
<if condition="$vboptions['qnews_enabled'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
Replace it with:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_everypage'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Done.
Very easy to install mod', and quite useful. :)
Click install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=127008) if you use it please. :)
Thanks.
Adrian
By Adrian at Development Chat (developmentchat.com)
Tested on v3.6.1, should work on 3.6.0 and 3.5.x
Hey,
This is a very simple mod', it allows you to add news/important notes or announcements, on the homepage of your forum.
You can enable/disable or add news via the admin panel.
The "Quick News" box, matches your forum theme. Just so it doesn't look out of place. ;)
New in Version two.
Abilty to hide Quick News from guests
Abilty to show Quick News to admins only
Abilty to choose to show Quick News on everypage, or just forum home
Installation
Import the product-quicknews.xml
Go to vBulletion Options > Quick News (Read option descriptions before configuring)
Template Edit:
Open Forum Home Templates > FORUMHOME
Find:
<!-- main -->
After Add:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_forumhome'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Now open Navigation / Breadcrumb Templates > navbar
Add at the very bottom:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_everypage'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Done. :)
Upgrading:
If you are upfrading from Quick News v1 to v2.
Do the following.
Import the new product-quicknews.xml (Overwriting old version)
Then, open up:
Forum Home Template > FORUMHOME (if you installed it in FORUMHOME)
Find:
<if condition="$vboptions['qnews_enabled'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
And replace it with:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_forumhome'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
If you added the code into Navigation / Breadcrumb Templates > navbar, do the following
Find:
<if condition="$vboptions['qnews_enabled'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
Replace it with:
<if condition="$vboptions['qnews_enabled'] == 1">
<if condition="$vboptions['qnews_everypage'] == 1">
<if condition="$vboptions['qnews_guests'] == 1">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
<else />
<if condition="$show['guest']">
<!-- No message for guests -->
</if>
</if>
<if condition="$vboptions['qnews_admin'] == 1">
<if condition="$bbuserinfo[usergroupid] == 6">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
<else />
<if condition="$vboptions['qnews_guests'] == 1">
<if condition="$bbuserinfo[usergroupid] == 1">
<!-- No message for guests, if admin view only is set to no, and guest view is also set to no -->
</if>
<else />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"
align="center">
<tr>
<td align="center" class="tcat">Quick News</td>
</tr>
<tr>
<td class="alt1">$vboptions[qnews_news]</td>
</tr>
</table>
<br>
</if>
</if>
</if>
</if>
</if>
</if>
Done.
Very easy to install mod', and quite useful. :)
Click install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=127008) if you use it please. :)
Thanks.
Adrian