PDA

View Full Version : NNTP Gateway (Usenet/Newsgroups)


Pages : 1 2 [3] 4

Gilby
03-06-2003, 01:43 AM
Originally posted by Schorsch
great hack!! :bunny: some questions:

how can I leave out the signatures and user titles when posting to a group ?

edit: and how can I change the quote color ?

and when I look into a thread I can't see the poster name, always just "guest"

You'll need to edit the code and change the signature part of it to not have those variables in it.

To change the color, find in the code where it has "[color=blue]" and change those three lines to have the colors you want.

Gilby
03-06-2003, 01:48 AM
Originally posted by Marv
Couldn?t there be a way that this hack reads out the mail-adress from the database and takes that as signature ?

The real email address is not used simply because of email addresses being harvested as spam. What I do on my set up is have a unique domain for the email address used and then set up a catch all for the domain with an auto responder that gives details on how to reply to the user.

- Gilby

Gilby
03-06-2003, 01:52 AM
Originally posted by Marv
Oups..forgotten: does anybody know if this hack works with the 3.0 RC3 ?

Give it a try and let us know! :)

Did you mean 2.3 RC3? IT'd probably work with that one, but might not with 3.0 as many thing may have changed.

Chris732
03-06-2003, 02:17 AM
Gilby... I must say this was a wonderful hack and I have really enjoyed it on my site...Thanks again.

Oh btw... any plans on adding a way to handle newsgroup attachments with it?

Marv
03-06-2003, 02:20 AM
Originally posted by Gilby


The real email address is not used simply because of email addresses being harvested as spam. What I do on my set up is have a unique domain for the email address used and then set up a catch all for the domain with an auto responder that gives details on how to reply to the user.


Hi Gilby,

it?s good to see you?re still alive & typing ;)

What you suggested is what I already did. You know that "The good, the bad & the ugly...?" Guess the people on our german newsservers are very familiar with that and they insist to match the standard how a ng-post should be. That?s the reason for all the flames we receive...

And this nationwide standard (uh...have I told you that I?m talking about german newsgroups, yet..?) a post has to have two things:

- a proper emailadress to reach the poster and to retrace the post back to the poster

The second one is the thing I mentioned about the signature.
If a post is delivered to a ng via a gateway there has to be an adress for technical questions or in case of abuse. That?s why I suggested the quoted signature..

Okay...I read that you?ve got other projects and your time to give support to this hack is running out.
Don?t know how to say it...but would it be very impudent to ask you if you could do these minor changes for the europeans here on board .. ? :rolleyes:

I would do it on my own - be sure - but I?m just not good in coding...umm..that means most of the time php looks to me like a bunch of celtic cuneiform script mixed with oxford english.... :alien:

Any chance you could look into it on a short moment between riding your doublewheeled unicycle und the shower ? (Btw: unicycling looks completely arduous the way you do it :) )

Thanks for stopping by !

Gardener
03-06-2003, 02:52 PM
Originally posted by Gilby


Give it a try and let us know! :)

Did you mean 2.3 RC3? IT'd probably work with that one, but might not with 3.0 as many thing may have changed.

Yes it does work with 2.3 RC3. I've got it running on a board with about 200,000 posts and it works just fine.

Duke Of Lion
03-07-2003, 12:07 PM
I want to add the cronjob (automatically update news)

What is the command line on a linux server with C-Panel? Just go into the cron jobs tab and then command is simply http://www.mysite.com/forum/gateway.php ? or do i need to add cron or something

gopherhockey
03-07-2003, 12:32 PM
Set up a cron job in the cron job areas of cpanel (toward the bottom I believe) - if you want them to run ever 10 minutes you may have to set up multiple jobs - at least for me, I wasn't able to do a 5,15,25 etc. in the minutes column, so I set a separate one up for 5 * * * *, 15 * * * * etc.

use this:

lynx -source http://mysite.com/forums/gateway.php?log=cron >/dev/null

Gilby
03-07-2003, 02:58 PM
Originally posted by Chris732
Oh btw... any plans on adding a way to handle newsgroup attachments with it?

It partially handles them now, just not the uuencoded ones. If you can find some php code that decodes uuencoded text, then it wouldn't be too hard to add.

gopherhockey
03-08-2003, 07:51 PM
I'm struggling to keep this hack turned on in my forums. Here is the issue:

Users love the usenet forum that I have included. However, it gets hundreds of posts per day, and they don't like seeing those when they come to the system each day and click to "view new posts".

I have that *almost* fixed, but not quite.

First, I removed the forumid from the search function, so even if it shows new threads and forums since they last visited, all those won't appear when they click to "view new posts"

Next step was to not get new threads and posts to show up. I was able to do the threads part using another guys code example... however, I still haven't found a way around the posts part.

Basically I want the forum to work as usual, except that I don't want any of the posts or threads being counted by anything in the vb system or showing up in views such as this one:

Members: XX, Threads: YY, Posts: ZZ

Is this possible? Perhaps a line of code that is incrementing the post and thread count total can simply be removed?

Thanks...

Schorsch
03-09-2003, 05:43 PM
I uninstalled this hack, same reason like gopherhockey posted above.

Marv
03-10-2003, 12:29 AM
I told you about the problems in german newsgroups and about the problem with the email-adresses. This is solved now.
But now I?m struggling with something different.

I noticed that postings which have been send via the gateway don?t have proper headers and - you guessed it - on german newsservers this is like a spike in the flesh and it?s raining flames.

Okay - that?s the prolog..now facts:

mime.php should encode the outgoing posts in line 132 - 177 :

/*!
-- MIME Encoding --
send() - create the mime message and send it to the listed recipients.
*/
function send() {

srand((double) microtime()*1000000);
$rnum = rand();

$boundary = "=_".md5($rnum);

$message = "This message is in MIME format.\n\n";

foreach($this->attachments AS $attachment) {

$message.= "--".$boundary."\n";
$message.= "Content-Type: ".$attachment["content-type"];
if ($attachment["content-type"] == "text/plain") {
$message.= "; charset=ISO-8859-1\n";
$message.= "Content-Transfer-Encoding: Quoted-Printable\n\n";
$message.= $this->quoted_printable_encode($attachment["contents"])."\n";
} else {
$message.= "; name=\"".$attachment["filename"].
"\"\nContent-Transfer-Encoding: base64\n";
$message.= "Content-Disposition: attachment; filename=\"".
$attachment["filename"]."\"\n\n";
$message.= chunk_split(base64_encode($attachment["contents"]))."\n";
}

}
$message.= "--".$boundary."--\n";

$headers = "MIME-Version: 1.0\n";
$headers.= "Content-Type: multipart/mixed;".chr(10).chr(9).
"boundary=\"$boundary\"";

if (is_array($this->headers)) {
foreach($this->headers AS $header) {
$headers.= "\n$header";
}
}

foreach($this->recipients AS $email) {
mail($email, $this->subject, $message, $headers);
}

}



So far mime.php should encode the headers with:

Mime-Version: 1.0
Content-Type: multipart/mixed


The body should be encoded with MIME, too :

Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: Quoted-Printable


But as As far as I can see mime.php isn?t doing what it should. It doesn?t encode the headers of outgoing posts and it doesn?t encode the body nor it adds the lines

Mime-Version: 1.0
Content-Type: ...
Content-Transfer-Encoding: ..


to the headers.

In other words: it seems that it?s doing nothing at all.
Could someone please have a look what?s happening there ? It?s now the third night and actual 3.04 AM and I?m about to go crazy about this thing... :paranoid:


Note:
In my files I changed the values to

Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

because that?s the german nationwide standard.

gopherhockey
03-10-2003, 05:30 PM
This from logican from another conversation on possibly making posts invisible that are generated from this hack. Anyone want to try this with this hack??

---

A work around might be using this trick:
Hack your gateway hack so that it posts with a special username (a fake username
that does not belong to any member but a bot). Then you can exclude it in your
query to get accurate results: Eg.


$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread
WHERE lastpost > '$bbuserinfo[lastvisit]' AND forumid!=X");

$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE
dateline > '$bbuserinfo[lastvisit]' AND username!=X");



In order to fix this, we need to know how to get the gateway script to post as a user, not as "guest" as it seems Guest is not really treated as a regular account.

Someone else asked the question, but I don't believe anyone has answered it.

Anyone know how to get the script to use a real userid when posting? Say I create a user "NNTPGateway" ??

Thanks - this could POSSIBLY allow me to turn this back on.

gopherhockey
03-10-2003, 07:55 PM
I did it... you use the userid instead of username...

To ignore posts totals from the NNTP Newsgroup, simply edit your index.php and change:

$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');

to:

$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post WHERE userid!=0');


If you run a script such as webwelcome where it picks out the number of posts since the user last logged in, just find the line:

$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");

and change to:

$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]' AND userid!=0");


You can do this for the threadcount as well - just use

thread WHERE forumid!=XX (where XX is the NNTP forum)


Now, I can turn this sucker back on!

JF1980
03-22-2003, 09:42 AM
Why would I want to use this hack over the original when it lacks features of the original?

gopherhockey
03-22-2003, 01:09 PM
What features are lacking?

IMHO this one was much better than the other, but I'm interested to see what you find in the other one that this one doesn't have.

JF1980
03-22-2003, 04:39 PM
Well:

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.

So what advantage does this version offer over the original that makes it worth dropping these features?

gopherhockey
03-22-2003, 04:44 PM
I'm not all that familiar with the "original" other than that it did not work with my 2.2.9 version and this one did. I also believe the pop3 features (email to a forum and to list) were not available in the other one at the time. Most the other features you list seem to be built into vb, so why would they need to be included in a hack?

I guess if you are so happy with the original, why not just stick with it.

Perhaps someone familiar with both can post here what the difference are. All I know is that this one worked without an issue and does everything I wanted (and more) in an NNTP gateway for vb.

JF1980
03-22-2003, 04:56 PM
Well I don't have either yet and am trying to make a choice on which to go with. I was hoping someone who has used both could give advise.

What are these POP features then and why would I want them?

Basically, I want to be able to use 4 or 5 newsgroups on my site as forums. I want to have it syncronize with the news server every 10 mins (at longest, maybe less), I want to allow only registered members to post through the board and to have a footer put at the bottom of every post made from the board with a link to the site (e.g "Posted via www.thrill-seekers.net". Im not sure about expiry and deletion of out of date posts, I guess it would be ideal if they were removed from the board when they dropped off the news server, or maybe even if they stayed there for 30 days, then were automatically deleted (with useful threads being manually moved to other forums). Does this sound within the scope of this hack?

gopherhockey
03-22-2003, 05:02 PM
This hack does what you are asking. There is a footer stuck in there showing a link to your profile and a link to the thread where the message was posted etc.

Expiring stuff can be handled by vb automatically - you can set how long you want to keep things and purge what you don't wish to keep. (lets you keep things around longer than your server, in case you want it there for reference etc.)

I use the pop3 feature to be able to email directly to a forum. (but only use this sparingly and don't advertise the address to many) - e.g. I subscribe to various sales or subscription emails that are related to my boards content and have those automatically show up in a forum as a post without having to do it manually. SPAM for this is controlled by my own server before it gets to the email account, then the hack pulls the messages using pop3 from my server.

I even set it up so posts going to my forums via NNTP are not counted in the rest of my vb systems statistics, so users aren't flooded with usenet garbage when they log in, but only see actual posts from local (registered) users.

But like I said, I haven't played with the other one much since it did not work for me initially. From what I remember I too compared them and liked some of the features this one had - plus it seems to get more support. I could be wrong, I'm sure the other one is good too. I know you won't go wrong with this one though, it is one of the most useful hacks I have (and may even cause me to wait before upgrading to vb3 until the hack is made compatible)

Hope that helps?

Marv
03-22-2003, 10:12 PM
gopherhockey,

I even set it up so posts going to my forums via NNTP are not counted in the rest of my vb systems statistics, so users aren't flooded with usenet garbage when they log in, but only see actual posts from local (registered) users.

can you tell us exactly what you did to stop that ?

JF1980
03-23-2003, 03:27 AM
look up

JF1980
03-23-2003, 04:57 PM
Im running 2.2.6 (not sure if that matters), I setup a test box and added this hack to it. It sucks posts in ok, but posts made to the newsgroup do not appear on the groups. Is this a knowsn problem, it's making me mad!!!

Take a look, http://jf.myftp.org the forums is called TEST under the General Forums

Gardener
03-23-2003, 05:24 PM
After you post the reply, go into your admin control panel and click on "Manual Syncronisation". What does the screen say? Are you getting any error messages? I'm using it on my new site and don't have any problems.

JF1980
03-23-2003, 05:29 PM
It says it is posted ok!

Im using ultrafeed news server if that is important...

Gardener
03-23-2003, 07:38 PM
I could be the news service you use. I have seen some that will take several hours for a post to show up after it was made.

Gilby set up a test server here (https://vborg.vbsupport.ru/showthread.php?postid=221844#post221844) that you can use to make sure that everything is working. Try that and see if the posts show up.

MaXxed
03-24-2003, 02:06 AM
Ive been having issues with my news provider over spam messages being posted to usenet thru my board. Do you guys moderate your outgoing posts? Does it work well with the hack?

tpearl5
03-24-2003, 10:37 PM
I can't get past gateway.php connecting to the server. It doesn't import or export messages at all. I've read throught his thread as much as possible, what can be missing?

Gardener
03-25-2003, 09:49 PM
Today at 12:37 AM tpearl5 said this in Post #528 (https://vborg.vbsupport.ru/showthread.php?postid=372702#post372702)
I can't get past gateway.php connecting to the server. It doesn't import or export messages at all. I've read throught his thread as much as possible, what can be missing?

What news server are you using? Are you getting any error messages? If you are trying to use your ISP's news server they may have it set so that it will not accept connections from outside the network.

Try the test server posted here (https://vborg.vbsupport.ru/showthread.php?postid=221844#post221844) and see if you can connect to it. If you can, then it's your news provider.

If you still can't get it working, PM me and I'll see if I can help.

JF1980
03-26-2003, 06:22 PM
Ok, I sort of have this working. Few questions:

1. Is there a way of making the reply address the same for any user (e.g. usenet@thrill-seekers.net) and then having a cron job checking this account every x mins and then importing any replies to threads into the newsgroup forum? Im sure someone must have done this already.

2. Have a weird issue, I post to free.teranews.com, in outlook express I can't see my posts on either teranews.com or ultrafeed.com servers but they show up on my ISP's server?!? Can anyone see a post on rec.aviation.hang-gliding ?

3. How regularly can I have a cron job running gateway.php without making the server slow down to a halt and being thrown out by my host (powweb)? 5mins, 10mins? If you want to see the size of the newsgroups I will be using then take a look at http://jf.myftp.org (my test box). I guess I will have about 6-7 other groups on my live site all of similar size.

4. What is the best way to stop my DB going over my 250MB server disk limit? I guess I should clear out posts once they are 30 days old or so, VBAdmin doesn't do this so I guess I will have to run a cron job, are there any good scripts already out there for this purpose?

Thanks.

Justin

SRozhon
03-31-2003, 04:15 PM
Gilby, this is so great! Thank you so much for this #1 Hack!!!

SRozhon
04-01-2003, 01:55 PM
When I do Manual Sync all goes fine but if put address in browser I get a promt box to save or open gateway.php??? When I say open I get an error and it opens notepad. Why would this be happening?

peterjun
04-08-2003, 03:59 AM
So how do you setup the email features? There doesn't appear to be instructions! Thanks!

04-04-02 at 11:50 PM Gilby said this in Post #320 (https://vborg.vbsupport.ru/showthread.php?postid=236578#post236578)
That's exactly what it means. It can also send posts to an email address too.

peterjun
04-08-2003, 04:22 AM
Now I am getting this issue as well... any help?

03-24-02 at 04:29 PM renaud_ said this in Post #282 (https://vborg.vbsupport.ru/showthread.php?postid=232376#post232376)
Hi,

thanks for all,

i can't gateway an POP3 account ...

I can't understand what's the mistake ...

Any idea ?

peterjun
04-08-2003, 04:33 AM
Nevermind... I searched in the class.POP3.php3 file for the noop line. There's a sequence that says: Changes are where there are ***.

}
$this->FP = $fp;
$this->BANNER = $this->parse_banner($reply);
$this->RFC1939 = $this->noop();
if($this->RFC1939)
{
$this->ERROR = "POP3: premature NOOP OK, NOT an RFC 19$
*** //$this->quit();
*** return true; }
return true;

MaXxed
04-08-2003, 03:34 PM
I have my usenet forums moderated on all posts, yet the script is posting messages to usenet anyway. How can I avoid spamming usenet? I've asked this question before but am now stumped, any help anyone?

peterjun
04-08-2003, 05:41 PM
Is there a way to show the poster's email address in the forum post? Perhaps at the start of the message?

"From <email here>"

Thanks!

Also, how do I disable sends from the forum to the newsgroups?

Gardener
04-08-2003, 08:49 PM
MaXxed and peterjun,

You might want to look at the usenet hack located at:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=22599

It allows you to do what both of you are asking for. It works better for me than this hack does.

mood
04-14-2003, 07:24 AM
VB 2.3
When I run gateway.php I'm getting
"Invalid SQL: UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='1046023251',lastpost er='Peter' WHERE forumid IN ()
mysql error: You have an error in your SQL syntax near ')' at line 1
"
heeeeeeeeeeelp
Thanks

Mood

willms_jay
04-25-2003, 10:19 AM
does this hack work with

version: 2.3.0

or

version : 2.2.9?

..thanx

jordan willms

Sanjiyan
04-25-2003, 10:28 AM
works with both 2.2.9 and 2.3.0

works with both 2.2.9 and 2.3.0

I've been using this nntp hack since gilby originally made it, and its worked with every vbulletin since 2.2.3

Sanjiyan
04-25-2003, 10:30 AM
04-08-03 at 06:41 PM peterjun said this in Post #537 (https://vborg.vbsupport.ru/showthread.php?postid=379301#post379301)
Is there a way to show the poster's email address in the forum post? Perhaps at the start of the message?

"From <email here>"

Thanks!

Also, how do I disable sends from the forum to the newsgroups?

The email one I dont know, but to stop your board from sending posts onto usenet, just set up the access masks to allow people to view the posts or threads, but not post/reply/create etc.

Sanjiyan
04-25-2003, 10:35 AM
03-26-03 at 08:22 PM JF1980 said this in Post #530 (https://vborg.vbsupport.ru/showthread.php?postid=373708#post373708)
[B]Ok, I sort of have this working. Few questions:

1. Is there a way of making the reply address the same for any user (e.g. usenet@thrill-seekers.net) and then having a cron job checking this account every x mins and then importing any replies to threads into the newsgroup forum? Im sure someone must have done this already.

For the email you can try this, you need to edit a entry in the database, in the table: nntp_settings

The title is: Email address domain

Change the value: timelimit.yourserver.com
To what ever you need, I dont know if this works 100% but by the look of it, and what the description of it says, it should do.

As for the cron job, I do it a simple way and use MS Task scheduler, just point it to iexplorer.exe (or what ever browser) like this:

"C:\Program Files\Internet Explorer\iexplore.exe" http://theborg.cjb.net/borg/forums/gateway.php

The above is all one line, you can see if it works via wacking it in your RUN command line from the Start Menu (for us Windows users)


3. How regularly can I have a cron job running gateway.php without making the server slow down to a halt and being thrown out by my host (powweb)? 5mins, 10mins? If you want to see the size of the newsgroups I will be using then take a look at http://jf.myftp.org (my test box). I guess I will have about 6-7 other groups on my live site all of similar size.

Have it as often as you like, I have it every 20 minutes.

4. What is the best way to stop my DB going over my 250MB server disk limit? I guess I should clear out posts once they are 30 days old or so, VBAdmin doesn't do this so I guess I will have to run a cron job, are there any good scripts already out there for this purpose?

Use the Search system


Thanks

Sanjiyan
04-25-2003, 10:39 AM
04-08-03 at 04:34 PM MaXxed said this in Post #536 (https://vborg.vbsupport.ru/showthread.php?postid=379257#post379257)
I have my usenet forums moderated on all posts, yet the script is posting messages to usenet anyway. How can I avoid spamming usenet? I've asked this question before but am now stumped, any help anyone?


See my post above, or click on this link

https://vborg.vbsupport.ru/showthread.php?postid=386862#post386862

Sanjiyan
04-25-2003, 10:43 AM
04-01-03 at 03:55 PM SRozhon said this in Post #532 (https://vborg.vbsupport.ru/showthread.php?postid=376364#post376364)
When I do Manual Sync all goes fine but if put address in browser I get a promt box to save or open gateway.php??? When I say open I get an error and it opens notepad. Why would this be happening?

Its your IE settings you need to reset them and it should work.

peterjun
04-25-2003, 01:58 PM
works under 2.3.0 for me.

Sanjiyan
05-03-2003, 02:48 AM
I've recently changed servers, and I am now getting this error when I try and pick up POP3 posts:

POP3: premature NOOP OK, NOT an RFC 1939 Compliant server

The only thing that is different is the server environment, ie its a different webserver.

Any ideas on how to fix this, so I can use the POP3 function again and feed my mailing lists to the forums?

Erwin
05-08-2003, 11:22 PM
Any tricks or advice regarding avoiding the gateway.php from timing out when importing a large amount of posts?

I notice that some users have figured a way to do this. Any suggestions?

Sanjiyan
05-13-2003, 06:14 PM
increasin the timeout in php.ini ?

Erwin
05-14-2003, 01:31 AM
It's okay, I got around it by using another news server. :)

Erwin
05-14-2003, 01:32 AM
It's okay, I got around it by using another news server. :)

DaveG
05-15-2003, 01:03 PM
It seems as if every 3 months my newsgroup gateway blows up on me. It has something to do with my news server rejecting the post, but it ACTUALLY accepts it. Well because on my end it thinks the message was rejected, it sends it again with the next newsgroup sync. And over and over again. with each new message. The only fix for this is to DELETE the newsgroup forum and recreate it from scratch, re-importing all the messages. Then a few months later the same thing happens.

Any idea how to stop this? The people in the newsgroup get REAL mad when it happens because the newsgroup gets flooded with massive duplicate posts.

Sanjiyan
05-15-2003, 09:22 PM
Anyone found the solution to the:
POP3: premature NOOP OK, NOT an RFC 1939 Compliant server

because I cant use this hack till I get this resolved... which is a shame, because I like it to pull the email from a email mailing list.

ScubaClicks
05-28-2003, 02:52 PM
Great hack and it's downloading the messages from the newsgroups just fine however I'm having problems with posts and replys.

When someone posts or replies it functions normally on the vbulletin side but the posting never seems to make it to the newsgroup itself..

Any ideas or am I missing something?

We cron the group every 10 minutes..

limey
05-28-2003, 05:25 PM
Today at 04:52 PM ScubaClicks said this in Post #554 (https://vborg.vbsupport.ru/showthread.php?postid=401109#post401109)
Great hack and it's downloading the messages from the newsgroups just fine however I'm having problems with posts and replys.

When someone posts or replies it functions normally on the vbulletin side but the posting never seems to make it to the newsgroup itself..

Any ideas or am I missing something?

We cron the group every 10 minutes..


I pretty much have the same problem.

Depends on the newserver, but I've tried like 5 and no dice.

limey
05-28-2003, 09:09 PM
Ok one worked, don't know which one now.

Can we change the output on the newsgroup page? Like this message was posted with or by or from?

I'm leaving my post as is, so others may find the answer. The solution is in this thread

groovesalad
06-02-2003, 05:47 PM
oops, no I didn't. I uploaded it and it says this


1 group(s) gatewayed.
Logging in to news.comcast.giganews.com, group alt.music.dave-matthews


but nothing shows up in the forum

limey
06-03-2003, 08:38 PM
Does anyone have this hack installed as well as vbHome Lite? If so are the new posts from the newsgroups being updated on the front page?

limey
06-03-2003, 08:40 PM
Does anyone have this hack installed as well as vbHome Lite? If so are the new posts from the newsgroups being updated on the front page?

groovesalad
06-05-2003, 10:23 PM
So, no one knows why it doesn't get past the gateway section and not post on the board?

groovesalad
06-05-2003, 10:25 PM
.

limey
06-06-2003, 04:12 AM
groovesalad...yes i do. you need to get with an appropriate server. one that reads and posts. the free ones are hard to find and are all sketchy. I have not been able to find one that reads and posts and I don't want to get a commercial one.

btw I listen to ur station all the time.

mood
06-08-2003, 09:34 AM
Gilby,

Totally stumped why I cannot get the mail list gateway section to work.

Do you have a working "class.POP3.php" sample you could PM me?

BIG Thanks!

Mood

mood
06-08-2003, 09:56 AM
Got the mail list feature to work (didn't realize that you had to setup the mail account as a news group in nntp_groups)

Next question: HOW to avoid the circular effect when wanting to sync forum/nntp/mail list.

anybody any ideas?
Thanks
Mood

limey
06-13-2003, 01:14 AM
Cancel that its working. Different newsgroups must have different message ID's because I changed that and it worked.

Tried using newsranger and its not working.

mr.children
06-21-2003, 08:43 PM
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

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

Warning: main() [function.main]: Failed opening 'class.POP3.php3' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site13/fst/var/www/html/bbs/gateway.php on line 25

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site13/fst/var/www/html/bbs/gateway.php:25) in /home/virtual/site13/fst/var/www/html/bbs/gateway.php on line 483
1 group(s) gatewayed. Could not connect to NNTP-serverLogging in to newsgroup.server, group your.newsgroup Not connectedNot connected

btw, what does setlastmsg.php for?

allan grossman
06-22-2003, 01:00 PM
Outstanding hack, Gilby - running fine on a clean vB 2.3.0 install.

I did have a small problem with cron jobs not running properly if I redirected stderr and stdout to /dev/null but I fixed that by writing the output to a log file instead.

Can someone help this php n00b tweak the signature function a little?

Instead of appending the username and custom title, what I'd like is *nothing* if the user doesn't have a signature, the user's signature appended to the post if he does, and instead of thread and profile links maybe something under the dashed line like "this post was gatewayed through the forum at http://pointbeing.com"

No big deal, but if someone could knock something like that out for me in a couple minutes it'd be greatly appreciated. Here's the signature section of gateway.php - I don't really need the "unregistered user" section as unregistered users can't post.

// get user's signature
if ($newthread[userid]){
$get_userinfo=$DB_site->query("SELECT signature,usertitle,customtitle FROM user WHERE userid=$newthread[userid] LIMIT 1");
$userinfo=$DB_site->fetch_array($get_userinfo);
$signature = "\n--\n";
$signature .= $newthread[username];
if ($userinfo[customtitle]){ $signature .= " - $userinfo[usertitle]"; }
if ($userinfo[signature]){
$signature .= "\n\n";
$signature .= format_text($userinfo[signature]);
}
$signature .= "\n------------------------------------------------------------------------\n";
$signature .= "$newthread[username]'s Profile: $settings[profileurl]$newthread[userid]\n";
$signature .= "View this thread: $settings[threadurl]$newthread[threadid]\n";
} else {
$userinfo = false;
$signature = "\n--\n".$newthread[username]." - Unregistered User";
$signature .= "\n------------------------------------------------------------------------\n";
$signature .= "View this thread: $settings[threadurl]$newthread[threadid]\n";
}

Thanks in advance :)

allan grossman
06-24-2003, 11:29 AM
Never mind, I fixed it :)

PhoenixBB
06-29-2003, 04:49 PM
Quoting from post 381:

my searchindex table started getting out of hand... It reached about a gig, and I was only a quarter done, so I killed all the records and set the nntp options to not index the groups that are based on newsgroups and only index local groups.... now that that is done, my whole dbase is arround 40 meg as of may 22, but should be around 80 or so when done!...

This is the only post I can find on this. Where are these NNTP options? I've looked in the php file but saw nothing there, so anyone know how I can exclude the newsgroups from the search function/index?

I'm shortly going to be adding the code to ensure that newsgroup posts aren't included in normal 'view new' so will that be all that's needed or do I need to do more?

Installed this and the interface without problems, but I haven't run it yet. :D

Also, I have attachments switched off on the board and I'm just using a couple of text groups. I'm using the interface so will that automatically not download attachments, or will they just be put into the database and not displayed on the board. If so how can I ensure it doesn't download binaries?

I'm on a shared server and my host has been really encouraging to me re installing this hack. Don't want to push my luck by having the database grow massively. ;)

Thanks for any help.

PhoenixBB
06-29-2003, 04:51 PM
Quoting from post 381:

my searchindex table started getting out of hand... It reached about a gig, and I was only a quarter done, so I killed all the records and set the nntp options to not index the groups that are based on newsgroups and only index local groups.... now that that is done, my whole dbase is arround 40 meg as of may 22, but should be around 80 or so when done!...

This is the only post I can find on this. Where are these NNTP options? I've looked in the php file but saw nothing there, so anyone know how I can exclude the newsgroups from the search function/index?

I'm shortly going to be adding the code to ensure that newsgroup posts aren't included in normal 'view new' so will that be all that's needed or do I need to do more?

Installed this and the interface without problems, but I haven't run it yet. :D

Also, I have attachments switched off on the board and I'm just using a couple of text groups. I'm using the interface so will that automatically not download attachments, or will they just be put into the database and not displayed on the board. If so how can I ensure it doesn't download binaries?

I'm on a shared server and my host has been really encouraging to me re installing this hack. Don't want to push my luck by having the database grow massively. ;)

Thanks for any help.

groovesalad
06-29-2003, 09:12 PM
del

iggy123
07-01-2003, 10:22 PM
any ideas on how to stop it updating all threads?
I have tried to install this but the newsgroup i want to get threads from has 3 months worth of posts - i only want the last months threads.
everytime i manually prune the forum the next time the gateway.php runs it brings in the old posts again.

alesis404
07-02-2003, 07:05 AM
Using older stuff from Usenet hack - you need a new field in thread table.

ALTER TABLE thread ADD isusenetpost TINYINT(2) DEFAULT 0 not null;

then open your gateway.php and find:

