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)

PhoenixBB 07-07-2003 06:03 AM

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?

Bro_Joey_Gowdy 07-08-2003 01:52 PM

will this now be compatable with vb3.0.0 ??

alesis404 07-23-2003 06:14 AM

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

lierduh 07-25-2003 02:41 PM

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

lierduh 07-25-2003 02:51 PM

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

alesis404 07-26-2003 10:02 PM

problem fixed thanks to Erwin ;)

lierduh 07-27-2003 12:54 PM

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]"); 


floridaideal 08-01-2003 02:57 PM

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

poolking 08-01-2003 07:27 PM

I hope this is going to upgraded for vb3. :)

poolking 08-01-2003 07:28 PM

Sorry, only just noticed double post.


All times are GMT. The time now is 03:56 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.01948 seconds
  • Memory Usage 1,858KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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