The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Description:
This hack provides a gateway to selected usenet groups. The entire usenet group is mirrored locally. Posts submitted locally to mirrored newsgroups will also be sent out to usenet. A single perl script is executed via cron that collects news and posts any outgoing articles. Incoming messages are parsed against customizable spam filters and threaded correctly before being placed in your forums. By default, no personal information is sent to usenet other than the posters username and whatever you have globally configured as a footer and organization. The option does exist for a user to include a custom email to use for usenet posts. After initial installation (which involves creating some new tables, adding a few columns to existing vB tables, and entering the database connection information to the news script) configuration is completed via the vB control panel.
Current version is 20020323 for vB2.xx Current feature list:
Main Options More Options Configuration of Newsgroups Add New Newsgroups Spam Control What an imported usenet article looks like in vB The latest version of this hack will always be in this first post of the thread. Before asking questions in this thread, please read all the posts in this thread. If your question goes unanswered, it will probably be because the question has already been answered countless times in this thread. This hack was created for use on my forums and will only be supported as time permits. Links to required Perl Modules Show Your Support
|
Comments |
#492
|
|||
|
|||
Quote:
If you know a bit about regular expressions, it shouldn't be too hard to fix the code. |
#493
|
|||
|
|||
Fast Forward ... You rule !
Now, I close but I can't seem to understand the following: sh-2.05$ cd www/forums sh-2.05$ perl newnews.pl Connecting to news-remote.speakeasy.net... Connected Sending authentication info... Authenticated and logged in Pulling comp.sys.mac.graphics... No new messages. Pulling rec.bicycles.tech... -> fetching articles 338237 to 338437... -> fetching 338238... OK -> fetching 338239... OK -> fetching 338240... OK -> fetching 338241... OK -> fetching 338242... OK -> fetching 338433... OK -> fetching 338434... OK -> fetching 338435... OK -> fetching 338436... OK -> fetching 338437... OK -> processing article batch... -> requested 200 messages... 0 not available or rejected. -> inserting new threads from rec.bicycles.tech -> inserted 0 threads -> finding replies... Pulling rec.bicyceles.racing... No new messages. Clean disconnection from news-remote.speakeasy.net Why doesn't it insert the messages. The strange thing is that sometimes it'll insert just ONE thread out of say 200. |
#494
|
|||
|
|||
Quote:
I guess it have something to do with this subroutine? (or sub wordsonly/sub remove_bb_code) # index post body $pagetext =~ s/^\[q[1-9]\]>+.*$//go; # remove all quoted stuff if (length($pagetext) < 10000) { my $text = remove_bb_code("$pagetext"); $text = wordsonly("$text"); my @words = split(/\s+/,$text); my $words_sel=""; foreach my $word (@words) { if ($word && ((length($word) >= $vbconfig{minsearchlength})) && ((length($word) <= $vbconfig{maxsearchlength}))) { $word = $dbh->quote($word); $words_sel .= "$word,"; db_execute("INSERT IGNORE INTO word (title) VALUES ($word)"); } } chop $words_sel; if ($words_sel) { my $wordids = db_fetch("SELECT wordid FROM word WHERE title in ($words_sel)"); while (my $wid = $wordids->fetchrow_array) { db_execute("INSERT IGNORE INTO searchindex (wordid,postid,intitle) VALUES ($wid,$id,0)"); } } } else { console(" *-> Post $id skipped... (too long)\n"); } } Or this? sub remove_bb_code { my $text = $_[0]; my ($bbo,$bbc); my $bbcodes = db_fetch("SELECT bbcodetag FROM bbcode"); while (my $bbcode = $bbcodes->fetchrow_array) { $bbo=quotemeta("[".$bbcode."]"); $bbc=quotemeta("[/".$bbcode."]"); $text =~ s/$bbo|$bbc//gi; # easy stuff } $text =~ s/"|<|>/ /gsio; $text =~ s/&|<br>|<(\/)?body>|<p>|<(\/)?html>//gsoi; $text =~ s/\[size=[0-9]+\]|\[\/size\]//ig; # size $text =~ s/\[color=(\"\#)?[A-Za-z0-9]+(\")?\]|\[\/color\]//ig; # color $text =~ s/\[url(=)?(")?//ig; $text =~ s/(\")?\](.+)\[\/url\]/$2/gi; $text =~ s/\[email(=)?(\")?//ig; $text =~ s/(\")?\](.+)\[\/email\]/$2/gi; $text =~ s/\[font=(\"\#)?[A-Za-z]+(\")?\]|\[\/font\]//ig; # font $text =~ s/\[list(=)?[1Aa]?\]|\[\/list(=)?[1Aa]?\]//ig; # list $text =~ s/\[\*\]/ - /ig; $text =~ s/\[(\/)?code\]//ig; return $text; } Can you briefly tell me what to seek, so I could try to fix it. Regards, Joop |
#495
|
|||
|
|||
Quote:
Also, a reply will only be inserted if it's parent exists. Otherwise it's inserted into the usenet_article table until it's parent shows up. When you see 'finding replies...' on the screen, the script is looking in this table for replies to messages that have just arrived. After you have been ran the script a few times the numbers will look make more sense. |
#496
|
|||
|
|||
Thank you. Ok. I ran the script and look at this one.
> fetching 279617... OK -> fetching 279618... OK -> fetching 279619... OK -> fetching 279620... OK -> processing article batch... -> requested 4999 messages... 0 not available or rejected. -> inserting new threads from rec.bicycles.racing -> inserted 1 threads -> finding replies... 5000 messages and only one thread starter? Takes a little bit of time. Thanks for your confirmation. |
#497
|
|||
|
|||
Quote:
|
#498
|
|||
|
|||
The link supplied for downloading the hack
http://britishexpats.com/download/usenet_gateway.tar.gz gives a page not found error. Could someone email it to me at dpajur@pcekspert.com ? |
#499
|
|||
|
|||
Quote:
However, it seems that it's probably better to leave the old one in place and release the new one with vB3. The new version is a total rewrite and is much more efficient. I'm mirroring over 150 groups with no excessive load on the server. By waiting until vB3, it will ensure the release is as bug free and as optimized as possible. I'll upload the latest version of the old script this evening when i get home from work. |
#500
|
|||
|
|||
Ok.. Having a bit of trouble with this. Hopefully someone can suggest a solution.
Here is the error I'm getting : Quote:
Quote:
Josh |
#501
|
||||
|
||||
Josh, try adding the following line to your newnews.pl
use lib "/usr/local/lib/perl5/site_perl/5.8.0"; Add the line right under the first line like this... Quote:
Cheers! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|