// Create thread
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastpos
ter,dateline,iconid,visible,attach,msgid,prefix) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".$date."','$forumid','1','0','".addslashes(from_name($message[from]))."','0','".addslashes(from_name($message[from]))."','".$date."','0','1','$attachcount','".addslashes($message[msgid])."','".addslashes($theprefix)."')");

replace it with (changes enbolded)

// Create thread modded
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastpos
ter,dateline,iconid,visible,attach,msgid,isusenetp ost,prefix) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".$date."','$forumid','1','0','".addslashes(from_name($message[from]))."','0','".addslashes(from_name($message[from]))."','".$date."','0','1','$attachcount','".addslashes($message[msgid])."','1','".addslashes($theprefix)."')");

From now on each thread created by gateway.php will be flagged as originating from usenet (isusenetpost=1)...

Open search.php and find two lines:

$wheresql.=" AND thread.open<>10";

in my case around line 551 and 601...
Directly below each of them add:

// NNTP Gateway mod
if (!$includeusenetpostsingetnew) { $wheresql.=" AND thread.isusenetpost=0"; };
// End of mod

Having isusenetpost in thread table also allows you to separate threrad counts or create separate links for "View new Usenet posts" ( see example here...

==============================================
Can someone tell me the correct syntax to run this line as a query and create this?

ALTER TABLE thread ADD isusenetpost TINYINT(2) DEFAULT 0 not null;

*I tried creating the table manually but after doing the mod and trying view new posts I got a white screen and suspect maybe the table I have is made wrong, thanks

PhoenixBB
07-02-2003, 07:02 PM
I couldn't get that querie to worked - kept giving me a syntax error. The post beneath that one you quoted provided the solution for me. :)

kaiwang
07-02-2003, 07:06 PM
which NNTP service provider is everyone here using??

thanks

alesis404
07-02-2003, 08:43 PM
Someone mentioned to remove certain users usenet posts you could do this

A simple SQL query can be used periodically to delete them. Use something like "DELETE FROM post WHERE username='username'" You'll also need to run DELETE FROM thread WHERE postusername='name of bad seed'" Or you can see my last post and add another thing to the if statement.

Using phpmyadmin I am trying to run a sql query and am not sure I am doing this properly and need confimation, is the exact line that needs to be typed

DELETE FROM post WHERE username='username'

of course replacing 'username' with the actual username who's posts you need deleted or is there some other code that must be added before this to the standard query from phpmyadmin? I seem to get a syntax error trying to run that line and assume i am missing a small code snippet that might go in front of that line of the querys?

alesis404
07-02-2003, 10:40 PM
Post #334 mentioned to alter the table thread and add

ALTER TABLE thread ADD isusenetpost TINYINT(2) DEFAULT 0 not null;

I did this manually and appears I have the table right but going by the last error I got was I supposed to make another change to mention that extra column?

*I did also make the mod to search.php and appears to be blocking posts from "view new posts but now I have this error"

allan grossman
07-02-2003, 10:49 PM
Today at 04:06 PM kaiwang said this in Post #575 (https://vborg.vbsupport.ru/showthread.php?postid=414776#post414776)
which NNTP service provider is everyone here using??

thanks

I'm using Giganews and it's working fine. I also made some changes to the signature routines - because I wanted them to say something different and because the signature separator wasn't RFC 1036-compliant and some newsreaders were having problems strippng them off.

A compliant signature separator is <linefeed><dash><dash><space><linefeed> Gilby's hack (while outstanding) was missing the space and some newsreaders wouldn't strip the signature out of quoted vB Usenet posts.

This hack has added real value to my board - thanks, Gilby!

PhoenixBB
07-07-2003, 04:29 AM
which NNTP service provider is everyone here using??

I was going to use my Easynews account, but chickened out when I read the TOS. They were very much ''you must use the account soley for your own use''. Technically it is, but I figured too dicey as I'm in the UK and my site is on a US server, and they might notice I can't be in two continents at once. :P In the end I went with teranews.com who give 50mb a day free, which is plenty for the couple of text groups I use. They charge a one off $3.95, which isn't bad. Had no problems so far.

I'm just gearing up to switch the posting function on. Am a bit nervous of that in case it posts what's already there. I guess I'm gonna have to re-read this whole thread again <whimpers> but am I remembering rightly that people can't use the normal vbcodes when replying? Or if they do they don't get converted like they do on the way in? That'll take some getting used to for some of my members.

alesis404
07-07-2003, 05:07 AM
A simple SQL query can be used periodically to delete them. Use something like "DELETE FROM post WHERE username='username'" You'll also need to run DELETE FROM thread WHERE postusername='name of bad seed'" Or you can see my last post and add another thing to the if statement.

Is anybody sucessfully doing this through phpmyadmin and if so what is the exact query you are using? I tried this and it gives me a syntax error on line 1 and I really have alot of posts I would like to remove asap...thanks

DELETE FROM post WHERE username='username' <---this give me bad syntax when i run this query from phpmyadmin? is there something that goes in front or behind this...sorry for asking again but I've been waiting all weekend to be able to remove bulk spam posts and would appreciate help from anybody using phpadmin to run this query and delete posts by user, note I cannot mass prune by user from admincp and when I try it hops to the next page but appears there is buttons missing and I cant perform the action...perhaps others know what I mean....

PhoenixBB
07-07-2003, 06:03 AM
Am I right in assuming that if I change this:

// 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

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
03-22-02 at 07:27 PM Gilby said this in Post #269 (https://vborg.vbsupport.ru/showthread.php?postid=231623#post231623)
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()".

lierduh
07-25-2003, 02:51 PM
06-22-03 at 08:43 AM mr.children said this in Post #566 (https://vborg.vbsupport.ru/showthread.php?postid=411425#post411425)
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.php?p=444521&postcount=658

07-26-03 at 02:41 AM lierduh said this in Post #584 (https://vborg.vbsupport.ru/showthread.php?postid=420535#post420535)
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

26a27,30
> if (isset($pre_postid)) {
> $pre_postid=(int)$pre_postid;
> }
>
305c309
< $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");
---
> $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible,pre_postid) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$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

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.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,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.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,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.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,post.ipaddress,thread.title,post.threadid,threa d.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.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,post.ipaddress,thread.title,post.threadid,threa d.forumid,thread.msgid,thread.prefix,post.pre_post id 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,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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($ref, 210, "\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.

floridaideal
08-01-2003, 10:37 PM
Hi all

I have been trying to work out the problem I talked about above about my posts on the forum not being sent to the newsgroups and still can't work the problem can someone please help me solve this problem!

A little more info

I am using VB 2.3
Using Clara.net as my news provider (has username and pass to access)
and also installed the interface.

Somone please help

my email is admin@floridaideal.com

Thank you

Stuart

lierduh
08-02-2003, 03:41 AM
Today at 10:37 AM floridaideal said this in Post #591 (https://vborg.vbsupport.ru/showthread.php?postid=422494#post422494)
Hi all

I have been trying to work out the problem I talked about above about my posts on the forum not being sent to the newsgroups and still can't work the problem can someone please help me solve this problem!

Stuart

Have you had a cron job to run the script?

the gateway.php needs to be run regularly to retrieve and post your newly posted messeages to the news server. You can manually run the script and see what message you have on the screen. Just run:

http:/www.yourforums.com/gateway.php

MaDCaT75
08-13-2003, 05:22 AM
Wow I must be one stupid +++++ I cant understand how to install this :cry:

insanctus
08-13-2003, 05:28 AM
Today at 02:22 AM MaDCaT75 said this in Post #593 (https://vborg.vbsupport.ru/showthread.php?postid=425647#post425647)
Wow I must be one stupid bitch I cant understand how to install this :cry:

Takes time just relax :)

MaDCaT75
08-13-2003, 05:30 AM
Today at 07:28 AM insanctus said this in Post #594 (https://vborg.vbsupport.ru/showthread.php?postid=425650#post425650)
Takes time just relax :)

I still say I'm a stupid ugly bitch

irubin
08-13-2003, 02:17 PM
Hello,

I installed the hack with no problem. I am trying to execute gateway.php - and its updating the forum, but the lastmsg in the nntp_groups table never gets updated - and the browser is attempting to download gateway.php

any ideas?

floridaideal
08-14-2003, 02:59 PM
Hello

Is there anyway of making the newsgroups you downloaded NOT count for the final forum post count at the top of the screen?

Thanks

Stuart

floridaideal
08-14-2003, 03:00 PM
Hello

Is there anyway of making the newsgroups you downloaded NOT count for the final forum post count at the top of the screen?

Thanks

Stuart

RealCarAudio
08-16-2003, 10:23 PM
In the admin section you can edit the forum and there is an option close to the bottom were you state if you want the post count for that forum to be calculated in the total post count.

saab340
08-18-2003, 03:39 PM
I receive this error from cron e-mail... and its killing the server after it gets in the loop.... it used to work fine, what is going on, and how could I fix this....

Here is the message:
Invalid SQL: SELECT thread.threadid FROM thread,post WHERE thread.threadid=post.threadid and (thread.title='BAR:Safety Hazard & High Performance/Complex?' OR post.title LIKE '%BAR:Safety Hazard & High Performance/Complex?' OR thread.title='BAR:Safety Hazard & High Performance/Complex?' OR post.title LIKE '%BAR:Safety Hazard & High Performance/Complex?') AND (thread.forumid=187) ORDER BY post.dateline DESC LIMIT 1
mysql error: Server shutdown in progress

mysql error number: 1053

PhoenixBB
08-23-2003, 06:39 PM
Is anyone using this with V3, and if so does the threading feature work properly? Not only for incoming posts but when posting out it puts the posts on the correct thread in the NG ?

The threading feature is about the only reason I would think of getting VB3. At the moment I'm loathe to switch on posting because from what I could gather it tends to post to the first post and newsgroups can get quite snotty about that. Especially the one I use! There are already hostile camps and if my guys don't post in the correct order, all hell would break loose. VB3 would solve that if the threading feature does what it ought.

lierduh
08-24-2003, 10:52 AM
08-19-03 at 03:39 AM saab340 said this in Post #600 (https://vborg.vbsupport.ru/showthread.php?postid=426843#post426843)
I receive this error from cron e-mail... and its killing the server after it gets in the loop.... it used to work fine, what is going on, and how could I fix this....


One thing to watch out. Don't put the cron job in place until you import all the messages. The last message counter only gets updated after all the messages are received. If by then the cron job starts another message retrieving, the server can be brought down after a few processes trying to add the same messages to the forum database.

NuclioN
08-24-2003, 11:45 AM
Looks like a great hack. However...tried a few newsgroups but there is no connection possible. Maybe i'm doing something wrong or the server is giving problems.

1 group(s) gatewayed.
Could not connect to NNTP-serverLogging in to alt.binaries.nl, group alt.binaries.nl
Not connectedNot connected

Is it true that IMAP must be installed on the server?

PhoenixBB
09-03-2003, 12:01 PM
Okay I've finally switched on the posting feature, but it's making a hell of a mess of the newsgroup. Aside from the top posting issue, it keeps posting with an extra 'Re:'. So some replies are like 'Re: Re: Re: Re: blah blah'.

This not only looks hideous in the newsgroup but it makes a mess of my forum because they end up on separate threads. I can't merge with the originals else any replies will go to the wrong part of the thread.

It's actually not giving a good impression of our forum because anyone who posts from my board will by necessity be 'top posting' which annoys everyone, and have the multiple 'Re' in the subject lines, which enrages them further.

Does anyone know how to fix this? The hack would be fine without this issue, but as it's such a major flaw I can't see how I can allow posting if it isn't sorted.

I was considering Fastfowards hack, because his seemed to thread correctly on the NG, but my host isn't keen on a perl script. As I'm on a shared server and have no problems with this hack (apart from this issue) then Gilby's it is.

I did notice that Fasforward had optional code for the New Thread and New Reply which ensured the correct threading. This was basically inserting 'nntp dateline' in one of the DB>insert sections. Does Gilby's hack use the nntp dateline? Had a read thru both files and can't see it. Does it use a different name? Usenet dateline or something? In other words could I adapt that bit of code ala Fastforwards version so that posts will go to the correct part of the thread (and hopefully not have the multiple 'Re:')

Any suggestions or solutions? Anyone?

Muchos Gracias.

lierduh
09-06-2003, 02:55 AM
I have a hack for this hack a few posts back regarding the thread sorting problem. Usenet readers sort them by References and Message-IDs in the header. Not by date/time.

PhoenixBB
09-06-2003, 01:12 PM
Do you mean this one: https://vborg.vbsupport.ru/showthread.php?postid=420996#post420996

I thought that was just for sorting out problems with incoming threading. For the most part VB threads ok, and any 'strays' I merge. I do sometimes get a 're: re: re:' which ends up on a different thread, but I can live with that. What I want to ensure is that when replying to a post in the middle of a thread it will actually go to the correct part of the thread on Usenet, and not 'top post'. And hopefully, not end up adding an extra 're:' to each reply. Are you saying that the above hack will fix those problems? <keeps all fingers and toes crossed>

Phoenix

SRozhon
09-06-2003, 01:31 PM
Can someone tell me what query I need to run to delete the duplicate posts from my newsgroup threads? For example,

Palatines from Germany to England 1709 Now Online joe 0 0 09-05-2003 11:11 AM
by joe

Palatines from Germany to England 1709 Now Online joe 0 0 09-05-2003 11:11 AM
by joe

Palatines from Germany to England 1709 Now Online joe 0 0 09-05-2003 11:11 AM
by joe

I want to keep one of these by not the other two. If I got rid of all of them I could just query

DELETE FROM post WHERE username='name of bad seed'

like Gilby said around page 28. But I want to keep one of them. Any suggestions or advise on this?

lierduh
09-08-2003, 08:27 PM
09-07-03 at 01:12 AM PhoenixBB said this in Post #606 (https://vborg.vbsupport.ru/showthread.php?postid=431730#post431730)
Do you mean this one: https://vborg.vbsupport.ru/showthread.php?postid=420996#post420996

I thought that was just for sorting out problems with incoming threading. For the most part VB threads ok, and any 'strays' I merge. <keeps all fingers and toes crossed>

Phoenix

The hack is for posts generated from the forums. The originally hack (a very good one by the way) did not implement the References in the header properly.

Not sure what do you mean by "top post", I know "top reply".

MaDCaT75
09-08-2003, 09:28 PM
If only I was smart enough to install this..... :(

csimo
09-11-2003, 02:20 PM
I'm running VB3. Has anyone tried this on vB3? Will it work, should I try?

Sounds like great work so far!

Gardener
09-11-2003, 06:14 PM
I'm running VB3. Has anyone tried this on vB3? Will it work, should I try?

Sounds like great work so far!

Been there, tried that, it doesn't work. :ermm:

petertdavis
09-11-2003, 06:49 PM
Does anyone have a forum with this hack working? I'd like to see it in action.

allan grossman
09-11-2003, 07:41 PM
Does anyone have a forum with this hack working? I'd like to see it in action.

I do.

http://pointbeing.com

allan grossman
09-11-2003, 10:58 PM
Got it threading properly thanks to lierduh's fix.

One small thing, though - look at his code. There are about four instances of

"allowsmili e,showsignature"

and the extra spaces will throw SQL errors if you don't catch them all. I missed two of them and had to go back and edit stuff again but once I got that fixed I replied to a couple posts and checked the threads with Agent - and they showed up in the right spots.

Thanks again, lierduh - I've always liked this hack and you just made it better.

There's only one other problem I've seen and I mentioned it before but the non-RFC-compliant signature separator causes problems for some newsreaders - some of them won't strip the signature out of quoted text because the signature separator isn't quite legal.

If someone is interested in fixing that small issue for their own Usenet gateway, an RFC-compliant signature separator is <linefeed><dash><dash><space><linefeed>

Here's the fix if anyone's interested:

In gateway.php, find both instances of

$signature = "\n--\n";

(line 542 and line 554), and replace with

$signature = "\n-- \n";

Now that I've got those two things fixed the hack's gone from great to awesome. Thanks, gents!

petertdavis
09-12-2003, 01:10 AM
I do.

http://pointbeing.com

Very nice, the usenet posts look like every other post in your forum. Now, how to get it working in version 3. :)

lierduh
09-12-2003, 01:43 PM
Got it threading properly thanks to lierduh's fix.

One small thing, though - look at his code. There are about four instances of

"allowsmili e,showsignature"

and the extra spaces will throw SQL errors if you don't catch them all. I missed

Looks like the forum has added the extra spaces. When I tried to edit my post and remove the space, they are not there. :ermm:

allan grossman
09-12-2003, 01:53 PM
Weird.

I didn't think maybe it could be the forum. Sorry about blaming your code, lierduh.

BTW - thanks for fixing things. This hack is a lot better now that it threads properly :)

megarry
09-13-2003, 12:17 PM
I thried this hack sometime ago and I decided against using it because it setup a new user account for each post received from the NNTP gateway. Does this hack still do that?

If so, is there a way to not setup accounts for each post? I would much rather have the messages come in without user accounts, makes maintaining my user database a bit of a nightmare with thousands of unused accounts.

Dennis

allan grossman
09-13-2003, 12:37 PM
I thried this hack sometime ago and I decided against using it because it setup a new user account for each post received from the NNTP gateway. Does this hack still do that?

If so, is there a way to not setup accounts for each post? I would much rather have the messages come in without user accounts, makes maintaining my user database a bit of a nightmare with thousands of unused accounts.

Dennis

It doesn't do that now, Dennis. Usenet posts come in under a guest account.

SRozhon
09-14-2003, 08:09 PM
I can't find the answer to this...I wonder how I can I exclude the posts in the usenet forusm from being included in the detnew and getdaily searches.

This script downloads a lot of posts from usenet and it confuses many of my members when they want to see new posts since last visit or new posts in the past 24 hours.

Can someone suggest how to hack the search.php to exclude certain forums from being counted towards the latest posts?

Found it! Thank you patvdv on page 23 of this thread

Holidazed
09-20-2003, 03:07 AM
allan grossman, what news server are you using? Is it a free one or do you pay?

I have a pay server I am using. I modified the database to make reference to the server name, username and password but it seems to be ignoring the password.

When running gateway.php, I keep getting the error

Logging in to news-west.newscene.com, group alt.games.adnd
Posting Message from DK: 500 Huh?
Posting Message from DK: 500 Huh?

Ideas?

PhoenixBB
09-20-2003, 04:50 AM
The hack is for posts generated from the forums. The originally hack (a very good one by the way) did not implement the References in the header properly.

Not sure what do you mean by "top post", I know "top reply".

Weird, my notifications for this thread seem to have stopped.

I think top reply would be the same thing. Like if someone replies to a post in the middle of the thread on our forum, because it's linear it goes on the end. No problem. But because Usenet is threaded, it really needs to go to the correct part of the thread there and not 'top reply/post' as the NGers get really ++++y. Does your hack send the post to the correct part of the thread?

It looked quite complicated at first but I'm gonna give it a try anyway because all of a sudden long names eg"Re: bla blah (was blah blah blah)" are for some reason not threading at all and I'm ending up with a full page of those that I have to merge!

PhoenixBB
09-20-2003, 06:57 AM
I'm sorry lierduh but I can't make head nor tail of your instructions.



1) Add two columns to post table.

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

How exactly do I do this? If I click the post> "insert" I get a lot of 'field' 'type' 'null 'value' etc. There is no 'pre-postid' just postid. At the bottom it indicates this would add a new row. As a row isn't a column, where is the bit to add columns??

2)hack newreply.php

diff newreply_old.php newreply.php

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

Again confused here: are we to edit the code currently at lines 26,27, and 30 so it reads as above or add this to replace it? If '}' is to go at line 30 then the code currently there will now be on 31?

< include("class.POP3.php3");
---
> //require_once("class.POP3.php3");

We change to 'require_once' , then comment it out?

Thanx

allan grossman
09-20-2003, 10:49 AM
allan grossman, what news server are you using? Is it a free one or do you pay?

I have a pay server I am using. I modified the database to make reference to the server name, username and password but it seems to be ignoring the password.

When running gateway.php, I keep getting the error

Logging in to news-west.newscene.com, group alt.games.adnd
Posting Message from DK: 500 Huh?
Posting Message from DK: 500 Huh?

Ideas?

I use Giganews - it's a pay service.

Your 500 error means "Command not recognized". I used GameCrash's graphical in terface to the NNTP gateway - it stores the server name, username and password in a template. Here's the thread -

https://vborg.vbsupport.ru/showthread.php?t=36475

allan grossman
09-20-2003, 11:07 AM
How exactly do I do this? If I click the post> "insert" I get a lot of 'field' 'type' 'null 'value' etc. There is no 'pre-postid' just postid. At the bottom it indicates this would add a new row. As a row isn't a column, where is the bit to add columns??

You do it with a MySQL query -

ALTER TABLE post ADD COLUMN ref TEXT;

ALTER TABLE post ADD COLUMN pre_postid INT;

Then I just set the column width for pre_postid in phpMyAdmin because I didn't know how to do it with a query - but it worked.

Again confused here: are we to edit the code currently at lines 26,27, and 30 so it reads as above or add this to replace it? If '}' is to go at line 30 then the code currently there will now be on 31?

You put it directly *under* line 26. It should look like this -

if (isset($postid)) {
if (isset($pre_postid)) {
$pre_postid=(int)$pre_postid;
}

We change to 'require_once' , then comment it out?

Yup.

good luck!

Holidazed
09-22-2003, 12:27 AM
I use Giganews - it's a pay service.

Your 500 error means "Command not recognized". I used GameCrash's graphical in terface to the NNTP gateway - it stores the server name, username and password in a template. Here's the thread -

https://vborg.vbsupport.ru/showthread.php?t=36475

I use Newscene which is also a pay service. I am also using the graphical interface for this hack. I put in the servername, the newsgroup, my username and password. I use this same information in my news reader so I know it is right.

I still get the same error.

Another thing to note. When I edit the newsgroup forum in the graphical interface, the password field is blank. Yet when I look at the database, the correct password is in there. Could it be that the password is not being sent when trying to connect to the news server?

allan grossman
09-22-2003, 01:17 AM
...When I edit the newsgroup forum in the graphical interface, the password field is blank. Yet when I look at the database, the correct password is in there. Could it be that the password is not being sent when trying to connect to the news server?

I dunno - I think you'd be getting authentication errrors, not "WTF is this command" errors.

Gilby wrote one version of nntp.php that does extensive logging - I've attached it here. You'll need to rename it to nntp.php after you back up the one you have now. Maybe it'll help -

good luck!

PhoenixBB
09-22-2003, 04:26 AM
Thanks allan!

I'm just stuck on this bit

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;
> }
> }

Now I read that as put this in at lines 125, and 126, and 132. A similar code to that starts at line 119. So do I put this at the end of that (finishes with 2 '}' or in place of it. Most of the other code was straight replacement, I got that, but I can't work out if this is an addition or replacement, and if it's an addition does it go at line 125 inbetween the close brackets?? <scratches head>

ETA: actually I'm getting stuck further.

258c265
< $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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])."')");

So okay, I change that for the one given but that goes from line 258>259. What's with the 265? Should I delete the rest up to that line (that's the 'logging' and 'indexing' bit)?

Thanx!

PhoenixBB
09-22-2003, 08:13 AM
Okay I bit the bullet and just went for it, even though the instructions were not at all clear to me. I fear I've got it wrong though. <sobs>

It half works for me:

As it's so early in the morning I've not got a lot of incoming so it's hard to tell if it'll thread correctly in my forums. I had two posts with identical 'Re:' subjects that should have been on the same thread. Checked with my newsreader and they were on the right thread in the NG, so not 'strays'. I'll know if it's really worked later today I guess, but I can live with it as it's no worse than at the moment, just takes a bit of effort merging them all if there are a lot of posts.

More interesting was the threading in the newsgroup when I posted from the forum. Yay, it sent the posts to the correct part of the thread, but only if one used the Quote button to reply. If one uses Add Reply then it 'top replies'. :(

Is it supposed to still do this? Have I misinterpreted the instructions and if I get it right it'll stop top posting if the Add Reply is used?

So it's sorta half working at the moment and I'm mightily pleased. Thanks lierduh!

Can I get it fully working or am I gonna have to put notices up forbidding people to use the Add Reply button in that forum? :)

Thanx

ETA: Actually, I guess it's kind of impossible to stop it top posting with the Add Reply, 'cause how would it know which post to reply to. Hmmm. So I guess it did work properly after all and I never buggered it up. Phew

Now if only I could think of a way to remove the add reply button from that forum. ;)

allan grossman
09-22-2003, 08:22 AM
Hi, PhoenixBB :)

Might be a good idea to read the man page for "diff" - it might make things a little clearer.

125a126,132: This means that on the hacked file lines 126-132 were added (that's what the 'a' means) - they don't exist in the original file. I copied a few lines above and below so you'd know what the thing was supposed to look like here -


// Decode the subject and from headers
if (function_exists('imap_mime_header_decode')){
if ($message[subject]){
$elements=imap_mime_header_decode($message[subject]);
$message[subject] = '';
for($i=0;$i<count($elements);$i++) {
$message[subject] .= $elements[$i]->text;
}
}
if ($message[references]){
$elements=imap_mime_header_decode($message[references]);
$message[references] = '';
for($i=0;$i<count($elements);$i++) {
$message[references] .= $elements[$i]->text;
}
}
if ($message[from]){
$elements=imap_mime_header_decode($message[from]);
$message[from] = '';
for($i=0;$i<count($elements);$i++) {
$message[from] .= $elements[$i]->text;
}
}
}


The 258c265 is a straight replacement (that's what the 'c' means). Remember you added lines just now? The line number was 258 in the original file - it's now line 265.

You're getting there :)

allan

edit: If your "add reply" button doesn't work there's something bollixed up in newreply.php - best to start over with a fresh copy of that file and make sure the hack is applied correctly. The button does work, honest :)

I gotta go to work now - good luck!

PhoenixBB
09-22-2003, 11:31 AM
Might be a good idea to read the man page for "diff" - it might make things a little clearer.

What? What? I just hotfooted it over to the main page and can't find anything. Not that I think it'll make any difference because it still doesn't make sense.

Have I mentioned how much I hate this new layout and these scrolly code boxes? <g> Thank god I got most of my hacks done, because I'm having a very hard time wrapping my head around this. I like the old ways better, least I could understand the instructions.

As the original code started on line 119, then I'm guessing that the first number mentioned is where the replacement code finishes? In this case, very handily at 125? <g> But...but...that still doesn't indicate where one would insert. And 126 and 132 do have code in the original - just different ones. Brackets in this case. Now the original code has been pushed down to 126 and 132 has still got a bracket!

I have a bewildered look on my face at the moment, because I'm just not getting it. Even from your instructions there is no way I would have gotten that the code would have ended up in the middle without seeing it. I actually replaced completely the 'message [from]' section. Whoops.

The 258c265 is a straight replacement (that's what the 'c' means). Remember you added lines just now? The line number was 258 in the original file - it's now line 265.

Now this bit I get! <runs round in excited circles> Thank God! I was fearing early senility for a moment.

But I have a blank line on 258 - the code doesn't start till 260! After inputting the changes it's still the same. 265 is the end of another similar code. Actually it's the same! No mention of this in the instructions, but 264-265 is the same code 260-262 as above. So does that mean I have to do it twice? Ok. Ain't no way I'm getting this from the 'coded' instructions tho. :(

Hang about....... I'm going thru this again and I might be seeing the light.....I've just been getting cross at this 214,216c221,223 because I don't have the same code at 214. It is now at 221. A-ha! But...... it doesn't end at 223, that's an empty line! It ends at 221! <clutches head>

If this 608,613c615,617 is supposed to mean the original was on 608, nope it's 613 on mine and ends on 618. I just replaced that code with the new one and it now starts at 619 and ends at 624. Sigh.

Well hell, I appear to have made things worse!! I just ran the gateway and a load of code come up, it didn't even try to connect. Was basically the stuff in the gateway file.

I wonder if it was the duplicating of the 258 code for both the 'insert thread' and 'insert post'? Okay I've put the previous file which seemed to work back, and just changed it so I have put the code you showed above for the message reference. Only thing different is I now have the 'message[from]' code back.

Ah, it's working again!

I'm never gonna get this. If all the instructions will be done like this from now on then my days of adding hacks are at an end. Trying to figure out those instructions was a hundred times harder than putting the original hack in.

The Add Reply button does work Allan, it just 'top posts/replies' which is a big no-no in newsgroups. But of course it must do that and there is no way round it. People will just have to get used to using the Quote button in that forum. Unfortunately that doesn't always strip the VB code, so will mean people doing it manually. They won't of course. :(

And it's still 'top replying' even using the Quote Button! Seems it does that when one replies to a post that originates from the board and not the newsgroup, and it ends up going to the wrong part of the thread in the NG. <whimpers> This is defeating me. :(

Thanks for showing me where the code goes Allan, ain't no way I'd have figured it out otherwise. I wouldn't have this gateway hack up at all if the instructions had been in this new 'code'. :(

I need to lie down! :)

Holidazed
09-22-2003, 12:27 PM
I dunno - I think you'd be getting authentication errrors, not "WTF is this command" errors.

Gilby wrote one version of nntp.php that does extensive logging - I've attached it here. You'll need to rename it to nntp.php after you back up the one you have now. Maybe it'll help -

good luck!

Allan, I used the file you gave me and got the following message when synchronizing the newsgroups.
__________________
1 group(s) gatewayed.
200 NewsRave v1.01 (posting ok) 381 More authentication needed 480 Authentication required for command Logging in to news-west.newscene.com, group rec.games.frp.dnd
__________________

Now, I have the username in the username field and the database shows the password in the password field (even tho the admin interface for this hack does not show the password), but it does not seem to be sending this information.

Question, in your admin interface for this hack, does the password show there or does it remain an empty field like mine does?

allan grossman
09-22-2003, 12:45 PM
What? What? I just hotfooted it over to the main page and can't find anything. Not that I think it'll make any difference because it still doesn't make sense.

man page, not main page :)

From a terminal window type "man diff" (no quotes) and smack the enter key. Use the spacebar to scroll down and the "q" key to quit. Lotsa good stuff there. "diff --help" will give you the short version.

Read this - maybe it'll help you understand things a little better -

http://linux.oreillynet.com/pub/a/linux/lpt/28_01.html

...Thanks for showing me where the code goes Allan, ain't no way I'd have figured it out otherwise. I wouldn't have this gateway hack up at all if the instructions had been in this new 'code'. :(

I need to lie down! :)

You're gonna do fine, PhoenixBB. Don't get caught up quite so much in line numbers - as you add and replace text in the file the line numbers are gonna change. My advice would be to use the search function in your favorite text editor and if you're within a few lines of where you oughtta be (and there are no other instances of that particular string in the file) then apply the change.

Remember the output from diff can be a (append), c (change), or d (delete). If it's okay with lierduh maybe I can come up with a set of instructions that are a little easier to follow.

Hang in there - make sure the changes you're contemplating make sense and don't worry too much about line numbers as long as you're close to the target - as the line numbers change as you edit the file :)

cheers -

allan

allan grossman
09-22-2003, 12:47 PM
...Question, in your admin interface for this hack, does the password show there or does it remain an empty field like mine does?

The password shows up in my admin interface. Sounds like you're almost there :)

allan grossman
09-22-2003, 03:53 PM
I worked on the instructions a little - maybe they'll be easier now. If lierduh or anybody else objects to my changing the instructions I'll be happy to delete them. I didn't write this hack, have no input on it and can only report on what worked for me - so here goes:

edit: I had the same problem lierduh did. There are a couple places here where the forum software thows a couple of spaces in "allowsmilie" in the text below. If you just paste this stuff in it'll cause database errors so once you're finished editing newreply.php and gateway.php, replace all instances of "allowsmili e" with "allowsmilie". This appears to be a bug in vB3 -

1) Add two columns to post table. Run these queries against your forum database either from a command line or phpMyAdmin or whatever else you have :)

ALTER TABLE post ADD COLUMN ref TEXT;

ALTER TABLE post ADD COLUMN pre_postid INT(10);

please note that all line numbers were taken from the original files - since we're adding a couple of lines here and there the numbers will be off just a little :)



2)open forumhome/newreply.php

find (around line 27):

if (isset($postid)) {

add under it:

if (isset($pre_postid)) {
$pre_postid=(int)$pre_postid;
}


find (around line 305):

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");

replace it with:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible,pre_postid) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible','$pre_postid')");



save newreply.php



3) Modify template: newreply

find:

<input type="hidden" name="threadid" value="$threadid">

add under it:

<input type="hidden" name="pre_postid" value="$postid">



4) Modify gateway.php

find (around line 19):

header("Content-Type: text/plain");
include("global.php");

// Load NNTP classes
include("nntp.php");
// POP3 class
include("class.POP3.php3");
// Load Mime message parser
include("mime.php");

replace it with

header("Content-Type: text/plain");
require_once("global.php");

// Load NNTP classes
require_once("nntp.php");
// POP3 class
//require_once("class.POP3.php3");
// Load Mime message parser
require_once("mime.php");



find (around line 66):

$get_newthreads=$DB_site->query("SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,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]) . ")");

replace it with:

$get_newthreads=$DB_site->query("SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,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]) . ")");



find (around line 74):

$get_newposts=$DB_site->query("SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,post.ipaddress,thread.title,post.threadid,threa d.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]) . ")");

replace it with:

$get_newposts=$DB_site->query("SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,post.ipaddress,thread.title,post.threadid,threa d.forumid,thread.msgid,thread.prefix,post.pre_post id FROM thread,post WHERE post.isusenetpost=0 AND thread.threadid=post.threadid AND (thread.forumid=". implode(" OR thread.forumid=", $group[forum]) . ")");



find (around line 119):

if ($message[from]){
$elements=imap_mime_header_decode($message[from]);
$message[from] = '';
for($i=0;$i<count($elements);$i++) {
$message[from] .= $elements[$i]->text;
}
}
}

add under it:

if ($message[references]){
$elements=imap_mime_header_decode($message[references]);
$message[references] = '';
for($i=0;$i<count($elements);$i++) {
$message[references] .= $elements[$i]->text;
}
}


find (around line 214):

}
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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();

replace it with:

}
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,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();

find (around line 258):

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmili e,showsignature,ipaddress,iconid,visible,isusenetp ost,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])."')");

replace it with:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmili e,showsignature,ipaddress,iconid,visible,isusenetp ost,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])."')");


find (around line 608):

$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($ref, 210, "\r\n ");

replace it with:


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


find (around line 629):

$DB_site->query("UPDATE post SET isusenetpost = -1, msgid = '<".addslashes($msgid).">' WHERE postid=$newthread[postid]");

replace it with:

$DB_site->query("UPDATE post SET isusenetpost =1, msgid ='<".addslashes($msgid).">' , ref = '".$references."' WHERE postid=$newthread[postid]");

Holidazed
09-22-2003, 04:15 PM
The password shows up in my admin interface. Sounds like you're almost there :)

OK, as I stated earlier, my password is not in the password field in my CP, however, it is there in the database. How do I get it to stay in the CP area?

allan grossman
09-22-2003, 05:29 PM
OK, as I stated earlier, my password is not in the password field in my CP, however, it is there in the database. How do I get it to stay in the CP area?

I guess I'd be looking at the graphical interface hack, bitg - I'm at the office and can't look at mine but I had no problem with the password staying in the CP. My first guess would be a small glitch in the way the CP hack was applied but I could be way off-base here :)

Holidazed
09-22-2003, 08:49 PM
I guess I'd be looking at the graphical interface hack, bitg - I'm at the office and can't look at mine but I had no problem with the password staying in the CP. My first guess would be a small glitch in the way the CP hack was applied but I could be way off-base here :)


I just completely uninstalled the graphical interface hack as well as the nntp hack. Then I installed just the nntp hack (no graphical interface). I then configured all the fields in the database.

When I go to http://www.dungeonkeepersdomain.com/mb-test/gateway.php I get the following error:

___________________
1 group(s) gatewayed.
200 NewsRave v1.01 (posting ok)
381 More authentication needed
480 Authentication required for command
Logging in to news-west.newscene.com, group rec.games.frp.dnd
480 Authentication required for command
500 Huh?
Posting Message from DK:
500 Huh?
500 Huh?
500 Huh?
Posting Message from DK:
500 Huh?
___________________

Again, I know that the username, password, server and newsgroup are correct. There is no graphical interface installed. The username and password are showing up just fine in the database.

This happens when I place a message in the newsgroup forum and then run gateway.php. When I have no posts pending in the newsgroup forum, I get no errors, however, I get no incoming posts either. I deliberately did not run setlastmsg.php so that I would get plenty of message.

The wierd part is as follows. If I use a news server that is free and does not require a username and password (often posting rights are removed), I get tons of new messages but cannot post (for obvious reasons). The problem has to be that the username and/or password is not being sent.

ideas?

allan grossman
09-22-2003, 09:14 PM
I might have an idea.

I was just thinking that the fact that the password field didn't show up in the graphical interface *and* it isn't being passed to the news server but shows up in phpMyAdmin (I guess) would lead me to believe maybe the password field is either misspelled, the wrong type or in the wrong location.

The table type for nntp_groups should be ISAM, not MyISAM. It won't work if the table type is wrong (I don't know why, but I tried it the other way and the script fails).

If the table type is incorrect you can fix it by running this query against the database -

ALTER TABLE nntp_groups TYPE = ISAM;

Inside the nntp_groups table the password field is spelled "password" and is case-sensitive.

If it's not a spelling error, a typo or a misconfigured table I'm stumped, bitg - but I think the fact that the password isn't being sent and *also* isn't showing up in the graphical interface is significant.

Holidazed
09-22-2003, 09:37 PM
Well, I don't know which suggestion is was, but it is working now.

The password field was named PASSWORD, I changed it to password.

allan grossman
09-22-2003, 09:45 PM
woohoo!

Good on you, bitg. I'm glad you got it fixed.

PhoenixBB
09-22-2003, 11:08 PM
Thank you Allan, those instructions made much more sense. :D

From a terminal window type "man diff" (no quotes) and smack the enter key. Use the spacebar to scroll down and the "q" key to quit. Lotsa good stuff there. "diff --help" will give you the short version.

Mwuahahaha I've no idea what a terminal window is. I tried the MSDos prompt out of curiosity, that looks like a 'terminal' thing, but of course I got 'bad command'.

So this is all from Linux eh? Might as well be Chinese for some of us. ;) Think I better read that link you gave if I plan on doing any more hacks. What's the betting I end up with a blank look on my face. <snerk>

The gateway appears to be working ok, but my main problem now is making sure it strips the vbcode properly on the outgoing.

Always seems to leave some of the color codes in which look weird in the newsgroup.

Thanx for your help. Couldn't have figured this without ya. ;)

Phoe

PhoenixBB
09-22-2003, 11:18 PM
Allan, you've commented out the mime.php instead of the class.pop3.php. I assume this is an accident and the mime isn't supposed to be commented out?

Thanx!

allan grossman
09-22-2003, 11:33 PM
Allan, you've commented out the mime.php instead of the class.pop3.php. I assume this is an accident and the mime isn't supposed to be commented out?

Thanx!

Oops.

I fixed it.

Thanks!

allan grossman
09-22-2003, 11:39 PM
Thank you Allan, those instructions made much more sense. :D

Mwuahahaha I've no idea what a terminal window is. I tried the MSDos prompt out of curiosity, that looks like a 'terminal' thing, but of course I got 'bad command'.

So this is all from Linux eh? Might as well be Chinese for some of us. ;) Think I better read that link you gave if I plan on doing any more hacks. What's the betting I end up with a blank look on my face. <snerk>

The gateway appears to be working ok, but my main problem now is making sure it strips the vbcode properly on the outgoing.

Always seems to leave some of the color codes in which look weird in the newsgroup.

Thanx for your help. Couldn't have figured this without ya. ;)

I didn't know you were running Windows, Phoenix - the "man diff" probably didn't make any sense at all :)

Glad to be of service, though.

Holidazed
09-23-2003, 12:28 AM
Allan, I am now getting the following error when synchronizing (only if a post is due to go out from my system).
________________
1 group(s) gatewayed.
200 NewsRave v1.01 (posting ok)
381 More authentication needed
281 Ok
211 17410 962764 980173 rec.games.frp.dnd Logging in to news-west.newscene.com, group rec.games.frp.dnd
340 340 <3f6fa158$0$99022$45beb828@newscene.com> (desired)
240 Article posted!Posting Message from DK:
240 Article posted!
220 980173 <3F6FCAE7.127B@cox.net> articleGetting message number 980173: New thread; 'Value of captured spellbooks?' from Werebat
________________

Obviously some of that is messages received. Where is says "381 More Authentication needed" is confusing me. My outbound message is being posted and it recieves messages.

What is it authenticating?

allan grossman
09-23-2003, 01:00 AM
I looked up the error number -

381 is a password request from the server. Everything's working fine - what you're seeing is normal authentication.

Holidazed
09-23-2003, 05:29 PM
OK, I was just confused. Thank you for your help.

limey
09-23-2003, 07:04 PM
A nice addon would be to add an email obfuscator to the script so that emails that get printed via yoursite are not tried on on your email server by spam bots.

should be easy to impliment.

allan grossman
09-23-2003, 07:45 PM
A nice addon would be to add an email obfuscator to the script so that emails that get printed via yoursite are not tried on on your email server by spam bots...

Hmmmm.

I may play with that a little. My mail server's getting hammered (well, not really but spam traffic is up) and I'd rather change the email domain to something that can't be resolved.

wolfman
10-07-2003, 04:55 PM
Thanks for this hack

irubin
10-09-2003, 10:09 PM
Hello,

I have been recieving the following error when gateway.php attempts to post articles:

Posting Message from user: 441 (607) Article Rejected -- The 'References:' field requires one or more values

Any ideas?

Roy

wolfman
10-10-2003, 05:54 PM
I have this installed and working great, once I got all the posts downloaded.

I just need to know if there is a way to keep these posts from showing up when a user clicks on the View new post link.

They like having the access to the groups but want to be able to use it more as an additional resource to search.

liquidblaze
10-12-2003, 03:47 PM
i installed the hack and apparently all is working fine, i just ran gateway.php for the first time (still runnning - since 3 mins now) and i was asking myself how high the server load is if i run this script and for the crontab, what would be a reasonable time frame? i guess 10minutes is way too much

allan grossman
10-23-2003, 02:14 PM
I have this installed and working great, once I got all the posts downloaded.

I just need to know if there is a way to keep these posts from showing up when a user clicks on the View new post link.

They like having the access to the groups but want to be able to use it more as an additional resource to search.

There is, wolfman :)

I made a search button that excludes Usenet posts. Pretty easy, really - on my system I made a button that linked to

../forumdir/search.php?s=&action=getlatest&forumid=4,5,8,9,12,14,19,22,23

Substitute my forum numbers for the ones you want to search.

cheers -

liquidblaze
10-23-2003, 02:27 PM
There is, wolfman :)

I made a search button that excludes Usenet posts. Pretty easy, really - on my system I made a button that linked to the search


hmm didnt even think about this but im gonna integrate it :)

allan grossman
10-23-2003, 03:47 PM
i installed the hack and apparently all is working fine, i just ran gateway.php for the first time (still runnning - since 3 mins now) and i was asking myself how high the server load is if i run this script and for the crontab, what would be a reasonable time frame? i guess 10minutes is way too much

Once you get the newsgroups populated server load is negligible. I gateway three relatively low-traffic groups every 15 minutes (~100 posts a day) and the script takes less than ten seconds to execute.

lierduh
11-02-2003, 03:08 AM
I initially did a bit of hacking to this srcript regarding threading problem. You can see the post here:

https://vborg.vbsupport.ru/showpost.php?p=420996&postcount=587

allan grossman did a great follow up about this at:

https://vborg.vbsupport.ru/showpost.php?p=435886&postcount=635

After moving to vB V3 plateform, I have found the gateway is not compatible with V3. Below is my note to get the script to work with V3. I attached the hacked gateway.php with this post, there are quite a few places I need to fix, so a "diff" may not be a good way to see.

At the moment, I can only confirm my site is working with the Threading References problem fixed. A forum member can now also disable the signature when post to the gateway by uncheck "Show Signature". I must also point out: this is a quick hack to get my site up and running, so it may not be optimused nor it can be considered even near stable. You use it at your own risk. Some of the things I can think of after using this include: completely destroy your data, cause nasty replies from normal USENET users, the server may blow up...:)

===============================
For installation, please follow the Readme file contained in the zip file.
===============================

Edit: Fixed extra long References limitation.
Edit: Dec 4, fixed a typo in SQL string regarding attachment, possibly inherited from the original gateway.php. Please note, I have not been bothered to make the attachment fully working. Uploading fixed gateway.php
Edit: Dec 19 2003, uploading a new gateway.php which works with v3 Gamma. Modified the way of how to separate the new local posts and the new usenet posts.
Edit: Jan 21 2004, confirm my Gamma version of gateway.php also works for RC2.
Edit: Jan 23 2004, removed the older attachment gateway.php which was only good for vB3 Beta 7.

Please note, my current patched gateway.php does not work with "tableprefix". ie. if you defined tableprefix within config.php.

Rewrote the install instruction to save a lot of confusion.

Edit: Feb 2 2004

*Made "Xxxx Wrote:" working when reply/quote to a post.
*Added the ability to strip [font=xxx] BB tags.

Edit: Feb 4 2004

*Fixed the wrong thread link problem for the "goto newpost" at the forum list
*Uploaded the fixed gateway_RC2.zip

Edit: Feb 12 2004

*Added ability to strip nested BB tags.
*Uploaded a newer gateway_RC2.zip file.

Edit: Mar 2 2004

*Added ability to handle multiple attachments as in vb3.
*Uploaded gateway_Mar2.zip

(I have not tested this, but you should use this version if you want the attachment link(s) to work.)

Now confirmed the attachment is working. Removing older gateway.php

Edit: Mar 24 2004

*Discovered search index no longer worked with vB3 Gold due to a changed function name
*Uploading a fixed gateway.php (filename gateway_Mar24.zip)

Edit: May 12 2004

* I have done some major changes to the scripts. Improvement include:

== TABLE_PREFIX is now supported.
== Messages imported from usenet are now inserted into threads based
on Reference in the header instead of the subject.
== Built mechanism to avoid two instances of the gateway.php running
at the same time. This can easily happen if someone clicks the link in
the Who Is On Line page. This should also solve the problem of double
up posts and wrong post counters.
== Massive speed improvement!
== Cleaned up the codes.
== Implemented parentid for imported posts
== lastmessage is updated now after each message retrieval. This way
no message will be imported twice, even if the script is crashed at
some stage.
== Fixed a bug which occurs in long header lines. Message may not be
retrieved due to this bug.

This time instead of a quick hack, I have gone through almost each line. So it should be a much better script.

For people who has been using my previous gateway.php. It is strongly recommended to upgrade to this latest release. Please add the following records to your table:


INSERT INTO `nntp_settings` VALUES (NULL, 'Is Gateway Running', 'is_running', '0', 'Check if another instance of gateway.php is running', NULL, 0, 0);
INSERT INTO `nntp_settings` VALUES (NULL, 'Last Time Run', 'last_run', '1084316100', 'Last time the gateway.php was run', NULL, 0, 0);


Note for vB3. The thread view URL works with only "t=" instead as well as "threadid=". So you might like to change the 'threadurl' in the nntp_settings table. Check the attachment URL setting too. The format should be:

'http://forums.yourdomain.com.au/attachment.php?attachmentid='

Please also replace the nntp.php and mime.php with ones within the new zip file. I have made changes to nntp.php and mime.php files to fix bugs and make improvement.

(For people who downloaded the file earlier. Please download again. I made a stupid mistake in the gateway.php script.) The new file name is vb3_NNTP_Gateway_May12a.zip note the "a" in the file name)

Edit May 14 2004

**Build X-No-Archive header honouring system
**Improved speed
**Bug fixes
**Verbose output when run manually. Easier to find problem when interating with NNTP server.

change the honor_no-archive record from 0 to 1 to stop importing messages with X-No-Archive header, just as Google Group does.

For upgrade from the May12 release. Please replace all php files and insert two records into nntp_settings table

INSERT INTO `nntp_settings` VALUES (NULL, 'Honour No-Archive', 'honor_no-archive', '0', 'Do not import the message if the message has the X-No-Archive header set to yes. Google Group honours this Non-standard header.', NULL, 0, 0);
INSERT INTO `nntp_settings` VALUES (NULL, 'Last Max postid', 'last_postid', '0', 'The max postid in post table when the script was last run', NULL, 0, 0);


Edit: May 15 2004

* Fixed typos in nntp.sql and gateway.php.
* Modified setlastmsg.php to work with current versions.
* Packaged setlastmsg.php into the zip file.
* Reworded readme file regarding lastmsg.

Edit: May 16 2004

I have released the gateway under vB3 section of the forums. Please use the new thread for support. Latest files will always be posted to the new thread.

https://vborg.vbsupport.ru/showthread.php?t=65152

rishel
11-19-2003, 06:36 PM
Ok. Here is a problem when trying to use Giganews. Giganews boasts it has 50,000 supposed threads in a particular NG.

However, when we run the gateway to start importing ng threads, some are no longer available.

This causes a timeout on our server. So I downloaded a normal newsgroup reader: Agent and sure enough, some posts were missing from a year ago, and some were not.

Does anyone have a fix or a workaround for this. Our PHP.ini file has been modified for testing purposes to allow an unlimited amount of time, but this still does not work.

Any ideas?

allan grossman
11-19-2003, 07:19 PM
I asked this in email but I'll ask it again here :)

Why do you want year-old newsgroup posts? With Usenet usually if you get the last month's posts that's more than anybody will ever read.

Plus - although you can prevent folks from searching the Usenet forums if you want they still get added to the database when you rebuild your search index. That's a heck of a lot of space for something nobody's gonna read ;)

rishel
11-20-2003, 04:07 PM
Because of the content, the content in our ng group doesnt pass away, its always needed. Its automotive based, and there are a wide array of years that people want to search for.

Its a shame really, I was really hoping to bring in a lot more.

allan grossman
11-20-2003, 04:20 PM
Ah. I gotcha now.

Did you have any luck trying trying to download fewer headers at once?

liquidblaze
11-27-2003, 08:25 AM
I just wanted to sync the NG with my board for the first time on the new host and got this:


Invalid SQL: SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,post.ipaddress,thread.title,post.threadid,threa d.forumid,thread.msgid,thread.prefix FROM thread,post WHERE post.isusenetpost=0 AND thread.threadid=post.threadid AND (thread.forumid=25)
mysql error:

mysql error number: 0


any ideas what I could do?

liquidblaze
11-27-2003, 09:15 PM
I found the problem. had to re-run
ALTER TABLE thread ADD prefix varchar (24);
to get the sync working again - it was a problem with an importing script i had. thanks for this great hack man :)

KevinM
11-29-2003, 01:05 PM
I am attempting to put this into a clean vb3 board.

I am using the gateway script adapted by lierduh, with the rest being from Gilby's original.

I get the following error when running gateway.php for the first time:


Database error in vBulletin 3.0.0 Beta 7:

Invalid SQL: SELECT post.postid,post.username,post.userid,post.datelin e,post.attachmentid,post.pagetext,post.showsignatu re,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=2) mysql error: Unknown column 'post.attachmentid' in 'field list'

mysql error number: 1054


Any ideas?

jarvis
11-29-2003, 02:54 PM
All,

I have had this hack running on/off for over a year now. One of the big things that keeps me from consistently using it is the search feature and new posts count when a user logs in.

Anyways, I have fixed the search feature to discriminate between Usenet and normal forum posts but have not yet figured out how to disciminate between the new posts counter to exclude the two types of posts.

Rambling, I know, but I would like to see two numbers versus one large. :D

Anyways, I am by no means a php coder. I am horrible in coding, but I did figure it should be pretty easy to exclude a forumid from the $newposts routine?

Any help would be greatly appreciated!! :D

Thanks!

lierduh
12-03-2003, 07:31 PM
I am attempting to put this into a clean vb3 board.

I am using the gateway script adapted by lierduh, with the rest being from Gilby's original.

I get the following error when running gateway.php for the first time:



Any ideas?

Are you sure you are using gatewas.php patched by me?

attachmentid is not in any of the SELECT queries in my gateway.php. However, I did find a typo in one of the SQL statement regarding attachment, which does not give errors like the one you have anyway. I have uploaded the fixed gateway.php. Please grab the new one if you want to try it out.

csimo
12-07-2003, 05:28 PM
I'm not trying to cross any lines here, but does this work with vb3? If so it would be a lifesaver for me. Instructions? Info?

Thanks!

nkouts
12-07-2003, 07:45 PM
All,

I have had this hack running on/off for over a year now. One of the big things that keeps me from consistently using it is the search feature and new posts count when a user logs in.

Anyways, I have fixed the search feature to discriminate between Usenet and normal forum posts but have not yet figured out how to disciminate between the new posts counter to exclude the two types of posts.

Rambling, I know, but I would like to see two numbers versus one large. :D

Anyways, I am by no means a php coder. I am horrible in coding, but I did figure it should be pretty easy to exclude a forumid from the $newposts routine?

Any help would be greatly appreciated!! :D

Thanks!
csimo - would love to know as well :)

Gardener
12-08-2003, 08:59 PM
lierduh,

Great work on this hack. I had it up and running on the beta release. Then I upgraded to gamma and reinstalled the hack and the latest gateway.php file you have and this is the error I'm getting:

Fatal error: Call to undefined function: convert_url_to_bbcode() in \www\vb3\gateway.php on line 181

lierduh
12-09-2003, 08:02 PM
I'm not trying to cross any lines here, but does this work with vb3? If so it would be a lifesaver for me. Instructions? Info?

Thanks!

Not, but I have a modified version:

https://vborg.vbsupport.ru/showpost.php?p=444521&postcount=658

lierduh
12-09-2003, 08:18 PM
lierduh,

Great work on this hack. I had it up and running on the beta release. Then I upgraded to gamma and reinstalled the hack and the latest gateway.php file you have and this is the error I'm getting:

Fatal error: Call to undefined function: convert_url_to_bbcode() in \www\vb3\gateway.php on line 181

I have this line on the top:
require_once("includes/functions_bbcodeparse.php");

The function is in that file. If it is not there anymore, please do a search for that function (convert_url_to_bbcode). If you use Linux, you can try:

#grep "function convert_url_to_bbcode" * -r

If this function does not exist anymore. Just delete the line containing this function in the gateway.php. It is only used to convert url to bbcode.

BenS
12-14-2003, 08:31 PM
When I run gateway.php it gives me a blank screen, any ideas?

BenS
12-14-2003, 08:46 PM
Ok, now it's asking me if I want to download gateway.php, what's wrong???

Gilby
12-14-2003, 09:01 PM
Ok, now it's asking me if I want to download gateway.php, what's wrong???

Sounds like you have your browser set up to download and save text files. The gateway script will output what it is doing in text instead of html so it tells the browser that in the header of the response.

lierduh
12-18-2003, 11:16 AM
lierduh,

Great work on this hack. I had it up and running on the beta release. Then I upgraded to gamma and reinstalled the hack and the latest gateway.php file you have and this is the error I'm getting:

Fatal error: Call to undefined function: convert_url_to_bbcode() in \www\vb3\gateway.php on line 181

I have uploaded a new gateway.php for working with the v3 Gamma. Please refer to my original post.

KevinM
12-20-2003, 03:00 PM
Thanks lierduh, I have this working for vb3, however none of the posts are searchable (there are always no results). Is there something I need to alter?

lierduh
12-24-2003, 10:09 PM
Thanks lierduh, I have this working for vb3, however none of the posts are searchable (there are always no results). Is there something I need to alter?

That rings a bell, I might not have that implemented at the time. I will go through the code later to fix this.

Edit:

I just had a look, the code actually has the search index builder at line 262 and 353. In this case, I am not sure why the posts are not searchable for you. Perhaps make sure you have:

// build_post_index function
require_once("includes/functions_databuild.php");

in the code.

dethfire
12-29-2003, 04:48 AM
I get these errors

1 group(s) gatewayed.
Could not connect to NNTP-serverLogging in to groups.google.com, group rec.autos.sport.misc
Not connectedNot connected

KevinM
12-31-2003, 08:24 PM
Lierduh> I've upgraded to gamma (forum & gateway) but still have the same problem. All the lines are in the code. Searching is enabled on the boards, I just get 'sorry no matches'. I've had a look at the db in phpmyadmin - there are no entries in the 'word' table (from memory I think that is where the index is built). Same thing with thread preview. I'll keep looking..

Dethfire> I'm not aware that google groups provide a usenet/newsgroup feed. You need a provider like www.teranews.com or www.newsfeeds.com

recumbent615
01-04-2004, 04:37 PM
I have attempted to read through these for anyone seeing the same issue but for some reason I keep getting the "minimum word length 3" error... and I may have missed a post or two in this long thread so I'm sorry if this has been addressed.

I'm using this hack to gateway a mailing list, works nice, but I have been seeing a few odd things in the gatewayed posts. here is one:

I see in my gatewayed forum a post that came from email that looks like this :


# Exim filter <<=3D=3D do not edit or remove this line!
if
$domain does not contains backup and
${original_local_part} is not "root"
then
unseen deliver \

${local_part_prefix}${original_local_part}$local_p
art_suffix@backup1.$domai=
n
endif


and this is the first router:

#this router does a system level per recipient filtering
#essentially just copying the file to a backup address
# user =3D smmsp
central_filter:
driver =3D redirect
address_data =3D $sender_address
errors_to =3D root@humph.com
# user =3D root
check_local_user
domains =3D +local_domains
local_parts =3D !lsearch;/etc/mail/domains/${domain}.no_backup
file =3D /usr/local/exim/confs/filters/$local_part
no_verify
allow_filter
allow_freeze


Why the "3D" every where there is an "=" sign

and also the "=" at the end of the second line below does not exist in the original message.

${local_part_prefix}${original_local_part}$local_p
art_suffix@backup1.$domai=
n


and that was all one line in the email not three...

the URL is: www.exim-users.org incase you want to take a look at the resulting posts.

Any Ideas?

Kevin

Gilby
01-04-2004, 05:00 PM
I have attempted to read through these for anyone seeing the same issue but for some reason I keep getting the "minimum word length 3" error... and I may have missed a post or two in this long thread so I'm sorry if this has been addressed.

What's the actual error that it spits out? It should say what line it's on. Is this error showing when running the gateway script? That sounds like the error you'd get if you try doing a search in the forum and the word has less than 3 characters.

As for your other problem, sounds like the original email is encoded and the script is not parsing it correctly. More info would be needed to solve it, such as the original message in raw form, complete with headers.

- Gilby

recumbent615
01-04-2004, 05:14 PM
Gilby,

I'll save off the next few days of messages so I can find one that is not working ... the search error was just the standard error message when your search list is not long enough . Not an error, just an explanation as to why I was asking a question that may have been asked before.

Kevin

Any SQL wizards out there able to tell me how to do a subsitution from inside a post? I'd love to run a sql command to replace the "=3D" with "=" in every post.

recumbent615
01-05-2004, 02:53 PM
Gilby,

You will be happy to hear that the problem is out side the scope of the NNTP gateway Hack. After looking closely at the incoming messages in the mailbox I see that some of them are already malformed in the way that they show up in the fourms. So the import is working just fine. I believe that this is being caused by either the client or mailman in doing a 8bit to 7bit conversion. But I will need to look at more malformed messages to determine what the problem is. So for now I will continue to import them as is, but it would be nice if I could fix the problem via sql if it is at all possible.

Kevin

limey
01-05-2004, 10:54 PM
Since the RC is out should I wait or try and fumble installing this hack now? :D

allan grossman
01-21-2004, 09:01 AM
I've got it running on RC2 - no problems.

limey
01-21-2004, 09:31 PM
Allan: two things: does the graphical interface work still? And....are you using the gateway.php that was recently posted or the one in post 1?

thanks.

allan grossman
01-21-2004, 11:08 PM
The graphical interface doesn't work in vB3. No biggie, though - the information's stored in the database. I didn't even have to edit it :)

You have to use the gateway.php that's on page 44. All I did was edit the signature routines a little to suit personal preferences and away it went. I'm running the cron job every hour just to make sure it works - I've posted through the interface and it appears to work just fine.

I upgraded to RC3 today - no problems.

Bro_Joey_Gowdy
01-22-2004, 04:17 PM
Im getting several errors mainly concerning the vBprefix code:: Could someone please make this an official release within the vB3 Mod. forums ?


Database error in vBulletin 3.0.0 Release Candidate 3:

Invalid SQL: SELECT varname,value FROM nntp_settings
mysql error: Table 'a51834.nntp_settings' doesn't exist

mysql error number: 1146

Date: Thursday 22nd of January 2004 06:32:40 PM
Script: http://www.joeygowdy.com/forum/gateway.php
Referer:
Username: Bro_Joey_Gowdy
IP Address:

lierduh
01-22-2004, 06:49 PM
My patched gateway.php on page 44 would not work with table prefix. It should not be hard to implement though. I think I will clean it up when the full release is out (if Gilby does not release the official version).

limey
01-23-2004, 05:32 AM
So you are saying if we dont use table prefix we are ok? If so I'm going forward. :D

Need some help lierduh
Ok do you first use the SQL that comes with the nntp_Gateway hack on page 1?

Then run the query on page 44?

And upload all the same NNTP files except swap your gateway for the old gateway.

Let me know if this is the procedure. Thanks alot.

lierduh
01-23-2004, 06:37 AM
Follow all the instruction in the README me inside the official version.

You need to add an extra field (ref) to the post table. Run this sql:

ALTER TABLE post ADD ref TEXT NOT NULL;

Then replace the gateway.php with the one on page 44.

I think that is all you need to do, it's been a while since I did it.:)

limey
01-23-2004, 02:59 PM
When I run gateway.php


Invalid SQL: SELECT field1 AS signature,usertitle,customtitle FROM user LEFT JOIN userfield ON user.userid=userfield.userid WHERE user.userid=184 LIMIT 1
mysql error: Unknown column 'field1' in 'field list'

mysql error number: 1054



Ok I deleted the hack completely out of the db and reapplied it from scratch and I get the same error as above. I'm gonna need some guidance on this one. thanks.

lierduh
01-23-2004, 11:38 PM
Invalid SQL: SELECT field1 AS signature,usertitle,customtitle FROM user LEFT JOIN userfield ON user.userid=userfield.userid WHERE user.userid=184 LIMIT 1
mysql error: Unknown column 'field1' in 'field list'

Above error basically says there is not a field called "field1" in the table "userfield" or "user". I just checked my db. field1 does exist in userfield table, it stores signatures for the user.

Please check your db, make sure "userfield" table exists and has a "field1" column.

allan grossman
01-24-2004, 01:57 PM
Above error basically says there is not a field called "field1" in the table "userfield" or "user". I just checked my db. field1 does exist in userfield table, it stores signatures for the user.

Please check your db, make sure "userfield" table exists and has a "field1" column.
Strange.

I migrated my production vB installation to vB3 and the hack quit working - and it was working fine on a vb3 test board :(

Running the script through a browser window works perfectly - running it as a cron job with lynx has started giving me 'Unable to add cookies, headers already sent' errors.

command line is

lynx -source http://forum.com/vb3/gateway.php > /var/log/cron.usenet

-dump does the same thing. -accept_all_cookies doesn't help either.

The thing runs fine in lynx but not as a cron job - and it used to run perfectly.

Any ideas?

lierduh
01-25-2004, 07:06 AM
Strange.

Running the script through a browser window works perfectly - running it as a cron job with lynx has started giving me 'Unable to add cookies, headers already sent' errors.

command line is

lynx -source http://forum.com/vb3/gateway.php > /var/log/cron.usenet

Any ideas?

This error means the script tries to set cookie, but the header has already been sent.

You might like to try:
lynx -source "http://forum.com/vb3/gateway.php?log=cron"in your cron file.

limey
01-25-2004, 02:31 PM
Ok got this working now...I had to add that field1 back to userfield. For some reason I know I never dropped that table, but it was gone nonetheless.

big thanks to lierduh and Alan for their help. I'll try out that lynx url for the cronjob.

limey
01-25-2004, 03:22 PM
Well it works but I still get this error when gateway.php is done running:

Making HTTP connection to www.domain.com
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.

Can't Access `http://www.domain.com/forums/gateway.php?log=cron'
Alert!: Unable to access document.

lierduh
01-25-2004, 09:32 PM
If your PC's browser works but not lynx on your server. Perhaps the server need to use a proxy server/gateway. Also if the server is behind a firewall using NAT. A local access to the web site might not be possible. ie. You need to access the web page from outside. In both cases, if you have a proxy server outside. You can confure lynx to use the proxy server.

You can do a simple test:

#export http_proxy=http://proxy.server.com:8080

before running lynx.

Can you write to /etc/lynx.cfg or /etc/lynx-site.cfg ?

limey
01-25-2004, 09:47 PM
Yes I can write to lynx.cfg. I think the problem may be a server timeout thing though, because I kept running gateway.php until the newsposts were updated, then I ran it again and went through without the error.

Interesting? :D

allan grossman
01-26-2004, 10:30 AM
This error means the script tries to set cookie, but the header has already been sent.

You might like to try:
lynx -source "http://forum.com/vb3/gateway.php?log=cron"in your cron file.

Thanks, lierduh - we'll see if it works.

Even more bizarre, the script works fine if I run it manually in *any* browser - including lynx. It also works as a vBulletin cron job.

allan grossman
01-26-2004, 11:02 AM
Replying to my own post...

Nope - that didn't work. I'm still getting the 'headers already sent' thingie. The weird thing is it used to work fine - but I'm experiencing some vB3 weirdness. Inline attachments and thumbnails quit working about the same time. I've been working with vB on this. For now, running the thing as a vB3 cron job appears to be working but wouldn't be my first choice ;)

limey
01-26-2004, 01:42 PM
I'm getting double posts..Its one of the reasons I scratched it and started over in the first place--not doing that again though. :D

Bro_Joey_Gowdy
01-26-2004, 03:54 PM
Has this been adapted to work with the vb# prefix codes yet ?




Im getting several errors mainly concerning the vBprefix code:: Could someone please make this an official release within the vB3 Mod. forums ?
Database error in vBulletin 3.0.0 Release Candidate 3:
Invalid SQL: SELECT varname,value FROM nntp_settings
mysql error: Table 'a51834.nntp_settings' doesn't exist
mysql error number: 1146
Date: Thursday 22nd of January 2004 06:32:40 PM
Script: http://www.joeygowdy.com/forum/gateway.php
Referer:
Username: Bro_Joey_Gowdy
IP Address:

allan grossman
01-26-2004, 04:15 PM
Joey, that's not vBprefix, that error's telling you the 'nntp_settings' table isn't present in your database - and it's kinda critical.

I'm at the office and my server's at home, but I believe the gateway requires three tables added to your forum database - and at least one of them doesn't exist.

Hope this helps -

allan grossman
01-27-2004, 10:59 PM
lierduh, I know your vb3 version on page 44 is a work in progress, but I've identitied a couple problems with the 'quote' function that I have no idea how to fix since all I do is install this stuff, not write it ;)

First, the whole 'Originally posted by' line doesn't work and I don't know why. I know you wanted to change the text to "xxx wrote:" but that doesn't work either.

The routine does put *two* > characters at the head of the quote with a random character between them (I've seen 'e' and an apostrophe) but the quoted person's name is missing from the post.

I'm gonna play with this some tomorrow but I think I'm way out of my league.

One more question - I use "{1} said..." instead of the default. Can you help me a little if you have time?

stroke25
01-31-2004, 10:14 PM
Heres the error im getting when running gateway.php (using gateway file from pg.44)

---------------------------------------------------------
1 group(s) gatewayed. Logging in to news.XXXXXXXXXXX.com, group control.XXXXxXX

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: SELECT post.postid,post.username,post.userid,post.datelin e,post.pagetext,post.showsignature,post.ipaddress, thread.pollid,thread.title,post.threadid,post.atta ch,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=36)
mysql error: Unknown column 'post.isusenetpost' in 'where clause'

mysql error number: 1054

----------------------------------------------------------

EDIT: Thanks for the reply i did miss a step in nntp.sql

Everything seems to be working good now. :)

lierduh
01-31-2004, 10:42 PM
Heres the error im getting when running gateway.php (using gateway file from pg.44)

mysql error: Unknown column 'post.isusenetpost' in 'where clause'

mysql error number: 1054

----------------------------------------------------------

This means you do not have the "isusenetpost" field in your "post" table. You might like to make sure the nntp.sql (? comes with the original file) is run.

lierduh
01-31-2004, 10:46 PM
lierduh, I know your vb3 version on page 44 is a work in progress, but I've identitied a couple problems with the 'quote' function that I have no idea how to fix since all I do is install this stuff, not write it ;)

One more question - I use "{1} said..." instead of the default. Can you help me a little if you have time?

I will have a look.

limey
02-01-2004, 03:07 AM
FYI this has been working flawless on RC2 afraid to upgrade to RC3 :D

lierduh
02-01-2004, 11:50 AM
I have uploaded a new gateway.php to page 44.

"Xxxx Wrote:" is working now. I have also added the ability to strip the [font=xxx] tags.

Alan, I am not quite sure what you meant about {1} Said.

In vB3, the quote text works by using this tag:

Text

Where the Username is the user who sent the original quoted text.

I am only running RC2 at the moment. A quick browse through RC3 release note indicated very little difference between them. So I think the script should work with RC3.

allan grossman
02-01-2004, 03:39 PM
Never mind - it looks like you picked a whole different way of doing the quote thing - I tested it and it works just fine.

Thanks!

allan grossman
02-03-2004, 12:45 PM
One thing, though -

Since I upgraded to the new script there's some weirdness in the "last post" column on forumhome - the thread links on forumhome point to the wrong thread. Everything else works just fine ;)

You can check it out on http://ebassist.com - you don't need an account to read.

thanks, lierduh - if there's anything I can do to help you with this please don't hesitate to holler.

lierduh
02-03-2004, 08:20 PM
Uploaded a fixed gateway_RC2.zip on page 44.:)

Thanks for finding out the problems, Alan.

A few other things I need to work on include:

* Further strip all BB tags before sending the local posted posts to Usenet. This should include the custom BB codes
* Table prefix workability
* Email notification for new Usenet posts

...

I will keep working on it bit by bit unless Gilby releases the official vB3 version of gateway.php

allan grossman
02-03-2004, 09:50 PM
Um - that didn't fix it? Mine's still got thread titles mixed up :(

What you've got so far is working just great. All I found was that one little glitch. Let me know if I can help - I'm not a coder but I'm a heck of a tester.

My gateway runs every ten minutes - you can check it out anytime you like ;)

cheers -

lierduh
02-03-2004, 10:10 PM
It will fix itself up after a new usenet post is retrieved.:) Let me know if the problem persists. (don't tell me I uploaded the wrong one).

allan grossman
02-03-2004, 10:46 PM
The gateway's already picked up a few posts and the thread title still isn't working.

You might wanna check version numbers - at least it'll be an easy fix ;)

lierduh
02-03-2004, 11:00 PM
Please check around line 274. It should be like this:

// update forum
$DB_site->query("UPDATE forum SET
replycount=replycount+1,lastpost='".$date."',".
"lastposter='".addslashes(from_name($message[from]))."',".
"lastthreadid=" . $threadid . " , " .
"lastthread='".addslashes($message[subject])."' WHERE ".
"forumid IN ($foruminfo[parentlist])");


and around line 364:


// update the forum counts
$DB_site->query("UPDATE forum SET
replycount=replycount+1,threadcount=threadcount+1,".
"lastpost='".$date."',lastposter='".addslashes(from_name($message[from]))."',".
"lastthread='".addslashes($message[subject])."', " .
"lastthreadid= " . $threadid .
" WHERE forumid IN ($foruminfo[parentlist])");


I just checked, I did upload the right one. I am wondering if your proxy server could give you an older version.

The lastthreadid is used for the front page link. Please check your database to see if that is updated each time a post is imported.

allan grossman
02-03-2004, 11:12 PM
No proxy - I own the server ;)

The line 364 section was different from what you just posted - here's what I had:

// update the forum counts
$DB_site->query("UPDATE forum SET
replycount=replycount+1,threadcount=threadcount+1,".
"lastpost='".$date."',lastposter='".addslashes(from_name($message[from]))."',".
"lastthread='".addslashes($message[subject])."' WHERE forumid IN ($foruminfo[parentlist])");

I changed it to what you just posted.

allan grossman
02-03-2004, 11:30 PM
But - it's still not working :(

Let me know what I can do to help, lierduh. I'm not the sharpest knife in the drawer but can follow instructions pretty well ;)

lierduh
02-04-2004, 06:26 AM
The two sections were copied from the file I downloaded from page 44. So I know the new file contains the fix.

You apparently are using the older one, because you have to manually alter the code. There are two sections need to be changed.

When I said Proxy server, I was wondering if you were getting the old file instead of the new gateway_RC2.zip file. Your ISP could have a transparent proxy.

====
Edit, I just checked your site. Apparently the link for a new thread is working, but not the thread with inserted post. Because you changed the code around line 36?, but not the line 27?. :-)

allan grossman
02-04-2004, 08:36 AM
Weirdness.

The reason I didn't change the code in 27? is that the code was identical to what you posted. I changed it anyway just now for grins, but if new threads are working (and it seems they are) then I can just wait for the problem to go away all by itself ;)

Thanks, lierduh!

allan grossman
02-05-2004, 01:34 PM
Seems to be working just fine, lierduh - thank you very much.

One more thing I could use if you're still into developing this - can we get the gateway to honor an 'X-No-Archive: Yes' header?

thanks - I think after this I'll probably leave you alone for awhile.

cheers -

allan

lierduh
02-05-2004, 05:19 PM
One more thing I could use if you're still into developing this - can we get the gateway to honor an 'X-No-Archive: Yes' header?


Allan,

Around line 748, find the code:
$response = $news->post(snip......)\r\nX-Originating-IP: $newthread[ipaddress]$ref");

change the ending to:

$response = $news->post(snip......)\r\nX-Originating-IP: $newthread[ipaddress]\r\nX-No-Archive: Yes$ref");

Edit: read your post again. You may be after something different. Do you want the forums to delete these posts after a while? hence does not archive them?

allan grossman
02-05-2004, 07:02 PM
Allan,

Around line 748, find the code:
$response = $news->post(snip......)\r\nX-Originating-IP: $newthread[ipaddress]$ref");

change the ending to:

$response = $news->post(snip......)\r\nX-Originating-IP: $newthread[ipaddress]\r\nX-No-Archive: Yes$ref");

