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)

Gilby 02-19-2002 10:00 PM

This hack provides a gateway to any NNTP newsgroup such as those from Usenet and other newsgroup servers. Selected newsgroups are imported from your news server and post on the forum are sent out to the newsgroup. This hack was greatly inspired by fastforward's usenet gateway hack. This one is a complete rewrite of that hack written in PHP and works with vB 2.2.2.

Installation:
Installation is pretty simple. No modifications to the vB php files are needed and it simply consists of dropping in the files to your forums directory, running the SQL modifications, and modifying the newsgroup settings for your desired newsgroups. For the complete installation details, read the readme.txt file.

Here are some of the features:
  • Real cool vbcode to text conversion! ;)
  • All posts are inserted, even if parent thread cannot be found for replies
  • Guests posts also get sent to the newsgroup.
  • Importing of attachments from the newsgroup
  • Poll info sent to newsgroup
  • Attachment link sent to newsgroup
  • Supports unlimited newsgroups and servers.
  • email notification of new replies, just like regular forum posts
  • Can import HTML messages and convert to limited vb code.

For control panel integration, please check out GameCrash's Graphical Interface addition.

What's not in it that was in fastforward's usenet gateway hack:
  • No control panel integration at the moment. (Available separately)
  • Does not support separate footers
  • Does not allow custom email address to be used via the users option
  • No spam control or string replacement support.
  • No purging or autoexpire.

There is still lots that I'd like to add to it, but this is competely functional for basic newsgroup gateway support. It is most likely not free of bugs. ;) If you have questions, suggestions or annoyances, please post in this thread.

vb3 support
lierduh modified this to provide support for the beta versions of vb3. When the release candidates of vb3 come out, I plan to add support for vb3 and add other features to this hack. If you have suggestions for new features, let me know.

E-mail gateway support
New in this version, you can now gateway with an email list. This will fetch emails from a POP email account and send via php's mail function to the mailing list's email address. To set up the list, in the newsgroup field, enter in the email address to send outgoing posts to. In the server field, enter in the pop3 server, and in the username and password fields enter in, you guessed it, the username and password to your pop account. Note: the email gateway capabilities has not been fully tested, so it might not work with your POP server. Also, it does not work in combo with a news<->forum gateway in the same forum (you can use either kind though in differnet forums within your forums).

GameCrash 02-20-2002 07:24 AM

very nice - will install it later :)

Does it need cron jobs?

GameCrash 02-20-2002 07:35 AM

Running the sql (that in nntp.sql) fails - the insert into nntp_groups includes a column footer which is not in the create table - I think it is from the usenet hack? Can I simply change the insert statement or do I have to change the select?

Erwin 02-20-2002 08:54 AM

This is my dream come true!

I will install it this weekend... :) Thanks!

One question: If I don't do a cron job, then I have to manually run the gateway.php file myself - is that right?

dost 02-20-2002 09:36 AM

Thanks for the hack. I agree with Gamecrash:
Code:

ERROR 1054: Unknown column 'footer' in 'field list'
Query OK, 0 rows affected (0.01 sec)

Thanks

Sanjiyan 02-20-2002 12:52 PM

Quote:

Originally posted by GameCrash
Running the sql (that in nntp.sql) fails - the insert into nntp_groups includes a column footer which is not in the create table - I think it is from the usenet hack? Can I simply change the insert statement or do I have to change the select?
same here what do I need to do?

Sanjiyan 02-20-2002 12:52 PM

same here what do I need to do ?

Sanjiyan 02-20-2002 01:15 PM

Quote:

Originally posted by dost
Thanks for the hack. I agree with Gamecrash:
Code:

ERROR 1054: Unknown column 'footer' in 'field list'
Query OK, 0 rows affected (0.01 sec)

Also I couldn't get it to work because nothing happens when I run gateway.php. Maybe we can have a better explanation of step 4. It seemed a little bit unclear to me. Like, should I put just news.xxx.com in the server part? And where can I check if I have PEAR installed or not?

Thanks


Same here, I can not get anything to happen when I run the gateway.php file either

I got the sql part installed by removing the footer text from the insert field, and also by removing the footers corosponding NULL entery.

Gilby 02-20-2002 02:11 PM

Quote:

Originally posted by Sanjiyan
I got the sql part installed by removing the footer text from the insert field, and also by removing the footers corosponding NULL entery.
I fixed the SQL in the first post. Please give this update a try. I removed the footer column at the last minute because I didn't implement any use for it and it might confuse some just by being there.

Gilby 02-20-2002 02:12 PM

Quote:

Originally posted by Sanjiyan

Same here, I can not get anything to happen when I run the gateway.php file either

Did anything happen? Any errors appear?

Sanjiyan 02-20-2002 02:14 PM

Quote:

Originally posted by Gilby


Did anything happen? Any errors appear?

nope no errors, just a blank white IE screen.

I didnt run it as cron, I just ran it from the address bar on IE, as I dont have access to cron and this will be ok with me, cos I can use MS TASK to run the url every 1 hour :P

Gilby 02-20-2002 02:14 PM

Quote:

Originally posted by Erwin Loh
One question: If I don't do a cron job, then I have to manually run the gateway.php file myself - is that right?
That's correct.

Sanjiyan 02-20-2002 02:25 PM

If you wish to try the link on my site Gilby:

http://www.wocs.net/gateway.php

You can see it just gives you a blank screen.

Urm I run my forums on the root of my domain, mainly because thats all I have on my website for now and the for seeable future.

Thanks

Sanjiyan 02-20-2002 02:26 PM

Quote:

Originally posted by Gilby


I fixed the SQL in the first post. Please give this update a try. I removed the footer column at the last minute because I didn't implement any use for it and it might confuse some just by being there.

I have ran a file compare on the sql file I edited and your new one and they are exatcly the same so I shall refrane from uploading this one, as theres no changes to the code. Just thought I'd let you know.

dost 02-20-2002 02:26 PM

Quote:

Originally posted by Sanjiyan
nope no errors, just a blank white IE screen.

I didnt run it as cron, I just ran it from the address bar on IE, as I dont have access to cron and this will be ok with me, cos I can use MS TASK to run the url every 1 hour :P

Same thing happened to me, but I found a solution. I searched my machine and found a file called pear.php.in, then I copied it to my forum folder and renamed it to pear.php and it worked.

Gilby: Some Turks use both the Re: and Ynt: prefix for replies in newsgroups. What can I do to recognize posts starting with Ynt: prefix as replies?

Thanks for the great hack

Sanjiyan 02-20-2002 02:30 PM

Quote:

Originally posted by dost
Same thing happened to me, but I found a solution. I searched my machine and found a file called pear.php.in, then I copied it to my forum folder and renamed it to pear.php and it worked.

Gilby: Some Turks use both the Re: and Ynt: prefix for replies in newsgroups. What can I do to recognize posts starting with Ynt: prefix as replies?

Thanks for the great hack

I dont have complete access to my webhosts hard disk only to my website as it where, is it possible for you to send me that file and I can see if I can do the same? or do you want me to leave this to you Gilby?

dost 02-20-2002 02:33 PM

Well, I attached the pear.php that comes with my nusphere installation. I hope that's not illegal :)

And be careful about choosing an empty forum for the news posts. I was trying it on my computer and I chose an existing forum, then it posted 140 posts in a minute from my computer to the newsgroup. It was too late when I realized it and I had to apologize :surprised

Gilby 02-20-2002 02:37 PM

Quote:

Originally posted by dost
Same thing happened to me, but I found a solution. I searched my machine and found a file called pear.php.in, then I copied it to my forum folder and renamed it to pear.php and it worked.

Ah... I was puzzled. The only thing I could figure was that there were no newsgroups in the database. Since it looks like the PEAR is a problem, I'll have to modify the NNTP class to not require it.

Quote:

Originally posted by dost

Gilby: Some Turks use both the Re: and Ynt: prefix for replies in newsgroups. What can I do to recognize posts starting with Ynt: prefix as replies?

On line 124 and 125, replace those similar lines with:
Code:

if (eregi("^(Re:|Ynt:)", $message[subject])){
$subject = eregi_replace("^((Re:|Ynt:)[ ]*)+","",$message[subject]);


Sanjiyan 02-20-2002 02:39 PM

Quote:

Originally posted by dost
Well, I attached the pear.php that comes with my nusphere installation. I hope that's not illegal :)

And be careful about choosing an empty forum for the news posts. I was trying it on my computer and I chose an existing forum, then it posted 140 posts in a minute from my computer to the newsgroup. It was too late when I realized it and I had to apologize :surprised


still dont work, still getting a blank white screen with no error messages, with the status bar saying 'Done'

Gilby 02-20-2002 02:43 PM

Quote:

Originally posted by dost
And be careful about choosing an empty forum for the news posts. I was trying it on my computer and I chose an existing forum, then it posted 140 posts in a minute from my computer to the newsgroup. It was too late when I realized it and I had to apologize :surprised
Yeah, I should have mentioned that. Sorry about that. I added a little warning to the readme.txt.

dost 02-20-2002 02:43 PM

Quote:

Originally posted by Sanjiyan
still dont work, still getting a blank white screen with no error messages, with the status bar saying 'Done'
The instructions are a bit unclear for new users. You may have forgotten to go to the nntp_groups table with phpMyAdmin and say Insert. There you have to insert your newsgroup settings.

Sanjiyan 02-20-2002 02:47 PM

Quote:

Originally posted by dost
The instructions are a bit unclear for new users. You may have forgotten to go to the nntp_groups table with phpMyAdmin and say Insert. There you have to insert your newsgroup settings.
Like this:

Sanjiyan 02-20-2002 02:48 PM

and this:

Sanjiyan 02-20-2002 02:50 PM

are both of those database entries right?

Gilby 02-20-2002 02:59 PM

Quote:

Originally posted by Sanjiyan
are both of those database entries right?
Yeah it looks fine.

Try adding the folowing line near the top of gateway.php (after the <?php ):
error_reporting (63);

This will turn on all error reporting and it may give us something to go on.

Sanjiyan 02-20-2002 03:04 PM

urm same as before a blank screen

can one of you try: www.wocs.net/gateway.php ?


and I have this in the gateway.php

<?php
error_reporting (63);
/********************************************
NNTP (Usenet/Newsgroup) Gateway 1.0
By Kevin Gilbertson <mail@gilby.com>
Released: Feb. 20, 2002

For support, please visit the thread
at vbulletin.org
********************************************/

Sanjiyan 02-20-2002 03:10 PM

ahh now its just using hte progress bar, and its slowly so slowly moving across the status bar, yet its a white screen still.

I use phpstats to view the server stats on my webhost and it seems the ram usage is going up tho, so something is running. I think.

phpSysInfo 2.0 even

Sanjiyan 02-20-2002 03:15 PM

nope its not doing anything, again a white screen and bugger all is posted

if you goto www.wocs.net you will see the two test forums for the newgroups stuff in place both with 0 posts also :|


nah the gateway.php screen has locked with the status progress bar at 50% and it staying there.

Sanjiyan 02-20-2002 03:18 PM

ahh now I just refreshed it
and it says this:

<br>
<b>Warning</b>: Undefined index: HTTP_POST_VARS in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>88</b><br>
<br>
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /usr/home/wocsnet/public_html/global.php:85) in <b>/usr/home/wocsnet/public_html/admin/functions.php</b> on line <b>1530</b><br>

BTW: I removed the pear.php from my webspace, do I need that on the server for this to run?

Gilby 02-20-2002 03:28 PM

Sanjiyan, I added an output in the gateway.php that just outputs the number of newsgroups that are being gatewayed. That's in the first post. Try that one and let's see if it even gets that far in the script before dieing.

Sanjiyan 02-20-2002 03:35 PM

it does not get anywahere, it gave me a blank screen again, so I added that error code stuff to it and got this:

<br>
<b>Warning</b>: Undefined index: HTTP_POST_VARS in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>88</b><br>

Would you like me to add a dir listing of my forums directory to help?

Gilby 02-20-2002 03:39 PM

I'll modify the NNTP class so that it doesn't require pear. That could be the problem.

Sanjiyan 02-20-2002 03:39 PM

just did a refresh again and this code again:

<br>
<b>Warning</b>: Undefined index: HTTP_POST_VARS in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>85</b><br>
<br>
<b>Warning</b>: Undefined index: action in <b>/usr/home/wocsnet/public_html/global.php</b> on line <b>88</b><br>
<br>
<b>Warning</b>: Cannot add header information - headers already sent by (output started at /usr/home/wocsnet/public_html/global.php:85) in <b>/usr/home/wocsnet/public_html/admin/functions.php</b> on line <b>1530</b><br>

I am sorry for spamming this, but I would really really love to get this working in some manner, and I am greatful for the help and assistance you are providing

Sanjiyan 02-20-2002 03:41 PM

here is a jpg showing my root folder where my forums are located. its all there right ?

Gilby 02-20-2002 03:45 PM

Try the attached nntp.php which does not require PEAR.

GameCrash 02-20-2002 03:50 PM

Quote:

Originally posted by Gilby
Try the attached nntp.php which does not require PEAR.
both don't work for me :( Just a blank page...

GameCrash 02-20-2002 03:52 PM

Erm... does the script use UDP? I think this is disabled at my providers firewall...

Sanjiyan 02-20-2002 03:52 PM

well
I get no feed back from the script, nothing at all, bar the white screen, but the progress bar is at the 50% mark and suck there.

Could it be that there is a problem with the server or perl on the server? if so what perl mods are needed so I can ask my host support ?

but if you would, can you run the gateway.php from my site:

www.wocs.net/gateway.php

and see what happens, I have to go to dinner right now so I shall be back on in 20 minutes ok? if you could try that link for me and see what happens I'd be greatful.

Gilby 02-20-2002 03:56 PM

Quote:

Originally posted by Sanjiyan
Could it be that there is a problem with the server or perl on the server? if so what perl mods are needed so I can ask my host support ?
This script does not use perl, so there is no messing around with that sort of thing.

Do you know what version of php you are using?

GameCrash 02-20-2002 04:06 PM

Quote:

Originally posted by GameCrash
does the script use UDP?
Does it? If yes, then I don't have to test any more...


All times are GMT. The time now is 04:48 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.03838 seconds
  • Memory Usage 1,842KB
  • 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
  • (3)bbcode_code_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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