vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   news2vb - Moreover news headlines to vBulletin discussion thread (https://vborg.vbsupport.ru/showthread.php?t=36174)

Cloud-Warrior 03-14-2002 10:00 PM

news2vb - Moreover news headlines to vBulletin discussion thread
 
Hope the instructions at the top 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.ie/vbulletin/showt...threadid=44475
http://www.boards.ie/vbulletin/showt...threadid=44522

Also, have a look at the menu here:

http://www.boards.ie/vbulletin/news2...ion=picksource

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

Changelog

1.1 - "Post News" output now shows BB code parsed message, URL to thread
1.1 - Fixed missing references to $yourvburl

Cloud-Warrior 03-15-2002 03:12 PM

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.

Psychdrone 03-15-2002 11:42 PM

got a demo for us!

Erwin 03-17-2002 10:49 AM

It works!!!

I am making it a cron job and running the query every 24 hours... thanks! :)

Erwin 03-17-2002 11:09 AM

Cool - the only thing that stumps me is the

$jiconid = "1";

variable - I put in a number 1, but the icon does not show up.

Am I meant to put in the full gif file name, or the whole path to the icon file?

Thanks for your help...

Erwin 03-17-2002 11:30 AM

I see... the posticon shows up in the actual showthread itself, but not in forumdisplay... I wonder why...

Cloud-Warrior 03-17-2002 02:14 PM

What you should put in for that post icon variable ($iconid) is the ID number of the icon in the icons table (can check in PHPMyAdmin or else in the CP).

I've moved the demo links up top.

AndyTSJ 03-17-2002 02:31 PM

I like this, but would love to know how it could be automatically programmed to run to post a set of stories each day :)

Cloud-Warrior 03-17-2002 02:45 PM

If you are on Unix you can use crontab to schedule the wget (as in the quoted example earlier in this thread) command for a particular feed.

Other options for Windows that I can think of off the top of my head would be to install Lynx and use the Windows scheduler to call the URL corresponding to a particular feed from Lynx - you'll see when you use the menu version to post a particular feed that there is a URL in the output - that is the URL you would call from an automated script (on Unix or Windows). I'm not really that familiar with any other options for calling a URL in Windows, I guess you could also just write a PHP or Perl script to download the URLs and schedule that daily with Windows scheduler as well.

Here's the syntax for the URLs (password hardcoded into the script is cloudbot):

Again I'd refer to http://w.moreover.com/dev/ and http://w.moreover.com/dev/custom/ for help on Moreover feeds.

Let me know if I can help further, or if there are any bugs/improvements you've spotted.

John.
--

Erwin 03-17-2002 06:33 PM

Quote:

Originally posted by Cloud-Warrior
What you should put in for that post icon variable ($iconid) is the ID number of the icon in the icons table (can check in PHPMyAdmin or else in the CP).

Well, I did that. Like I said, the post icon shows up in the thread, but in the forum display it is a broken image, with the URL being just the forum directory rather than the URL to the image file.

Strange...


All times are GMT. The time now is 02:14 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.03183 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete