Here's another mod I've made to this hack.
In wrestling with getting it working, I needed to blow away my vBulletin threads/posts several times, and re-import everything from USENET. Since some of the postings originated in vBulletin, it was skipping them (which was mucking up the threading).
Locate the whole
if (trim($message['user-agent'])... block of code in
gateway.php and tweak it as follows:
Code:
$skip_post = 0;
if (trim($message['user-agent']) == trim($nntp_settings['useragent'])
AND $nntp_settings['organization_check'] == 0)
{
if ($nntp_settings['full_import_from_usenet'] == 0) {
logging("Skip, post was sent from our forum.");
$skip_post = 1;
}
}
else if (trim($message['user-agent']) == trim($nntp_settings['useragent'])
AND $nntp_settings['organization_check'] == 1
AND trim($message['organization']) == trim($nntp_settings['organization']))
{
//added organization so that we don't skip fellow gateway's posts
if ($nntp_settings['full_import_from_usenet'] == 0) {
logging("Skip, post was sent from our forum.");
$skip_post = 1;
}
}
else if (stristr(trim($message['x-no-archive']), 'yes') AND
isset($nntp_settings['honor_no-archive']) AND
$nntp_settings['honor_no-archive'] != 0)
{
logging("Skip, X-No-Archive headers is set.");
}
elseif ($nntp['grouptype'] == 'mail'
AND $group['prefix']
AND stristr($message['subject'], $group['prefix']) == false)
{
logging("Skip, not matching prefix: \"" . $group['prefix'] . "\"");
}
if(!$skip_post)
{
$kf = killfile_match();
In
AdminCP go the to
NNTP Gateway Settings, click the
Add a New Setting button, and add this:
Code:
Title: Full import from USENET
Varname: full_import_from_usenet
Value: 0
Description: Override useragent and organization checks to import absolutely everything from USENET.
In order to use this feature, you have to:
- Enable it by setting the full_import_from_usenet value to 1.
- Delete everything from the thread and post tables in the vBulletin database (selectively, if you want to re-import only certain newsgroups or posts).
- In AdminCP go to NNTP Gateway Newsgroups and set the Last message number to zero (or some appropriate value).
- Run Update Counters and rebuild the thread and forum information, and Update Post Counts.
- Run gateway.php script.
- Reset the full_import_from_usenet value to zero.
David