Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Gilby Gilby is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-19-2002 Last Update: Never Installs: 71
 
No support by the author.

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).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #952  
Old 05-13-2004, 01:21 AM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by memobug
Thanks allan for the suggestion and lierduh for the test. I really appreciate the help. It took me nearly a month of haggling to get that port opened!

I installed the debug version of nntp that allan suggests and got this


So I guess this is consistent with what lierduh reports in his trial. Is there another mail server to try before I subscribe to a news service or do my results suggest I am getting far enough along for a reasonable chance of success?

Any recommendation on which news service I should go with when I subscribe? I'm looking to bring in rec.arts.bonsai , which is a text-based service. My three main requirements are cheap, cheap and you-guessed-it.

The email mod built into gateway - for posting - seemed to be generating errors on my server, so I commented it out as recommended in another post here.

Regards,

Matt
Hmmm. I applied for one of those $2.95, five-day Newsranger evaluations and tried to pull in posts from rec.arts.bonsai for the past couple of days.

I got this message:

Quote:
1 group(s) gatewayed.
502 news: Transfer permission denied to (my ISP's machine's numerical IP appeared here)
Logging in to www.newsranger.com, group rec.arts.bonsai
UPDATE: this problem was corrected by using client.newsranger.com instead of www.newsranger.com so things are looking good now!
Regards,

Matt
Reply With Quote
  #953  
Old 05-13-2004, 06:02 AM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Things are looking good now, but I have a question pertaining to follow-up gateway.php synchronization. I want to be careful not to import the same records or export them!

A) Do I run setlastmessage.php

1) ...before every gateway import
2) ...after every gateway import

and

B) Do I run it only once or every time I run gateway?

The Readme isn't clear. It says:

Quote:
If you want to automatically set the newsgroups to only import new messages, upload the setlastmsg.php to your vbulletin folder and run it.
Looking at the code, it appears I need to run it AFTER gateway and possibly EVERY time to keep the lastmsg counter updated.

Thanks,

Matt
Reply With Quote
  #954  
Old 05-13-2004, 07:06 AM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by memobug
A) Do I run setlastmessage.php

Matt
That is only for people who do not want to import all the existing messages on the server. So run it once only at the installation if needed. Don't blame no posts are imported if you do decided to run. :nervous:
Reply With Quote
  #955  
Old 05-13-2004, 07:08 AM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hubba
>themes

Boy ME and my english sorry. I mean THREADS... I have the "total new threads since last visit" and "total new postings since last visit" link in the forum. Excluded the NG Forums, that works fine, they dont show up if one searches for new postings, but the NG posts still COUNT. So, i.e. no "real" new posts in the forum, but 3 new in the NG forum = "3 new postins since last visit". I just wanna make a "Totalposts" = xxx - NGposts = realposts.
Sorry, we are running different vBulletin. :surprised: I don't have these links.
Reply With Quote
  #956  
Old 05-13-2004, 02:23 PM
hubba hubba is offline
 
Join Date: Dec 2003
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>different

Maybe I mean the $newposts[count] und $activethreads[count] variables. They count ALL including the NG posts. The exclude statement only shows them not up, but counts it....
Reply With Quote
  #957  
Old 05-13-2004, 05:52 PM
himerus himerus is offline
 
Join Date: Nov 2003
Location: Denver, CO
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lierduh,

There is a BIG error in your code in function sendnews.

PHP Code:
if (!$isreply){
   
$DB_site->query("UPDATE " TABLE_PREFIX "thread 
     SET msgid = '<"
.addslashes($msgid).">', 
     prefix = '"
.$prefix[$newthread['forumid']]."'");

There is No WHERE clause in the query.

After using this, EVERY thread in my DB has been updated with the new msgid from the latest new thread created in the newsgroup forums.

Any way to fix this? By fixing this, I mean, resetting all the msgid's to the correct ones, or removing values where they don't belong in the thread table?
Reply With Quote
  #958  
Old 05-13-2004, 05:56 PM
himerus himerus is offline
 
Join Date: Nov 2003
Location: Denver, CO
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Corrected code:

PHP Code:
if (!$isreply){
   
$DB_site->query("UPDATE " TABLE_PREFIX "thread 
     SET msgid = '<"
.addslashes($msgid).">', 
     prefix = '"
.$prefix[$newthread['forumid']]."'
     WHERE threadid=
{$newthread['threadid']}");

If you've got any suggestions on a quick script to repair those corrupted fields, I would be greatly appreciative. I'm not sure what effect this error, and now having a incorrect msgid on EVERY thread in the DB might or might not cause. I'm not even sure what effect that field has in general to future postings. Could I just reset all those values to empty?
Reply With Quote
  #959  
Old 05-13-2004, 07:31 PM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got a little trouble here too, lierduh
Code:
Database error in vBulletin 3.0.1:

Invalid SQL: UPDATE post AS post, thread AS thread SET isusenetpost = 1 WHERE 
	post.threadid = thread.threadid AND 
	isusenetpost = 0 AND
	thread.forumid NOT IN (25,27,29,34)
mysql error: You have an error in your SQL syntax near 'AS post, thread AS thread SET isusenetpost = 1 WHERE 
	post.threadid = thread.th' at line 1

mysql error number: 1064

Date: Thursday 13th of May 2004 04:24:04 PM
Any thoughts?
Reply With Quote
  #960  
Old 05-13-2004, 08:54 PM
himerus himerus is offline
 
Join Date: Nov 2003
Location: Denver, CO
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine's also not assigning posts to the proper thread after this change. I'm going to look over the code again for another hour or so, and revert to my last version if I can't get it working properly.

Messed up part is, the posting via the vB adminCP scheduled tasks worked after only minimal tweaking of the new script, and I have it tested to successfully post properly. (which was my only problem before)

I think the main problem is coming from the references. They don't seem to be assigning at all anymore.
Reply With Quote
  #961  
Old 05-13-2004, 09:13 PM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No need to worry, although thank you very much for pointing out.

the msgid in the thread table is not actually used. So it does not cause any problem at all. You can safely comment this section out. I have got a new version ready to be uploaded including an optional "X-No-Archive" header honouring. Allan will love this.

I am thinking of getting rid of this field altogether. Saving a field or index is always a good thing.

(by the way, the error is inherited from the original script)

Quote:
Originally Posted by himerus
Lierduh,

PHP Code:
if (!$isreply){
   
$DB_site->query("UPDATE " TABLE_PREFIX "thread 
     SET msgid = '<"
.addslashes($msgid).">', 
     prefix = '"
.$prefix[$newthread['forumid']]."'");

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05434 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete