Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Import Unread News from a Forum Details »
Import Unread News from a Forum
Mod Version: 3.00, by antialiasis (Member) antialiasis is offline
Developer Last Online: Nov 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.4 Rating: (0 vote - 0 average) Installs: 18
Released: 24 Jun 2006 Last Update: Never Downloads: 48
Not Supported Uses Plugins Template Edits  

This is a port of the hack for vBulletin 3.5. Upgrading the hack after upgrading the forum should not be necessary.

This hack will allow you to specify one or more forum IDs in your Admin CP as "news forums". Every time a thread is created in these forums, all users will see an "Unread news" notification at the top of every page of the forum until they view the unread news thread. If many news threads are unread, they will all be shown in the notification and removed one by one as each thread is viewed.

This hack both serves to make sure all users are aware of posted news and to give users who return after a long absence a quick rundown of what has been going on in the forums since they last were there.

As of version 2.0, it is possible to specify:

- Time cutoff: all news older than x days will count as read
- Only check for read status on latest x threads: only the latest x news will be shown if unread; all older news will always be treated as read
- Maximum number of news to display at one time: if a user has more unread news (after the time cutoff and latest x filter) than the number specfied, only that number will actually be displayed on the page
- Whether to make users see news created before they joined as unread
- Whether to show the date and time when each news thread was made or just the date

Please note that you must have Paul_M's Display who has read a thread hack installed for this to function correctly! You don't need to actually have the people who have read the thread shown for anybody at all (heck, if you're completely uninterested in what that hack does, you don't even need to make the template edit for it), but as long as it's installed, this hack will work.

Version 3.0 adds the ability to have more than one news forum and to set a PHP condition for each forum which must be met in order for news from that forum to be imported.

Installation

Simply download the product attached to this post and import it via the Admin CP Product Manager. Then make one template edit: add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to the bottom of the header template.

------------------------------------

If using PHP version 4.x (or if you are getting an error message that looks something like Fatal error: Call to undefined function: array_combine() in /public_html/global.php(359) : eval()'d code on line 139), you additionally need to find this line in the Import News plugin on the hook global_start:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If using PHP 5 or later (which is the case if you don't get that error message), you will not need to make this edit.

------------------------------------

Afterwards, go to your vBulletin options, find the News Import System setting group, specify your news forum(s), set the other settings if you want, and turn the system on.

Don't forget to click Install if it's working for you. Enjoy!

Version 3.0: Added ability to have multiple news forums and use conditionals.
Version 2.23: Important bugfix from version 2.22
Version 2.22: Bugfixes
Version 2.21: Cutting off on the user's join date has been made an optional feature specified in the admin CP, and some unnecessary code has been removed. Also added alternative templates for no particular reason.
Version 2.2: Fixed uncached template, added "More..." link that links to the news forum when unread news are cut off by "Maximum number of news to display at one time" option, and all news created before the user registered will now count as read for that user. (Imagine registering and having twenty "unread news" notifications you have to plough through...)
Version 2.01: Added template edit information (I'm an official idiot for forgetting that) and fixed table prefixes.
Version 2.0: Added functionality (see above)

----------------------------

EXTRA: Alternative templates

If you don't like the way the current unread news box looks, I've got some more standard-looking templates you can use instead if you want. This also allows you to collapse the unread news, which might be useful. Just replace the templates, see how it looks, and revert the templates again if you liked the other look better.

Alternative custom_unreadnews template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Alternative custom_newsbit template:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	screen1.gif
Views:	710
Size:	39.2 KB
ID:	49900  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Import Unread News from a Forum antialiasis vBulletin 3.5 Add-ons 64 12 Aug 2009 00:10

Comments
  #2  
Old 24 Jun 2006, 02:02
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Real name: Barakat
looks great ... will be tested soon on my board
Reply With Quote
  #3  
Old 24 Jun 2006, 07:12
Staxed's Avatar
Staxed Staxed is offline
 
Join Date: Jun 2006
Location: Fayetteville, NC
Real name: Daniel
Question:

Will this display the message for all unread threads in a forum? (i.e...when a new member registers...this would force him to read all the rules...)
Reply With Quote
  #4  
Old 24 Jun 2006, 10:32
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Yes, if you set it like that in the Admin CP - in fact I think the default settings will do that. If that is not happening by default, just make sure that "Cut off all news created before user's join date?" is set to no and that both the "Time cutoff for news" and "Only check latest X topics" fields are set to 0. Then all unread news since the beginning will be shown for all users.

Unless I misunderstood what you were asking about.
__________________
Featured hacks:
3.6:
NoSpam! - get rid of those spambots for good!
Import News from a Forum - have unread announcements appear at the top of every page of your forum to get members to read them!
3.5:
NoSpam! - the 3.5 version
Personal Notepad - allow your members to store private notes in their User CP
Reply With Quote
  #5  
Old 24 Jun 2006, 14:21
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Real name: Josh
Wow I've been waiting for this...
Reply With Quote
  #6  
Old 04 Aug 2006, 21:24
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
shit hot idea mate... but i get this error

Invalid SQL:

SELECT threadid
FROM +++++ad
WHERE userid = 1 AND threadid IN (155929,155814,155188,155185,151089,150188);

MySQL Error : Table 'xxxxx.+++++ad' doesn't exist
Error Number : 1146
Date : Friday, August 4th 2006 @ 10:26:58 PM
Script : xxxx
Referrer : xxxxx
IP Address : xxxx
Username : MentaL
Classname : xxxx
__________________
RaGEZONE

Last edited by MentaL; 04 Aug 2006 at 21:30.
Reply With Quote
  #7  
Old 05 Aug 2006, 08:46
Mr. Brian's Avatar
Mr. Brian Mr. Brian is offline
 
Join Date: Jan 2003
Real name: Brian
Don't seem to be working though. :speechless:

Hmm.. Nothing shown up on the forumhome page :/
__________________
~ Brian
My Blog: www.MrBrian.me
Ultimate Soccer Forum www.WeTalkSoccer.com
URL Shortener service with custom link keywords: www.GoLink.US

Last edited by Mr. Brian; 05 Aug 2006 at 09:11.
Reply With Quote
  #8  
Old 05 Aug 2006, 15:24
Mr. Brian's Avatar
Mr. Brian Mr. Brian is offline
 
Join Date: Jan 2003
Real name: Brian
Nevermind, ignore my post. That isn't an issue anymore.
__________________
~ Brian
My Blog: www.MrBrian.me
Ultimate Soccer Forum www.WeTalkSoccer.com
URL Shortener service with custom link keywords: www.GoLink.US
Reply With Quote
  #9  
Old 07 Aug 2006, 15:30
BiReL41r BiReL41r is offline
 
Join Date: Nov 2005
Originally Posted by mentalrz
shit hot idea mate... but i get this error

Invalid SQL:

SELECT threadid
FROM +++++ad
WHERE userid = 1 AND threadid IN (155929,155814,155188,155185,151089,150188);

MySQL Error : Table 'xxxxx.+++++ad' doesn't exist
Error Number : 1146
Date : Friday, August 4th 2006 @ 10:26:58 PM
Script : xxxx
Referrer : xxxxx
IP Address : xxxx
Username : MentaL
Classname : xxxx
I hate the same problem.
Reply With Quote
  #10  
Old 12 Aug 2006, 19:00
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Hi!

I have a few questions:

1. At what forums are that screenshot made? Cause I like the background (you can PB me if you want).
2. Example:
My news forum gets about 5-10 posts every day. Of course when a member isn't at my forums for three days, I don't want to show them 30 posts. So I make a limit of 5 posts.
My question is: when they have read those 5 posts (after 3 days of absense), will the other 25 posts show (per 5) again and again untill they have read them all?
3. How does it work for guests?
4. Is the default vBfunction "mark posts as read" affecting this hack? Cause you stay I need Paul's hack (I already have that one installed).

Thx!
__________________
http://www.nucia.nl/forum/
The best way to kill malware; is to kill it together.
I love vBulletin http://www.vbulletin.org/forum/images/newsm/bunny.gif
Reply With Quote
  #11  
Old 14 Aug 2006, 22:50
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
mentalrz and BiReL41r, I highly suspect you don't have Paul_M's "Display who has read a thread" hack (linked to in the first post) installed - it's required for this to work. (I know I should have entered it as a product dependency, but there was a problem with that option in the Admin CP in beta 3 and I haven't gotten around to fixing it in the product yet.)

Eagle Creek:

1. It's on my forums, but admittedly I modified the quick style switcher to modify the style that's set in the database instead of a cookie, so it doesn't work for guests, and that's not the default style, so you can't really see it there. =/
2. It depends on what setting you change to five. What you want to set is "Only check latest X topics", not "Maximum unread news displayed at one time".
3. For guests, nothing is displayed at all.
4. Not that I'm aware of, no, unless Paul worked it into his hack.
__________________
Featured hacks:
3.6:
NoSpam! - get rid of those spambots for good!
Import News from a Forum - have unread announcements appear at the top of every page of your forum to get members to read them!
3.5:
NoSpam! - the 3.5 version
Personal Notepad - allow your members to store private notes in their User CP
Reply With Quote
  #12  
Old 14 Aug 2006, 23:27
BiReL41r BiReL41r is offline
 
Join Date: Nov 2005
Nope, I already have it installed.
Reply With Quote
  #13  
Old 14 Aug 2006, 23:43
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Well, that is odd, because the error clearly states that the table "+++++ad" does not exist, and Paul_M's hack definitely does create that table...
__________________
Featured hacks:
3.6:
NoSpam! - get rid of those spambots for good!
Import News from a Forum - have unread announcements appear at the top of every page of your forum to get members to read them!
3.5:
NoSpam! - the 3.5 version
Personal Notepad - allow your members to store private notes in their User CP
Reply With Quote
  #14  
Old 15 Aug 2006, 02:14
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Thanks for the anwsers! Very clear to me!
__________________
http://www.nucia.nl/forum/
The best way to kill malware; is to kill it together.
I love vBulletin http://www.vbulletin.org/forum/images/newsm/bunny.gif
Reply With Quote
  #15  
Old 07 Sep 2006, 19:49
JompaMP JompaMP is offline
 
Join Date: Jul 2006
hey i installed it but when i write a message in the news board that i choosed i get this databas error:

Database error in vBulletin 3.6.0:

Invalid SQL:

SELECT threadid
FROM forum_+++++ad
WHERE userid = 1 AND threadid IN (5);

MySQL Error : Table 'JompaMP_Forum.forum_+++++ad' doesn't exist
Error Number : 1146
Date : Thursday, September 7th 2006 @ 09:46:15 PM
Script : http://drazonia.com/index.php
Referrer : http://drazonia.com/showthread.php?p=6
IP Address : 85.225.248.162
Username : JompaMP
Classname : vb_database
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:41.

Layout Options | Width: Wide Color: