Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases

Reply
 
Thread Tools
news2vb - Moreover news headlines to vBulletin discussion thread Details »»
news2vb - Moreover news headlines to vBulletin discussion thread
Version: 2.0, by Cloud-Warrior Cloud-Warrior is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-07-2004 Last Update: 12-08-2004 Installs: 5
Is in Beta Stage  
No support by the author.

Updated from previous vBulletin 2 version of news2vb.

Hope the instructions at the top of the file are clear, if not please post here.

To install this utility, copy the single PHP file to your vB dir. Edit it and change the password to whatever you wish. Change the yourvbdir variable to the URL pointing to your vB directory.

As demo - here are some sample output threads:

http://www.boards.jp/forums/showthread.php?t=16277
http://www.boards.jp/forums/showthread.php?t=16276

Also, have a look at the menu here:

http://www.boards.jp/forums/news2vb....ion=picksource

This script will generate messages of the following form in whatever forum you wish, using any of the Moreover newsfeeds.

Changelog

2.0 - 8 December 2004 - Updated for vBulletin 3.0.x; fixed errors in post creation; added TABLE_PREFIX
1.1 - 19 March 2002 - "Post News" output now shows BB code parsed message, URL to thread; fixed missing references to $yourvburl
1.0 - 15 March 2002 - First version of script

Show Your Support

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

Comments
  #2  
Old 12-08-2004, 09:53 AM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what does the hack do - basically if you call the PHP script with the jaction=picksource command you can see a list of Moreover feeds (www.moreover.com) and a list of your forums, and you can post the headlines into the forum of your choice (as long as you supply the correct password as hardcoded into the script).

Alternatively, you can ignore the categories and perform a custom list of headlines (by searching in the headline keywords or a query through the article text - keyword and query boxes respectively), or you can enter a feed number in the feed box (some unedited Moreover feeds don't have category names - you can see the feed ID number in examples at their site).

You should also be able to generate forum posts from a script, e.g. using wget you would do something like:

Quote:
set url = http://www.wherever.com/vbulletin/news2vb.php
wget -O /dev/null "$url?jaction=postnews&jpassword=cloudbot&jcategor y=Arts%2520and%2520culture%2520news&jforum=21"
wget -O /dev/null "$url?jaction=postnews&jpassword=cloudbot&jfeed=15 771&jtitle=Buffy+news&jforum=93"
wget -O /dev/null "$url?jaction=postnews&jpassword=cloudbot&jkeyword s=lord+of+the+rings&jforum=103"
wget -O /dev/null "$url?jaction=postnews&jpassword=cloudbot&jquery=% 22babylon+5%22&jforum=93"
Sample screen from the menu is attached.

Any questions, please ask.
Reply With Quote
  #3  
Old 12-08-2004, 09:55 AM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since passing of the title to a new reply no longer works in vB3, if you want the news headline title to propagate to a reply, you will have to add:

PHP Code:
if ($title == '') { $title $_REQUEST['title']; } 
to newreply.php after the line:

PHP Code:
$title $newpost['title']; 
Reply With Quote
  #4  
Old 12-08-2004, 10:02 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this. I'll check it out...
Reply With Quote
  #5  
Old 12-08-2004, 10:03 AM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Erwin - yes I remember you tried the old version too (link). Hope it works okay... Moreover went through some changes since I did the previous hack; for a while you couldn't get headlines at all without some paid registration but now they support the headlines by making the first one an advert.
Reply With Quote
  #6  
Old 12-08-2004, 10:15 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can easily modify this so that the poster has a userid instead of an unregistered user by the way. That's what I've done.
Reply With Quote
  #7  
Old 12-08-2004, 10:19 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To make the poster a registered user, do this:

Add a new variable:

Find:

PHP Code:
// Unregistered username to post as
$jfromwho "CloudBot"
Add under:

PHP Code:
// Userid - keep 0 for unregistered
$juserid "0"
Then find:

PHP Code:
  '".addslashes($jfromwho)."',
  
'0'
Replace with:

PHP Code:
  '".addslashes($jfromwho)."',
  
'$juserid'
Done!
Reply With Quote
  #8  
Old 12-08-2004, 10:19 AM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup - I wasn't sure whether people would prefer that or not... Thanks for the updates Erwin!
Reply With Quote
  #9  
Old 12-08-2004, 12:14 PM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replaced some mysql_query's and mysql_fetch_array's with $DB_site->query and $DB_site->fetch_array, and added Erwin's suggestion above.
Reply With Quote
  #10  
Old 12-08-2004, 01:42 PM
Lethal Lethal is offline
 
Join Date: Feb 2002
Location: PA/USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice ill try it out.
Reply With Quote
Reply

Thread Tools

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 04:39 PM.


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.04158 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
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
  • (6)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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