vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   NNTP Gateway (Usenet/Newsgroups) (https://vborg.vbsupport.ru/showthread.php?t=35247)

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 :

Code:

# 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.
Code:

${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

Quote:

Originally Posted by recumbent615
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

Quote:

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

Quote:

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

Quote:

Originally Posted by lierduh
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

Quote:

Originally Posted by allan grossman
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:
Code:

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

Quote:

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

You might like to try:
Code:

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 ?




Quote:

Originally Posted by Bro_Joey_Gowdy
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

Quote:

Originally Posted by stroke25
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

Quote:

Originally Posted by allan grossman
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:

PHP Code:

[QUOTE=Username]Text[/QUOTE

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:

PHP Code:

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

PHP Code:

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

PHP Code:

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


All times are GMT. The time now is 12:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02070 seconds
  • Memory Usage 1,866KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete