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)
-   -   NNTP Gateway (Usenet/Newsgroups) (https://vborg.vbsupport.ru/showthread.php?t=35247)

lierduh 03-23-2004 08:03 PM

Quote:

Originally Posted by himerus
I can't seem to get a post made in the forum update to the newsgroup... the post works on the site, but it seems to never have been sent back to the NNTP server...

Any Ideas?

What is on your screen if you run it manually. If you use IE and it tries to download instead of displaying it on the screen. Please fix the Windows registry following the instruction here:

http://support.microsoft.com/default...&Product=ie600

himerus 03-23-2004 08:45 PM

When I run the script, this is the output... it's getting threads, but I haven't seen any sent.

Quote:

4 group(s) gatewayed.
Logging in to ***.******.com, group alt.internet.access
Logging in to ***.******.com, group alt.comp
Logging in to ***.******.com, group alt.comp.hardware
Getting message number 240543: Thread found; 'Re: New Hard Drive...best way to transfer info ???' from ~misfit~
Getting message number 240545: Thread found; 'Re: New Hard Drive...best way to transfer info ???' from Shep?
Getting message number 240546: Thread found; 'Re: Setting CPU Speed (Asus A7V133)' from ~misfit~
Getting message number 240547: Thread found; 'Re: Beware of Directron.com' from J. Codling
Getting message number 240548: Thread found; 'Re: Loud fan follow-up' from Greg Logging in to free.teranews.com, group alt.windows-xp
Getting message number 43365: New thread; 'Software restriction policy' from brenden
Getting message number 43366: Thread found; 'Re: XP firewall' from Tom McCune
I've logged into the groups online, but my post isn't showing up in the group, and there have been other posts since mine that posted to the newsgroup.

I am working on the gateway.php file, and have set it up in the admincp as a Scheduled Task.... only downside is it either has to run every minute (way too much) or every hour (maybe a little slow to update) I was having a hell of a time with the cron job working properly on my server.

lierduh 03-23-2004 09:50 PM

Quote:

Originally Posted by himerus
When I run the script, this is the output... it's getting threads, but I haven't seen any sent.



I've logged into the groups online, but my post isn't showing up in the group, and there have been other posts since mine that posted to the newsgroup.

I am working on the gateway.php file, and have set it up in the admincp as a Scheduled Task.... only downside is it either has to run every minute (way too much) or every hour (maybe a little slow to update) I was having a hell of a time with the cron job working properly on my server.

Not sure how to use the schedule in Admin control panel. I use Linux cron. What is your entry in your /var/spool/cron/ ?

Check the post your member made for usenet in the database to see if "isusenetpost =1", if it is "1", that means the post has been successfully sent to usenet.

himerus 03-23-2004 09:57 PM

Well, it shows then that is has been sent... I just haven't seen it posted...

I'll have to set up a newsreader tonight, and try it out.

himerus 03-23-2004 11:38 PM

It says it is being posted:

Posting Message from himerus: 240 - Article posted

However, I've made several posts, and can locate none of them from other newsgroup sources.

jcrash 03-24-2004 02:51 AM

Quote:

Originally Posted by himerus
I've got it working on vB3 Gold at http://www.myispforum.com/ if anyone is looking for an example... I have two newsgroups currently running:

alt.internet.access
alt.comp

I replied to one newsgroup post, but I'm not sure if that part is working yet, and I have yet to see any new posts come in, but I love the way it looks... Great way to syndicate lots of data for the search engines. :)


I just want to point out I went to his site and found a usenet ppost, then searched on a word from its title...NO MATCHES

The search portion of this hack is broken, please log it as a bug. :ermm:

himerus 03-24-2004 02:57 AM

You are right...

The similar threads are being updated properly, because if you browse the newsgroup posts, the similar threads show up, but sure enough, the search index isn't being updated properly, even though the function (build_post_index($postid,$foruminfo);) is being called in gateway.php

Also, the update is not working for me at all... I have tested it on several posts, and they are not being sent back to the newsgroup. (see prior posts)

I love the functionality, and would like to see the original author come back around with a new version for vB 3 Gold...

I'm fine with any PHP, but I'm not sure about the interaction with the NNTP server, and how all that works well enough to really re-write this...

I would also enjoy seeing a control panel section for this hack... with lots of options! ;)

Gilby 03-24-2004 08:31 PM

Quote:

Originally Posted by leeherron
So no one knows about the changed subject threading bug?

It's not a bug, it was programmed that way. Since vb 2 is not a threaded forum, it doesn't make it that easy to use a changed subject from the newsgroup as it's hard to know what post a reply is to when done on the forums. So, the script assumes that if the subject is change significantly, that the discussion in the thread has drifted off and warrents a new thread in the forums. It also makes the posts from the forum appear as a reply to the correct post.

Gilby 03-24-2004 08:35 PM

I do still plan to upgrade the scripts for vb 3, but haven't had a chance to do so yet. I'll be out of town over the next week, but I hope to work on it within the next few weeks.

For those that just can't wait to upgrade to vb3, lierduh's hack of this script should hold you over until I get an official one made for vb3.

If you have any suggestions about new features to add or any bugs or problems you've encountered, now is the time to let me know (you can post here or email me through the forums here).

himerus 03-24-2004 09:36 PM

Quote:

Originally Posted by Gilby
If you have any suggestions about new features to add or any bugs or problems you've encountered, now is the time to let me know (you can post here or email me through the forums here).

Just the fact that for some reason my post aren't being sent back to the newsgroup... :(

That's the main problem I'm having right now.... (see previous posts)

lierduh 03-24-2004 09:52 PM

Quote:

Originally Posted by himerus
Just the fact that for some reason my post aren't being sent back to the newsgroup... :(

That's the main problem I'm having right now.... (see previous posts)

I doubt your problem is related to the script. You have got status 240. It means the response from the NNTP server says everything is received correctly.

It is not easy to know why your post does not show up on USENET after your server received it. Not to be smart here, but have you posted using a normal usenet client? does your server accepts posting?

lierduh 03-25-2004 02:14 AM

Quote:

Originally Posted by jcrash
I just want to point out I went to his site and found a usenet ppost, then searched on a word from its title...NO MATCHES

The search portion of this hack is broken, please log it as a bug. :ermm:

Ok, found the problem. The final Gold release changed a function name.

the "getforuminfo" function is now changed to "fetch_foruminfo". Around line 235, find:

$foruminfo=getforuminfo($threadinfo[forumid]);

Change it to:

$foruminfo=fetch_foruminfo($threadinfo[forumid]);

himerus 03-25-2004 02:57 AM

Quote:

Originally Posted by lierduh
I doubt your problem is related to the script. You have got status 240. It means the response from the NNTP server says everything is received correctly.

It is not easy to know why your post does not show up on USENET after your server received it. Not to be smart here, but have you posted using a normal usenet client? does your server accepts posting?

I have tested it using Outlook Express to post to the newsgroup, and it works like a charm... it was one of the first things I tested after I knew it wasn't working... I did want to rule out that it was the newsgroup account or something like that....

I'm really stuck with this one.... I've already had about a dozen users sign up for the USENET access to the groups I'm using.

himerus 03-25-2004 06:20 PM

Quote:

Originally Posted by lierduh
Ok, found the problem. The final Gold release changed a function name.

the "getforuminfo" function is now changed to "fetch_foruminfo". Around line 235, find:

$foruminfo=getforuminfo($threadinfo[forumid]);

Change it to:

$foruminfo=fetch_foruminfo($threadinfo[forumid]);

Thanks for that fix... now all the new posts coming in to the USENET forums are being indexed properly.

I'm going to sit down later, and go through this hack one line at a time to see if I can figure out why it isn't posting back to the news server after a message 240 saying it did...

I'd be willing to pay for a fix almost!!! :D

lierduh 03-25-2004 06:45 PM

Quote:

Originally Posted by himerus
I'm going to sit down later, and go through this hack one line at a time to see if I can figure out why it isn't posting back to the news server after a message 240 saying it did...

I'd be willing to pay for a fix almost!!! :D

Why pay anyone before you even try to debug it yourself?:)

You could try a different news server. I believe there are some free ones which accept post out there.

himerus 03-25-2004 09:41 PM

Quote:

Originally Posted by lierduh
Why pay anyone before you even try to debug it yourself?:)

You could try a different news server. I believe there are some free ones which accept post out there.

Well, I'm using www.teranews.com

They have a free 50MB/day account that has something like a 3$ one-time setup fee...

I was able to successfully post to the free account using a newsreader... using the same settings with the vB hack, I am able to download all the posts from the group, and that is working flawlessly. I added the gateway.php to the includes/crons folder, and set it up as an hourly scheduled task in vB. When I run it manually either by calling the page directly, or using the "run now" feature in the scheduled task manager, the posts are repordedly being posted, and after that, there is no way of knowing where it is lost.

