Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forum News (News in a Forum) Details »»
Forum News (News in a Forum)
Version: 1.00, by JJR512 JJR512 is offline
Developer Last Online: Jun 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-13-2002 Last Update: Never Installs: 85
 
No support by the author.

This hack adds news headlines to the top of a forum. The headlines come from an XML source. The headlines are links to the articles. Through the admin cp, add or modify forums system, you can select from a list of sources (or select no news for that forum). There is also a master on/off switch for the entire feature, and you can also select how many headlines will appear.

Support for this hack will be provided only within the vbulletin.org forums.

This hack involves database modifications. Please make a backup copy of your database prior to installing this hack. The author of this hack assumes no responsibility for anything.

The XML feeds come from Moreover.com. This service is provided free-of-charge only to non-commercial, non-profit, educational, or personal/hobby sites, and may not be used on any for-profit site. If you operate a for-profit site, you must contact Moreover.com to discuss purchasing the rights to the service.







Changelog
v1.0: Original release
v1.1: Fixes problem of not being able to change a forum's newsfeed back to NONE after previously selecting one.
v1.1a: Error in instructions file corrected. If you have 1.1, you do not need to download this; absolutely no code has changed.
v1.1b: See Post #30 below. If you have v1.1a, you do not need to download again; just make the fix as instructed in Post #30.
v1.2: Changes the code added to forumdisplay.php so that only one query is used. If you have v1.1b, you only need to replace the code added to forumdisplay.php with the newer bit of code from the instructions.
v1.2a: Fixes a minor bug affecting only the appearance of the output. If you already have installed v1.2, you do not need to re-download and re-install; please see Post #34 below for the simple fix.
v1.2b: Current release. Corrects the URL shown in the registration required notice. The only change over v1.2a is the "forumnewsbit_accessreg" template.

OPTIONAL Add-in feature: Make this feature user-selectable
I have created some instructions you can use if you'd like to give your users the ability to not see the news in a forum. Read Post #44 below for more info.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 07-15-2002, 04:43 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

question....in my vb options, the settinggroup, whosonline is 31, and then there are 2 new ones. Quiz is 32, and signature settings is 302. What number should I use when i change the "insert into" queries?
Reply With Quote
  #23  
Old 07-15-2002, 04:56 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can really use any number that's not already in use. You could make it be 33 to appear in between quiz and signature settings, or you could make it be 303 to appear last.
Reply With Quote
  #24  
Old 07-15-2002, 05:02 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two more quick questions before i install. have you had a any problems with moreover.com slowing your forums down, and are there additional queries that are added by using this hack?

Thanks.
Reply With Quote
  #25  
Old 07-15-2002, 05:51 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe it adds one query to every forumdisplay page to check if that forum has a newsfeed, and if there is, there is another query to get the details.

I haven't had any problems from moreover.com. They seem like a pretty good, reliable source. Although I suppose I should probably add some error handling in case it can't connect to their server.
Reply With Quote
  #26  
Old 07-15-2002, 06:03 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(Post edited because of changes to the code.)

This hack uses only one new query when showing a forum, and that query is ONLY used if that forum is getting a newsfeed. Thanks to FireFly for showing me how to do that.
Reply With Quote
  #27  
Old 07-15-2002, 06:42 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JJR512-

Thanks for the info. BTW, in the instructions .txt file, you say:
Quote:
Note regarding the next three queries:
but you have only 2 listed below that. I'm thinking it was the one above, and the 2 below? One that started with:
Quote:
INSERT INTO settinggroup
and the other 2 that started with:
Quote:
INSERT INTO setting
All 3 should use the same number?
Reply With Quote
  #28  
Old 07-15-2002, 06:48 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, sorry about that, I put that note in the wrong spot.
Reply With Quote
  #29  
Old 07-15-2002, 07:05 AM
xug xug is offline
 
Join Date: Oct 2001
Location: The Grand Strand, SC
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JJT512, you have showed us again what a great 'hacker' you are.

Thanks for this great hack, one word : SUPER.

In note to a posting about slowing down, I have the feeling that it slows my forum down for about one or two seconds, which is in my eyes not a problem at all.
Reply With Quote
  #30  
Old 07-15-2002, 07:55 PM
xug xug is offline
 
Join Date: Oct 2001
Location: The Grand Strand, SC
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found a small bug and can't solve the problem myself.

When you look at the news that is presented like :

HiTech gets Aces High again! From: ConsoleDomain Jul 13 2002 3:24AM

and want to select the news link source, so in this sample above here it would be 'ConsoleDomain' main website you get an error because the link that will be projected is like :

http://www.gamesdomain.com%20target=/

So the taget function is not properly coded and can't figure it out myself, to me the coding looks good, but hey, I'm a dunno

Please help.
Reply With Quote
  #31  
Old 07-15-2002, 08:22 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry about that; I left a closing quote out of an <a href...> tag in the forumnewsbit template.

In that template, find this:
Code:
<a href="$forumnews[sourceurl] target="_blank">
Change it to this:
Code:
<a href="$forumnews[sourceurl]" target="_blank">
I will update the attachment shortly, but if you already have v1.1a, you do not need to download it again, as this is the only fix.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04526 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete