================================================================================ news2ubb.txt - Version 1.3 - 10 October, 2000 Cloud Internet - planetcloud.com - cloud@eircom.net INSTRUCTIONS ================================================================================ [BEFORE YOU CONTINUE, THIS SCRIPT POSTS NEWS HEADLINES TO A UBB AND DOES _NOT_ CONVERT FROM USENET FORMAT TO UBB FORMAT.] news2ubb.pl is a script to post news headlines from the moreover.com site as UBB messages in whatever forum desired. news2ubb.pl is called in two ways: 1) The menu interface, using: whereever/news2ubb.pl?action=menu 2) Direct posting, using: whereever/news2ubb.pl?source=offbeat&forum=After%20Hours|1&password=whatever where source is a moreover.com feed, and forum is of the format name|number. If you call news2ubb.pl using no arguments, you'll get a standard UBB error. Here's an example of news2ubb's menu interface: http://www.boards.ie/cgi-bin/news2ubb/news2ubb.pl?action=menu and a sample output: http://www.boards.ie/bulletin/Forum1/HTML/001290.html If you do use this script, all I ask is that you e-mail me your UBB URL so I can see it in action on your site. ================================================================================ REQUIREMENTS ================================================================================ You must create a file called source.txt in the $output_directory. This file contains a list of news feeds available from moreover.com. A recent list is available at: http://www.planetcloud.com/cloud/files/source.txt lynx must be installed on your Unix or Windows system (for downloading the tab separated values file). I'm sure there's some easier way to do this using the moreover.com XML feed or something else I'm not familar with! ================================================================================ SAVE THE FOLLOWING AS news2ubb.pl ================================================================================ #!/usr/bin/perl # news2ubb.pl - Version 1.3 - 10 October, 2000 # Cloud Internet - planetcloud.com - cloud@eircom.net print "Content-type: text/html\n\n"; # Specify the UBB CGI directory and equivalent URL. $ubb_cgi_directory = "d:/inetpub/wwwroot/boards/cgi-bin/bulletin/"; $ubb_cgi_url = "http://www.boards.ie/cgi-bin/bulletin"; # Specify where you put your news2ubb.pl and data files and equivalent URL. $output_directory = "d:/inetpub/wwwroot/boards/cgi-bin/news2ubb/"; $news2ubb_cgi_url = "http://www.boards.ie/cgi-bin/news2ubb"; # Change the UBB username you will use for posting. $username = "Q"; # That should be all you need to change, unless there's a problem with the lynx line below. # Decode command line variables. &ReadParse; $password = $in{'password'}; $source = $in{'source'}; ($forum,$number) = split(/\|/, $in{'forum'}); $forum =~ s/ /+/g; $forums_file = "$ubb_cgi_directory/forums.cgi"; $source_file = "$output_directory/source.txt"; my @forums = &open_file($forums_file); my @source = &open_file($source_file); $forums_list = ""; $source_list = ""; foreach $this(@forums) { chomp($this); @checkit = split(/\|/, $this); $forum_name = $checkit[1]; $forum_number = $checkit[8]; $forums_list .= "