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
  #582  
Old 07-07-2003, 06:03 AM
PhoenixBB PhoenixBB is offline
 
Join Date: May 2002
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am I right in assuming that if I change this:

Quote:
// index for searching
indexpost($postid,1);
in the gateway file, to '0' then it won't index the posts in the searchindex table? And it won't affect the functioning of the 'View New (Usenet)Posts' thingy?

I like having the View New Usenet Posts alongside the normal one, but I just don't want the posts adding to my index. So changing to 0 will fix it right?
Reply With Quote
  #583  
Old 07-08-2003, 01:52 PM
Bro_Joey_Gowdy's Avatar
Bro_Joey_Gowdy Bro_Joey_Gowdy is offline
 
Join Date: May 2002
Location: Hickory Flat MS 38633
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this now be compatable with vb3.0.0 ??
Reply With Quote
  #584  
Old 07-23-2003, 06:14 AM
alesis404 alesis404 is offline
 
Join Date: May 2003
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I recently moved my vbb to another server and get this error now when trying to manually sync my newsgroups from the cP...anybody know what it is and how I fix it, thank you

Quote:
Warning: Unable to access ../class.POP3.php3 in /home/virtual/site1/fst/var/www/html/forums/gateway.php on line 31

Warning: Failed opening '../class.POP3.php3' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site1/fst/var/www/html/forums/gateway.php on line 31
Reply With Quote
  #585  
Old 07-25-2003, 02:41 PM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-22-02 at 07:27 PM Gilby said this in Post #269
I think I fixed it a while ago, but I must not have updated it in this thread. So, I've uploaded my latest version. The problem that i am assuming is the case here is that I did not have it match the subject correctly by using the htmlentities function as that's how they are stored in the database (ie. a " would be &quot; in the database, thus they don't match).

Also in this version is a bug fix for long threads that would have tons of references. Some nntp servers complain if this header gets too big, so this fixes that.

E-mail gateway support
Also in this version, you can now gateway with email. This will fetch emails from a POP email account and send via th mail account 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 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).
I am using version 1.9, but I too have the sorting problem. I have noticed the last reference picks up the wrong Message-ID.

I have not checked into the codes. Anyone has a quick fix?

The code use "include()", I vaguely remember it has some sort of security problem and I have changed them to "require_once()".
Reply With Quote
  #586  
Old 07-25-2003, 02:51 PM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
06-22-03 at 08:43 AM mr.children said this in Post #566
how come i am getting those errors?
please...tell me, i have installed everyhintg

Warning: main(class.POP3.php3) [function.main]: failed to create stream: No such file or directory in /home/virtual/site13/fst/var/www/html/bbs/gateway.php on line 25
...

You must have already fixed this. For the sake of someone else, the problem is caused by missing class.POP3.php3 file. The v1.9 release contains this file, but the ReadMe is out of date and only asks to update three files excluding this class file. You can either upload this file, or simple "//" out the line: include("class.POP3.php3")
Reply With Quote
  #587  
Old 07-26-2003, 10:02 PM
alesis404 alesis404 is offline
 
Join Date: May 2003
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

problem fixed thanks to Erwin
Reply With Quote
  #588  
Old 07-27-2003, 12:54 PM
lierduh lierduh is offline
 
Join Date: Jan 2003
Location: Sydney, Australia
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit: 2 Nov 2003.

I have mucked around a bit more to get this to work under vBulletin Version 3. A new post can be found here:

https://vborg.vbsupport.ru/showpost....&postcount=658

Quote:
07-26-03 at 02:41 AM lierduh said this in Post #584
I am using version 1.9, but I too have the sorting problem. I have noticed the last reference picks up the wrong Message-ID.
Ok, I fixed the References problem. Not a elegant way, but I post here anyway for someone who tries to do something similar, or even for me to remember what I did. I have not really tested the codes by the way.

1) Add two columns to post table.

ref (type: Text)
pre_postid (type: int, length:10)

2)hack newreply.php

diff newreply_old.php newreply.php

PHP Code:
26a27,30
> if (isset($pre_postid)) {
>   
$pre_postid=(int)$pre_postid;
> }

305c309
<       $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
---
>       
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,pre_postid) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible','$pre_postid')"); 
3) Modify template: newreply

Find: <input type="hidden" name="threadid" value="$threadid">
add a line
<input type="hidden" name="pre_postid" value="$postid">

4) Modify gateway.php

diff gateway_old.php gateway.php

PHP Code:
20c20
< include("global.php");
---
> require_once(
"global.php");
23c23
< include("nntp.php");
---
> require_once(
"nntp.php");
25c25
< include("class.POP3.php3");
---
//require_once("class.POP3.php3");
27c27
< include("mime.php");
---
> require_once(
"mime.php");
66c66
<       $get_newthreads=$DB_site->query("SELECT post.postid,post.username,post.userid,post.dateline,post.attachmentid,post.pagetext,post.showsignature,post.ipaddress,thread.pollid,thread.title,post.threadid,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="implode(" OR thread.forumid="$group[forum]) . ")");
---
>       
$get_newthreads=$DB_site->query("SELECT post.postid,post.username,post.userid,post.dateline,post.attachmentid,post.pagetext,post.showsignature,post.ipaddress,thread.pollid,thread.title,post.threadid,thread.forumid,post.pre_postid 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="implode(" OR thread.forumid="$group[forum]) . ")");
74c74
<       $get_newposts=$DB_site->query("SELECT post.postid,post.username,post.userid,post.dateline,post.attachmentid,post.pagetext,post.showsignature,post.ipaddress,thread.title,post.threadid,thread.forumid,thread.msgid,thread.prefix FROM thread,post WHERE post.isusenetpost=0 AND thread.threadid=post.threadid AND (thread.forumid="implode(" OR thread.forumid="$group[forum]) . ")");
---
>       
$get_newposts=$DB_site->query("SELECT post.postid,post.username,post.userid,post.dateline,post.attachmentid,post.pagetext,post.showsignature,post.ipaddress,thread.title,post.threadid,thread.forumid,thread.msgid,thread.prefix,post.pre_postid FROM thread,post WHERE post.isusenetpost=0 AND thread.threadid=post.threadid AND (thread.forumid="implode(" OR thread.forumid="$group[forum]) . ")");
125a126,132
>                               if ($message[references]){
>                                       
$elements=imap_mime_header_decode($message[references]);
>                                       
$message[references] = '';
>                                       for(
$i=0;$i<count($elements);$i++) {
>                                           
$message[references] .= $elements[$i]->text;
>                                       }
>                               }
214,216c221,223
<                                       }
<                                       
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,isusenetpost,msgid) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($message[subject]))."','".addslashes(htmlspecialchars(from_name($message[from])))."','0','".$date."','$attachmentid','".addslashes($message[text])."','1','0','".addslashes(htmlspecialchars(from_email($message[from])))."','0','1','1','".addslashes($message[msgid])."')");
<                                       
$postid=$DB_site->insert_id();
---
>                                       }
>                                         
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,isusenetpost,msgid,ref) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($message[subject]))."','".addslashes(htmlspecialchars(from_name($message[from])))."','0','".$date."','$attachmentid','".addslashes($message[text])."','1','0','".addslashes(htmlspecialchars(from_email($message[from])))."','0','1','1','".addslashes($message[msgid])."','".addslashes($message[references])."')");
>                                         
$postid=$DB_site->insert_id();
258c265
<                                       $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,isusenetpost,msgid) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($message[subject]))."','".addslashes(from_name($message[from]))."','0','".$date."','$attachmentid','".addslashes($message[text])."','1','0','".addslashes(from_email($message[from]))."','0','1','1','".addslashes($message[msgid])."')");
---
>                                       
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,isusenetpost,msgid,ref) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($message[subject]))."','".addslashes(from_name($message[from]))."','0','".$date."','$attachmentid','".addslashes($message[text])."','1','0','".addslashes(from_email($message[from]))."','0','1','1','".addslashes($message[msgid])."','".addslashes($message[references])."')");
608,613c615,617
<                       $get_attachinfo=$DB_site->query("SELECT msgid FROM post WHERE threadid=$newthread[threadid]");
<                       
$ref '';
<                       while (
$thisref=$DB_site->fetch_array($get_attachinfo)){
<                               if (
$thisref[msgid] and strlen($ref) < 600){ $ref .= "$thisref[msgid] "; }
<                       }
<                       
$ref "\r\nReferences: ".wordwrap($ref210"\r\n        ");
---
>                       
$get_references=$DB_site->query_first("SELECT msgid,ref FROM post WHERE postid=$newthread[pre_postid]");
>                       
$references $get_references[ref] . " " $get_references[msgid];
>                       
$ref "\r\nReferences: ".wordwrap(stripslashes($references), 210"\r\n        ");
629c633
<                       $DB_site->query("UPDATE post SET isusenetpost = -1, msgid = '<".addslashes($msgid).">' WHERE postid=$newthread[postid]");
---
>                       
$DB_site->query("UPDATE post SET isusenetpost =1, msgid ='<".addslashes($msgid).">' , ref = '".$references."' WHERE postid=$newthread[postid]"); 
Reply With Quote
  #589  
Old 08-01-2003, 02:57 PM
floridaideal floridaideal is offline
 
Join Date: Aug 2002
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello all

Hope someone can please help me, I have installed this wonderful hack and seem to have got it all working fine, it downloads new posts and replys to the 2 newsgroups.

Anyway my problem is that the posts posted on my forum don't post on the newsgroups. I have posted one post and a reply and its been 3 hrs and still not appeared on the newsgroup.

Out of interest I have posted via Outlook a message to the newsgroup and then within about 10 mins it appeared on my forum.

Has anyone had this problem please and can point me in the right direction? Thanks very much

Stuart
Reply With Quote
  #590  
Old 08-01-2003, 07:27 PM
poolking poolking is offline
 
Join Date: Aug 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope this is going to upgraded for vb3.
Reply With Quote
  #591  
Old 08-01-2003, 07:28 PM
poolking poolking is offline
 
Join Date: Aug 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, only just noticed double post.
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 06:29 AM.


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.06656 seconds
  • Memory Usage 2,401KB
  • 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
  • (2)bbcode_php
  • (5)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
  • (3)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