I'm not experienced with connecting to third parties with PHP, although, I am decent at PHP code. I will look over the file in the next hour or so, and see if anything sticks out that might be causing the problem... I've looked over the send_post function a few times already, and I didn't see anything there that was wrong... maybe something with the way headers are being read or sent??? That's where I'm lost, because I'm not experienced with the protocols used to connect to the NNTP server & post.

:S

I'll Post the contents of my gateway.php file after I've looked it over and made it a little more readable.

lierduh 03-25-2004 10:12 PM

Quote:

Originally Posted by himerus
Well, I'm using www.teranews.com

I'm not experienced with connecting to third parties with PHP, although, I am decent at PHP code. I will look over the file in the next hour or so, and see if anything sticks out that might be causing the problem... I've looked over the send_post function a few times already, and I didn't see anything there that was wrong... maybe something with the way headers are being read or sent??? That's where I'm lost, because I'm not experienced with the protocols used to connect to the NNTP server & post.

:S

I'll Post the contents of my gateway.php file after I've looked it over and made it a little more readable.

If anything, I think it will be more to do with nntp.php. So you might want to try out a modern version of nntp.php:

http://pear.php.net/package-info.php...release=0.10.1

himerus 03-25-2004 11:22 PM

Quote:

Originally Posted by lierduh
If anything, I think it will be more to do with nntp.php. So you might want to try out a modern version of nntp.php:

http://pear.php.net/package-info.php...release=0.10.1

I've updated the nntp.php, and some of the files that the new one requires.

After renaming a couple of fuctions that were get_article to getArticle, etc... everything seems to work again... this is the result after posting an article...

Quote:

4 group(s) gatewayed.
Logging in to free.teranews.com, group alt.internet.access
Posting Message from himerus: 1
Posting Message from himerus: 1
Logging in to free.teranews.com, group alt.comp
Logging in to free.teranews.com, group alt.comp.hardware
Getting message number 240779: Thread found; 'Re: Mini/Cheap File Server??' from Stephen B
Logging in to free.teranews.com, group alt.windows-xp
Getting message number 43502: Thread found; 'Re: virtual memory?' from ZyRiX
Getting message number 43503: New thread; 'DVD 2 CDR?' from chris
What does the 1 status mean? it still doesn't appear to be posting, but it could need some adjustments.

himerus 03-25-2004 11:59 PM

At least this time, it is knowing that it wasn't posted... each time it runs, it's trying to post the same 2 messages again:

Posting Message from himerus: 1
Posting Message from himerus: 1

himerus 03-26-2004 03:27 AM

I've been hacking away, and in the main posting function, it is getting a status 340... I'm not sure what the 1 is after the posters username, just a varialbe that has changed with this new NNTP.php that I'm using....

In the function it has:

PHP Code:

switch ($response) {
            case 
240// RFC977: 'article posted ok'
        
return true;
        break;
            case 
340// RFC977: 'send article to be posted. End with <CR-LF>.<CR-LF>'
        // This should not happen here!
        
echo "Unknown error during post";
        return 
PEAR::throwError('Unknown error during post'$response$this->currentStatusResponse());
        break;
            case 
440// RFC977: 'posting not allowed'
        
return PEAR::throwError('Posting not allowed'$response$this->currentStatusResponse());
        break;
            case 
441// RFC977: 'posting failed'
        
return PEAR::throwError('Posting failed'$response$this->currentStatusResponse());
        break;
        default:
        return 
PEAR::throwError('Unidentified response code'$response$this->currentStatusResponse()); 

This is saying that a 340 is an error... does this help at all as to what the problem now might be? I think that it's actually closer to working... I'm just not sure about this new nntp version, because it includes several other long files of classes & functions that I'm not familiar with.

himerus 03-26-2004 04:12 AM

Its Working!!! Yay

kkiely 03-28-2004 12:39 AM

what does it mean when it says " Run the SQL provided in nntp.sql.". I am a newbie , how do i do this?

Ogmuk 03-28-2004 12:45 AM

Quote:

Originally Posted by kkiely
what does it mean when it says " Run the SQL provided in nntp.sql.". I am a newbie , how do i do this?

It will be a bit hard to explain when you are very new to this but do you know what phpMyAdmin is, and if so, do you have it installed on your server?

kkiely 03-28-2004 12:48 AM

<phpadmin>

I go through Powweb and they have something called. phpadmin.powwebcom - when i log onto there it looks like it shows all the database tables and stuff

kkiely 03-28-2004 01:20 AM

OK, i just ran the SQL file and it appears to have created the nntp tables I need. Now on steps 3 & 4:

<< "3. Go into your database and modify the settings in the nntp_settings table. Descriptions are available in there, but currently it's not integrated with the vB admin control panel." >>

What specifically do I need to do here?

<< 4. Go in and set up your newsgroups in the nntp_groups table.
Basically you just need the newsgroup field defined, the forum defined as the number associated with the forum (warning: all posts currently in there will be exported, so be careful), >>

What specifically do I need to do here?

<< and the server of your newsgroup provider (ie. news.xyz.com). >>

What specifically do I need to do here?

himerus 03-28-2004 05:29 PM

3.) You must use your PHPmyAdmin, or other similar database tool to access the database, and edit the nntp_settings table, and change the value filed to match what you would like. See attachment for settings after I have changed them to match my forum.