Edit: read your post again. You may be after something different. Do you want the forums to delete these posts after a while? hence does not archive them?
I want the forum to not pick them up at all, lierduh. Is it possible?

allan grossman
02-05-2004, 07:09 PM
I want the forum to not pick them up at all, lierduh. Is it possible?
To clarify a little - Google (and before them, Dejanews) won't grab posts where 'X-No-Archive: Yes' is in the header. I need for posts with this header to not make it into my forums.

thanks - you've been swell on this.

lierduh
02-06-2004, 06:15 AM
Around line 153, find this line:

$thisheader=getHeaders(s..................

Add the following lines after that line:

if (isset($thisheader['X-No-Archive'])) {
if ($thisheader['X-No-Archive'] == 'Yes') {
continue;
}
}
I have not tested that. So back up your old file.:)

allan grossman
02-06-2004, 08:26 AM
edit:

Didn't work, sorry :(

Would it be easier to parse the whole post (including header) for

X-No-Archive:<space>Yes

and just bail out of the whole import routine if the string exists? That'd get the damn thing, I'll bet ;)

lierduh
02-07-2004, 09:14 PM
Try
if ( trim($thisheader['X-No-Archive']) == 'Yes') {
or

if ( stristr($thisheader['X-No-Archive'], 'yes') {

allan grossman
02-08-2004, 10:28 AM
Actually, the first one appears to be almost working now - but if someone with X-No-Archive set replies to a post made through the gateway the post is getting through.

If you compare alt.guitar.bass to my gateway of the newsgroup at http://ebassist.com - there's a poster named "Lynrd" who has X-No-Archive set.

If you look at the past couple hundred posts in the NG I haven't pulled one of his posts - but he just replied to a thread I started and the gateway pulled it in.

The thread I started was called "The final solution - or, 'Hey, Lynrd!'" - and I've got no posts from him in the last two days - although there are four or five in the newsgroup. But - when he replied to the post I made through the gateway the gateway picked it up.

Any thoughts?

I'm gonna try the two other lines you gave me to try.

thanks ;-)

lierduh
02-09-2004, 07:56 AM
Could you post the entire headers of the post he replied and one of his other posts.

Also for debugging purpose, add this line after that getHeader line

print_r($thisheader);

allan grossman
02-09-2004, 08:26 AM
Okay -

this one showed up in the forum

Path: internal1.nntp.sjc.giganews.com!border2.nntp.sjc.g iganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.e asynews.com!easynews.com!easynews!bigfeed2.bellsou th.net!bigfeed.bellsouth.net!bignumb.bellsouth.net !news.bellsouth.net!bignews3.bellsouth.net.POSTED! 50720933!not-for-mail
From: Lynrd <iamnot@this.com>
Newsgroups: alt.guitar.bass
Subject: Re: The final solution - or, 'Hey, Lynrd!'
Organization: Department of Redundancy Department
Message-ID: <402b4ddd.213014098@server1.loosenet4free.com>
References: <allan.11bapm@ebassist.nospam.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
X-No-Archive: yes
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 37
X-Trace: bhmkggakljkaanefdbdpiflmbcekedmfhojhikkbagflhcbojj cppjnbmkeghkjnaebckapdlcgdmfgdjabdbdkfgappaidgiloo kconkabkfbidlnmbhlcnknekmbegpccnnhdpgmpjjbpkekfngo dfappodfma
NNTP-Posting-Date: Sun, 08 Feb 2004 09:52:40 EST
Date: Sun, 08 Feb 2004 08:57:33 -0600
Xref: intern1.nntp.aus1.giganews.com alt.guitar.bass:354721

but this one did not:

Path: internal1.nntp.sjc.giganews.com!border2.nntp.sjc.g iganews.com!nntp.giganews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.e asynews.com!easynews.com!easynews!bigfeed2.bellsou th.net!bigfeed.bellsouth.net!bignumb.bellsouth.net !news.bellsouth.net!bignews6.bellsouth.net.POSTED! not-for-mail
From: Lynrd <iamnot@this.com>
Newsgroups: alt.guitar.bass
Subject: Re: You?
Organization: Department of Redundancy Department
Message-ID: <40243584.75709184@server1.loosenet4free.com>
References: <imf720dok6ldvtjphvhli0u7sfoqjcvhi2@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
X-No-Archive: yes
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 38
X-Trace: ofjmidbaofeaohdodbdpiflmbcekedmfhojhikkbagflhcboea gmlgmoifpnnejlkaikhjbiabbhpmpljabdbdkfgappaidgokda icblneaplmodlnmbhlcnknekmbegfnkjinielkkcgcglnjgdkc epeeifcdbb
NNTP-Posting-Date: Fri, 06 Feb 2004 19:49:04 EST
Date: Fri, 06 Feb 2004 18:52:20 -0600
Xref: intern1.nntp.aus1.giganews.com alt.guitar.bass:354456

The first of the two new lines didn't work i I'm gong back to the one that did in post #727

Also, I found the "get headers" line was missing from the script (one too many cut-and-pastes, I'm afraid) - so let's not do anything different until I've got solid information on what works now that I've got the script back where it needs to be.

Sorry to have wasted a little of your time on this, lierduh - I didn't see the line was missing. I'll let you know what happens after I run this for a couple days.

lierduh
02-09-2004, 08:40 AM
You need to use the third option in this case (pun intended).

So insert these:

if (isset($thisheader['X-No-Archive'])) {
if ( stristr($thisheader['X-No-Archive'], 'yes') ) {
continue;
}
}

allan grossman
02-09-2004, 10:23 AM
You need to use the third option in this case (pun intended).

So insert these:

if (isset($thisheader['X-No-Archive'])) {
if ( stristr($thisheader['X-No-Archive'], 'yes') ) {
continue;
}
}
I think we're almost there.

Thanks, lierduh.

allan grossman
02-09-2004, 10:20 PM
If I wanted to check for upper- and lowercase would I do it like this?

if (isset($thisheader['X-No-Archive'])) {
if ( stristr($thisheader['X-No-Archive'], 'Yes' || 'yes') ) {
continue;
}
}

lierduh
02-09-2004, 10:29 PM
If I wanted to check for upper- and lowercase would I do it like this?

if (isset($thisheader['X-No-Archive'])) {
if ( stristr($thisheader['X-No-Archive'], 'Yes' || 'yes') ) {
continue;
}
}


stristr is case INsensitive.:)

allan grossman
02-09-2004, 10:32 PM
Ah. Then I don't need to do anything.

Let me run it for a couple days and I'll let you know what happened.

Thanks a million, lierduh - I'm hoisting a glass in your direction right now :)

Bro_Joey_Gowdy
02-12-2004, 03:25 PM
Im now getting another error in line 37 of gateway.php
http://www.joeygowdy.com/forum/gateway.php

allan grossman
02-12-2004, 03:39 PM
Which version of the gateway - the vB2.x version on page 1 or the one lierduh modified for vB3 on page 44?

The reason I ask is that in lierduh's version line 37 is commented out. Can you paste line 37 into a message here for us?

thanks -

fluxforums
02-20-2004, 01:03 AM
I have installed this hack along with the VB3 RC2 gateway upgrade along with ALTER TABLE post ADD ref TEXT NOT NULL;

My nntp_groups reflect....

biz.marketplace.web-design varchar(200) No
General Web Design varchar(32) No 0
prefix varchar(255) No
lastmsg int(11) No 0
news.comcast.giganews.com varchar(64) Yes NULL
xxxxxx varchar(32) Yes NULL
yyyyyy varchar(32) Yes NULL
enabled int(11) No 1

When running....
http://etcetc/gateway.php I receive...

0 group(s) gatewayed.

Am I missing something rudimentary here?

fluxforums
02-22-2004, 05:14 AM
I have resolved that error by correcting the forum variable with an ID as read in the readme.

Now I am receiving...

1 group(s) gatewayed.
Logging in to news.comcast.giganews.com, group xxx.xxxx.xxx
Posting Message from FluxForums: 500 syntax error or unknown command
Posting Message from FluxForums: 480 authentication required
Posting Message from FluxForums: 500 syntax error or unknown command

And neither threads are exported (which I dont mind) to the newsgroup or threads imported (which of course I would like). This occurs in other newgroups within giganews.com server as well.

BTW: These are direct copy and paste names that I have verified to work in my Outlook Express so I am not sure why the authentication error is comming up.

I am running VB3 RC3


*NOTE: I believe I found the answer to this on Page 12 of this thread. It looks like giga does not allow access outside its networks. I will signup for another usenet provider and try it.



I have installed this hack along with the VB3 RC2 gateway upgrade along with ALTER TABLE post ADD ref TEXT NOT NULL;

My nntp_groups reflect....

biz.marketplace.web-design varchar(200) No
General Web Design varchar(32) No 0
prefix varchar(255) No
lastmsg int(11) No 0
news.comcast.giganews.com varchar(64) Yes NULL
xxxxxx varchar(32) Yes NULL
yyyyyy varchar(32) Yes NULL
enabled int(11) No 1

When running....
http://etcetc/gateway.php I receive...

0 group(s) gatewayed.

Am I missing something rudimentary here?

fluxforums
02-22-2004, 06:49 AM
Bingo!

Now if only I can figure out why the thread and post count has updated but I do not see the actual threads in the forum.

I have resolved that error by correcting the forum variable with an ID as read in the readme.

Now I am receiving...

1 group(s) gatewayed.
Logging in to news.comcast.giganews.com, group xxx.xxxx.xxx
Posting Message from FluxForums: 500 syntax error or unknown command
Posting Message from FluxForums: 480 authentication required
Posting Message from FluxForums: 500 syntax error or unknown command

And neither threads are exported (which I dont mind) to the newsgroup or threads imported (which of course I would like). This occurs in other newgroups within giganews.com server as well.

BTW: These are direct copy and paste names that I have verified to work in my Outlook Express so I am not sure why the authentication error is comming up.

I am running VB3 RC3


*NOTE: I believe I found the answer to this on Page 12 of this thread. It looks like giga does not allow access outside its networks. I will signup for another usenet provider and try it.

fluxforums
02-22-2004, 07:13 AM
Changed the forums viewing age. Good to go.

Is there a way to prevent threads from being exported into a newsgroup?


Bingo!

Now if only I can figure out why the thread and post count has updated but I do not see the actual threads in the forum.

Also, is there a way to prevent threads from being imported into a newsgroup?

Cluster One
02-23-2004, 07:35 AM
Is there another way to run the gateway.php script? I've ran it on my webhost and it basically kills the server. Sucks up all the RAM and CPU usage.

allan grossman
02-23-2004, 08:28 AM
Changed the forums viewing age. Good to go.

Is there a way to prevent threads from being exported into a newsgroup?

Nope. I'm afraid there isn't.

allan grossman
02-23-2004, 08:32 AM
Is there another way to run the gateway.php script? I've ran it on my webhost and it basically kills the server. Sucks up all the RAM and CPU usage.

It shouldn't be too bad once the newsgroups are synchronized. Have you got all the messages in the group or are you still trying to fill up the forum with older posts?

I run my gateway against one group that gets maybe 200 posts a day - my cron job runs every ten minutes. It doesn't work my server all that hard but of course, YMMV.

Cluster One
02-23-2004, 06:54 PM
I set the last message to only get the last 30 days worth of posts from the groups, doubt anyone is going to read a message that was posted on 6/2/2003 anyways.

I installed the script, I run in it mozilla and all it says is this:

2 group(s) gatewayed.
Logging in to news.usenetserver.com, group alt.tv.angel
Logging in to news.usenetserver.com, group alt.tv.buffy-v-slayer

Nothing happens after that, it just sits there. I've even left it like that for over an hour.

allan grossman
02-23-2004, 08:05 PM
Look on page 24, Cluster One - there's a version of nntp.php that does verbose output - maybe you can use that to determine where the problem is. It's in post #351.

Good luck!

Cluster One
02-23-2004, 09:10 PM
group(s) gatewayed.
200 Powered by Usenet Server -- fe13 -- http://www.usenetserver.com/ (Tornado v1.0.5.353)
381 More Authentication Required
480 Authentication Required
Logging in to news.usenetserver.com, group alt.tv.angel
200 Powered by Usenet Server -- fe13 -- http://www.usenetserver.com/ (Tornado v1.0.5.353)
381 More Authentication Required
480 Authentication Required
Logging in to news.usenetserver.com, group alt.tv.buffy-v-slayer

Thanks for the help, but still it says 480 Authentication Required, but I have my login/pass setup correctly in the SQL database? Any other ideas?

I attached an image of my configuration.

allan grossman
02-24-2004, 01:34 AM
group(s) gatewayed.
200 Powered by Usenet Server -- fe13 -- http://www.usenetserver.com/ (Tornado v1.0.5.353)
381 More Authentication Required
480 Authentication Required
Logging in to news.usenetserver.com, group alt.tv.angel
200 Powered by Usenet Server -- fe13 -- http://www.usenetserver.com/ (Tornado v1.0.5.353)
381 More Authentication Required
480 Authentication Required
Logging in to news.usenetserver.com, group alt.tv.buffy-v-slayer

Thanks for the help, but still it says 480 Authentication Required, but I have my login/pass setup correctly in the SQL database? Any other ideas?

I attached an image of my configuration.
Maybe - it sounds to me like the news server isn't getting your password. Check this out -

http://www.mibsoftware.com/userkt/nntpext/0032.htm

AUTHINFO USER username
AUTHINFO PASS password

The original AUTHINFO is used to identify a specific entity
to the server using a simple username/password combination.
It first appeared in the UNIX reference implementation.

When authorization is required, the server will send a 480
response requesting authorization from the client. The
client must enter AUTHINFO USER followed by the username.
Once sent, the server will cache the username and may send
a 381 response requesting the password associated with that
username. Should the server request a password using the 381
respose, the client must enter AUTHINFO PASS followed by
a password and the server will then check the authentication
database to see if the username/password combination is valid.
If the combination is valid or if no password is required,
the server will return a 281 response. The client should then
retry the original command to which the server responded with
the 480 response. The command should then be processed by
the server normally. If the combination is not valid, the server
will return a 502 response.

Clients must provide authentication when requested by the server.
It is possible that some implementations will accept authentication
information at the beginning of a session, but this was not the
original intent of the specification. If a client attempts to
reauthenticate, the server may return 482 response indicating
that the new authentication data is rejected by the server.
The 482 code will also be returned when the AUTHINFO commands
are not entered in the correct sequence (like two AUTHINFO
USERs in a row, or AUTHINFO PASS preceding AUTHINFO USER).

All information is passed in cleartext.

When authentication succeeds, the server will create an email
address for the client from the user name supplied in the
AUTHINFO USER command and the hostname generated by a reverse
lookup on the IP address of the client. If the reverse lookup
fails, the IP address, represented in dotted-quad format, will
be used. Once authenticated, the server shall generate a Sender:
line using the email address provided by authentication if it
does not match the client-supplied From: line. Additionally,
the server should log the event, including the email address
This will provide a means by which subsequent statistics generation
can associate newsgroup references with unique entities - not
necessarily by name.

3.1.1.1 Responses

281 Authentication accepted
381 More authentication information required
480 Authentication required
482 Authentication rejected
502 No permission

Hope that helps a little -