PDA

View Full Version : Forum Home Enhancements - Quick News V2


Adrian.
19 Sep 2006, 11:01
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 (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=127008) if you use it please. :)

Thanks.

Adrian

dougk
19 Sep 2006, 11:15
very nice simple mod.

Will be used

TCB
19 Sep 2006, 11:50
Seems like a great and handy mod. I guess it's shown to all visitors?

Adrian.
19 Sep 2006, 11:54
Seems like a great and handy mod. I guess it's shown to all visitors?

Yep.

Just after i released it, i thought, "Damn, why didn't i make a option for it to be hidden from guests, or only viewable by admins" :(

So, i'm doing that now.

Hopefully will update it tomorrow when i have time. :)

Harley77
19 Sep 2006, 18:25
Exellent addon. Simplicity is key. As a variation on this, how hard would it be to add multiple announcements that are pulled randomly?

My idea is a box exactly like you've created, but with "tips" or whatever you could put in. The title of the box could be "Did you know?" then each time the box is refreshed, it would display tips on forum use, features, etc. There was another mod that did this, but it pulled from a text file that was too cumbersome to add stuff to by multiple people.

bolly.beats
19 Sep 2006, 20:04
thank you nice :D and small

Josh1
20 Sep 2006, 04:14
Sweet, using it.

Gripemaster
20 Sep 2006, 04:32
*INSTALLED* Thanks!

Hornstar
20 Sep 2006, 06:37
maybe an option to use either bb code or html?

phpdevrus
20 Sep 2006, 09:38
wow nice. ;-) have some ideas for this. can be altered to use for network links, ads, ect like right or left column menu on forum index.

rezapci
20 Sep 2006, 11:10
thank you, nice Idea....

Adrian.
20 Sep 2006, 11:58
Updated to Quick News V2.

Add some more features, nothing big, it's still a small mod'. ;)

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

Adrian

rezapci
20 Sep 2006, 12:48
hey adrian,

I don't know why I have two Quick news!

how could I fix this?

Adrian.
20 Sep 2006, 13:02
hey adrian,

I don't know why I have two Quick news!

how could I fix this?

You most likely have set "Show on Forumhome only" and "Show on everypage" enabled. :)

Just set one to no. ;)

Adrian

rezapci
20 Sep 2006, 13:08
You most likely have set "Show on Forumhome only" and "Show on everypage" enabled. :)

Just set one to no. ;)

Adrian

still the seam thing! www.alshiatalk.com/vb take a look!

Adrian.
20 Sep 2006, 13:12
I'm only seeing one.

You will have the option "Show to admins only", enabled?

If you look at the descriptions carefully, it says

Set this to yes to allow only admins to view Quick News. Note: You must set 'Allow guests to view Quick News' to no.

Be careful not to contridict it. :)

Just set the admin option to No, you should be fine. :)

rezapci
20 Sep 2006, 13:29
I'm only seeing one.

You will have the option "Show to admins only", enabled?

If you look at the descriptions carefully, it says



Be careful not to contridict it. :)

Just set the admin option to No, you should be fine. :)

Problem solved...

Thank youuuuu

Nice work ***** 10 STAR *****

rezapci
20 Sep 2006, 13:57
I'm only seeing one.

You will have the option "Show to admins only", enabled?

If you look at the descriptions carefully, it says



Be careful not to contridict it. :)

Just set the admin option to No, you should be fine. :)

look again, its shows two quick news between shoutbox!

one is upper and one is down of the shoutbox!

www.alshiatalk.com/vb

Adrian.
20 Sep 2006, 14:11
Odd, i tried those options on my forum,

It shows one news box if guest, admin or member.

Did you do the template edits correctly.

Eg, Navbar template in Navbar.

Forumhome in FORUMHOME?

rezapci
20 Sep 2006, 14:50
Odd, i tried those options on my forum,

It shows one news box if guest, admin or member.

Did you do the template edits correctly.

Eg, Navbar template in Navbar.

Forumhome in FORUMHOME?

problem solved...

was in FORUMHOME

thank you :)

Gizmo5h1t3
20 Sep 2006, 17:26
updated, and working a treat on 3.5

Adrian.
21 Sep 2006, 10:30
Great.

So it should work on v3.5.x

:D

kushal
22 Sep 2006, 21:59
Great mod. Thank You.

hal05
22 Sep 2006, 22:52
Works great, thank you!

category
23 Sep 2006, 21:05
fixed

Adrian.
24 Sep 2006, 11:14
I can't see why it's doing that, but could you specify a link to your forum please? :)

I tried the one in your profile, i just got a parking page.

Adrian

category
25 Sep 2006, 03:57
ahh i see

bandare
26 Sep 2006, 13:56
Brilliant... installed and working great.. thanks a lot....

www.173rd.org!

Alien
30 Sep 2006, 15:11
This is terrific, I'm going to use this..

I would recommend changing your <br> in your html to <br /> to maintain xhtml compliance.

I would also like to know, to cut down on processing time, if I will never change these two settings:
Allow Guests = Yes
Only Admins Can View = No

What code could I pull out safely that would always assume those 2 settings, thus cutting down on the extra if statements and processing time? That would be killer. :) Thanks!

smsmasters
01 Oct 2006, 12:41
By the way, the code in forumhome should be placed before: $forumbits if you want it to show at the top.

ymy
02 Oct 2006, 03:20
Adrian,:rolleyes:

installed and working great.. thanks a lot....

I Am SURE CLICK INSTALL!

Alien
02 Oct 2006, 03:25
Hey just a follow up.. I just installed this on a fresh site, made both template edits and no matter what when I turn off 'show to guests' it still shows it to them.. Any idea what's going on? Otherwise this works perfectly...

Lysithea
05 Oct 2006, 17:07
Great Mod! I installed this on my site and I am installing this on my other site as well. Very useful!

Snake
06 Oct 2006, 03:17
Wow thanks a lot. Could be much better as a product though. ;)

Alien
12 Oct 2006, 06:17
I noticed that the if tags are a mess on this.. If you try to use the w3c validator it says you have too many ending if tags?

AMG021
12 Oct 2006, 19:15
Why can i use html and bbcode? Please make it compatable..



Thanks in advance!

Ciciotti
14 Oct 2006, 23:54
I'm pretty sure I installed it correctly. I'm new to this and everything, though. So bare with me. I go to the settings and I'm not seeing any quick news on the drop down.

Adrian.
15 Oct 2006, 10:54
I'm pretty sure I installed it correctly. I'm new to this and everything, though. So bare with me. I go to the settings and I'm not seeing any quick news on the drop down.

Hey,

Go to your Admin Panel.
On the left click "vBulletin Options" > "vBulletin Options"

On that page, there will be a big list of options, look towards the bottom for Quick News.

Double click it.

Done. :)

gazzak
16 Oct 2006, 11:07
I installed this MOD on my 3.62 forum to give the users information about new arcade tournaments when they're created. Works great, thanks.

oberheimhaven
16 Oct 2006, 12:09
You most likely have set "Show on Forumhome only" and "Show on everypage" enabled. :)

Just set one to no. ;)

Adrian
U have it installed twice in forumhome template i did the same thing m8!

GraphicPlanet
16 Oct 2006, 12:25
i can keep image in news table?

Adrian.
16 Oct 2006, 12:42
i can keep image in news table?

Do you mean "Can i have a image in the news table?"

If so, yes, it allows HTML.

Just enter
<img src="imgurl/image.jpg" alt="you alt tag">

GraphicPlanet
16 Oct 2006, 19:13
tanx men
This is working in VB 3.6.1?

Adrian.
16 Oct 2006, 20:56
tanx men
This is working in VB 3.6.1?

Yes, it works fine on v 3.6.1. :)

Alien
17 Oct 2006, 04:17
Adrian, any clues on my previously posted questions? Any help at all is sincerely appreciated!

GraphicPlanet
17 Oct 2006, 07:11
i installed and allready is fine
But i have 2 table
See the image in attach

Adrian.
17 Oct 2006, 09:33
Alien, i will look into it.

GraphicPlanet, please read the descriptions in the options panel, and also other posts in this thread.

Adrian

GraphicPlanet
17 Oct 2006, 11:37
tanx
i installed and Now working so nice
tanx for This Plugin
realy nice plugin