4.) In the nntp_groups table, this is where you are going to store the info for the newsgroups you choose to gateway. See the attached image to see what my table looks like after inserting several newsgroups. username & password deleted out obviously.

LAST: you must have a valid newsgroup account with an ISP, or an independant newsgroup provider. I use both Easynews (Read my Review of Easynews) and Teranews (http://www.teranews.com/) as my providers. The teranews account is doing most of the traffic, and I will move all the accounts to easynews once I am sure the system will not cause any problems.

Some newsgroups, you may have to turn on posting on your account in order to be able to post...

I've done a huge hack of the original hack to get this to work for my situation, and it seems to be working properly now... I still have a lot of adjustments to make, and then I will create my own integration into the admincp if the original author hasn't released a new version yet.

There is a lot of great features that could be put into this....

I plan on some further options when setting up newsgroups of how many posts you would like to download, all, specific number, or new posts only.

I would like to put in something that if you have deleted a thread from your forum, and there are later replies to it, that you have the option to either download them, or ignore them, and move on.

This is a great addition to any forum that has newsgroups that are similiar in topic and nature. If you can have some moderators just for that forum to delete spam, porn, and other garbage that gets posted to some of the unmoderated high-traffic groups, then you will add tons of valuable content to your site for nothing more than the cost of a newsgroup account (if you don't already have one)

:)

Hope that helps... just ask any specifics you have on making this work with vB3, because I seemed to have a lot more problems to work through than some of the others in this thread that have it running on vb3... but I figured them all out eventually, and with some added scripts, and classes, it seems to be working great.

himerus 03-29-2004 02:29 AM

Now I've found that I'm actually having a problem with posting when the script is running under a cron...

If I run it manually, the posts that are made in my forum are being sent properly...

If the script runs on a cron and tries to post, it is recieving a 240 status after the post is sent, but the message id isn't being inserted into the post field property... it only appears as something like <himerus.0@> and doesn't have the settings domain or message id included in it... in those cases, the messages aren't being sent properly to the server....

If I manually edit phpmyadmin, and remove the msgid, ref, and reset the isusenetpost to 0, and then manually run the gateway.php file, the post is uploaded properly....

Any ideas???

I will have to create an email message for each time the cron is ran to really test this I think... :( since I'm not seeing any of the output, but it is saying the post was sent properly...

kkiely 03-31-2004 02:12 AM

I just realized now that I will have to get a news feed if I get a Usenet hack. I read your review on your page of the 2 sites. One of the sites said 6 GB per month for free if i recall correctly but i'm not sure how much bandwidth is used for Usenet access. Could you tell me if there is any way to get a newsfeed for newsgroup access for free without having to worry about going over the limit and having your bulletin board lbank if you go over?
thanks,
KK

Sanjiyan 04-01-2004 03:35 PM

Any ideas when this hack will be upgraded to support vB3.0.0 ?

sporty 04-07-2004 12:15 AM

what Sanjiyan said!

Erwin 04-07-2004 12:27 AM

Quote:

Originally Posted by Gilby
I do still plan to upgrade the scripts for vb 3, but haven't had a chance to do so yet. I'll be out of town over the next week, but I hope to work on it within the next few weeks.

For those that just can't wait to upgrade to vb3, lierduh's hack of this script should hold you over until I get an official one made for vb3.

If you have any suggestions about new features to add or any bugs or problems you've encountered, now is the time to let me know (you can post here or email me through the forums here).

How's the update going? :) Would your update be similar to the current lierduh's version, or different? I don't want to use lierduh's version, and then find out yours is very different necessitating a complete redo.

Bro_Joey_Gowdy 04-07-2004 12:39 PM

/me waits patiently for an official release for vb3

chas_h 04-09-2004 06:08 AM

I'm getting some Sql errors when I try to run the newer VB-3 gateway.php posted by Lierduh. Anybody have a clue where to look for this??

Chas.

"Database error in vBulletin 3.0.0:

Invalid SQL: SELECT
post.postid,post.username,post.userid,post.datelin e,post.pagetext,post.showsigna ture,post.ipaddress,thread.pollid,thread.title,pos t.threadid,post.attach,thread. forumid
FROM thread,post WHERE post.isusenetpost=0 AND thread.threadid=post.threadid AND
post.dateline=thread.dateline AND post.userid=thread.postuserid AND
(thread.forumid=)
mysql error: You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near ')' at
line 1

mysql error number: 1064

lierduh 04-09-2004 06:35 AM

The error is at: (thread.forumid=)

That means the script did not retrieve the correct forum IDs.

The code for above is:

thread.forumid=". implode(" OR thread.forumid=", $group[forum])

You probably have not set up "nntp_groups" table properly.

chas_h 04-09-2004 03:10 PM

Quote:

Originally Posted by lierduh
The error is at: (thread.forumid=)

That means the script did not retrieve the correct forum IDs.

The code for above is:

thread.forumid=". implode(" OR thread.forumid=", $group[forum])

You probably have not set up "nntp_groups" table properly.

Thanks for responding. I have got the proper group ID# in there, but it's hard to tell now because I put the entries in the field that had the description and I can't see the description anymore. Also, my view if PHPMyadmin looks alot different than the screenshots at the beggining of this thread.
I'm trying to set it up as a mail gateway, not a usenet gareway, I'll go back and try again.

Chas.

chas_h 04-10-2004 12:27 AM

I see where I was going wrong with the entries in MySql. Now that it is fixed I am still getting one small error when I run the gateway.php, see below

"1 group(s) gatewayed.<br />
<b>Fatal error</b>: Cannot instantiate non-existent class: pop3 in <b>/var/www/html/forum/gateway.php</b> on line <b>76</b><br />"

Has anyone got this to work with mail on VB-3? I would apreciate any input, good or bad, I just need to know if this can be done or not.

Thanks.

Erwin 04-10-2004 07:13 AM

Okay, I'm using lierduh's version, and it seems to be working with vB3 Gold. :) Thanks!

chas_h 04-10-2004 05:12 PM

Quote:

Originally Posted by Erwin
Okay, I'm using lierduh's version, and it seems to be working with vB3 Gold. :) Thanks!