GraphicPlanet
17 Oct 2006, 11:40
Just Single Quastion
How can i change the name "Quick Nes" in Up of Table?
tanx

Adrian.
17 Oct 2006, 13:55
Just Single Quastion
How can i change the name "Quick Nes" in Up of Table?
tanx

You template's you edited.

open them up, search for "Quick News", and replace it with what you want. ;)

Adrian

Salvar
17 Oct 2006, 23:45
Installed Thanks!

It would ne nice if you add the option:

Show in forum XXX

Now we only have the option or the mainpage or all the (sub)forums.

Would be nice if we could chooce in which forum you can show the news!

Just my 2 cents

GraphicPlanet
18 Oct 2006, 19:58
tanx its working for me fine
Just Some Stuiped Quastion
Now i have in top Quick News i need to add in other forum ( seprate )
its Possible?

GraphicPlanet
21 Oct 2006, 09:14
Plz Adrian i need help
i need Use this plugin for seprate forum
its possible?

prilep
22 Oct 2006, 14:15
Hello. Where do i upload product-quicknews.xml ?? Thanks

Alien
25 Oct 2006, 04:10
You don't have to upload it.

Import the xml as a product in your product/plug-ins section after you've uploaded all the other files.

GraphicPlanet
14 Nov 2006, 04:08
hi
i dont know what happen with my Quick News
Just the Guest can see the quick news
admin and user can not see
what happen?

Greek76
16 Nov 2006, 02:26
I was looking for something like this and it works great with 3.6.2.

madzat
04 Dec 2006, 18:15
Can You Explain More In This Installation I Found Bottom But I Didn't Understand What Is Very Bottom and Where Put the Code ...
Now open Navigation / Breadcrumb Templates > navbar

navbar ==><tr valign="bottom"> after thes i put the code
Tnx In Advance

Alien
19 Dec 2006, 00:37
Alien, i will look into it.


Hey. :) It's been 2 months so wanted to see if you've made any progress on my inquiry? :)

mrpotatohead
27 Dec 2006, 01:19
Any way of making this viewable to MODERATORS and ADMIN - not just ADMIN? As I'd like to make messages to all Site Staff? How would I go about doing this!?

thanks great mod! :)


- Joe

cooldude714
03 Feb 2007, 08:59
It is broken for me! I have done everything correctly and successfully installed it on previous vBs so what is the matter?

http://img222.imageshack.us/img222/999/quicknewsku4.jpg

Black Widow
07 Feb 2007, 20:05
thanks man.

usefull hack...

Edog
02 Mar 2007, 20:46
what would be the reason why animated gifs wouldnt work in this hack? I mean they show up they just dont animate.

Red Spider
28 Jun 2007, 22:38
Great hack, just wish it was possible to change the "Quick News" title :(

Spika
29 Jun 2007, 15:59
Great hack, just wish it was possible to change the "Quick News" title :(
Yes, in template FORUMHOME and/or navbar find:
<td align="center" class="tcat">Quick News</td>
replace with:
<td align="center" class="tcat">Your Tittle</td>

See this
http://www.vbulletin.org/forum/showpost.php?p=1098843&postcount=50

P.D. Great hack! Works fine in 3.6.7PL1

SAT2M
10 Apr 2008, 20:06
erro in code in navbar

The following error occurred when attempting to evaluate this template:

The conditional on line 347 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish

please correct code

ndut
10 Apr 2008, 20:54
it works!! cool...

masoud_sun
16 Apr 2008, 07:48
The following error occurred when attempting to evaluate this template:

The conditional on line 73 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.


This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish

1230
17 May 2008, 08:02
Please update to 3.7.0 stable.

wpeloquin
26 May 2008, 19:18
why would you want to install this on 3.7?

AdminCP -> Notices -> Add New Notice

it's a function built into 3.7 now, this mod is not needed in any way if you are on 3.7

1230
02 Jun 2008, 23:32
Please Update.

Danial_Faster
09 Jan 2009, 16:26
Please update to 3.8

shervin_dvb
11 Jan 2009, 15:31
i have problem whith want select moderat post on all select and romve cod on navabar sloved this problem