Hi Erwin, thanks for responding. I think that you and I host at the same place, at least I think I've seen some of your posts in the forums there. If so, have you had any trouble using this as a mail to forum integration using RedHat ES/Ensim combo (if that is what you use)? Any special setup with that?

TIA,
Chas.

lierduh 04-10-2004 08:50 PM

Quote:

Originally Posted by chas_h
Hi Erwin, thanks for responding. I think that you and I host at the same place, at least I think I've seen some of your posts in the forums there. If so, have you had any trouble using this as a mail to forum integration using RedHat ES/Ensim combo (if that is what you use)? Any special setup with that?

TIA,
Chas.


I have disabled the mail post function. You can try to uncommon the require_once("class.POP3.php3"); line and upload the class file.

chas_h 04-11-2004 03:48 AM

Quote:

Originally Posted by lierduh
I have disabled the mail post function. You can try to uncommon the require_once("class.POP3.php3"); line and upload the class file.

Hi Lierduh,
Thanks, I have done what you said and now mail is going from the forum to the mailing list I have set up, that is a big step forward! But I am not able to send from mailbox to forum. Additionally, the mail that arrives from the forum to the mail has a return address of;
"admin.14j7a0@timelimit.yourserver.com"
Which is not the address of the mailing list.

I have seen something like this hack work on phpBB, but in that case all you need to do is subscribe to the forum setup for mail, you don't have to join the mail list. I can't seem to figure out how to subscribe to a 'froum' in VB-3. only a thread, so it is necesary to join the mailing list to receive mail.
Any thoughts from anyone on this would be greatly appreciated.

Chas.


All times are GMT. The time now is 06:32 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.02229 seconds
  • Memory Usage 1,900KB
  • 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
  • (1)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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