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)

nuno 02-03-2003 10:04 AM

Quote:

Originally posted by Gilby


You shouldn't get that error, unless the php installation you are using is running in safe mode, which is likely the case for you. Anyways, you'll need to log into your newsgrop server with another news program and find the id of the message you want to start from and enter that number in the database under the lastmsg column. The number can be found in the header of the message at the end of the Xref line.

I'm getting timeouts too.
PHP is not running in safe mode.
If i change the lastmsg column field in db and re-run gateway.php all i get is a DNS error, a file not found error.

nuno 02-03-2003 09:35 PM

Quote:

Originally posted by Gardener


You are never going to get it downloaded. It's just too much. I tried downloading php.general on a test server here at home with a P4 and 1 gig of ram and it choked on the amount of data. There are just too many posts there to download them all. Your best bet is to go back about 6 months and get a post number and enter that number for the last post number.

heheh done. :)
Grabbed 30k posts, all at once, and no connection timeout, you just have to fool the browser. :D

Tigga 02-07-2003 06:13 PM

d

gopherhockey 02-11-2003 07:46 PM

This hack absolutely rocks. By far this is going to add more functionality to our forums than anything I've seen.

Thank you, thank you THANK YOU!!!

INSTALL............... :banana:

gopherhockey 02-12-2003 04:37 AM

I apologize if this has already been answered here, but this thread is getting long and my searches resulted in no answers.

What I would like to do is have the ability to post a sticky thread into the forum without that one being sent out to the related usenet newsgroup.

I guess this becomes a 2 part question:

1. Can you post a sticky thread and will that screw up the system?

2. Is there a way to post in my forum and not have it be sent out to the public.

(I tried running the setlastmsg thing, but that seems to only work on incoming, not outgoing)

Thanks!

Schorsch 03-05-2003 08:07 PM

edit: sorry for double posting!

Schorsch 03-05-2003 08:09 PM

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"

SRozhon 03-05-2003 09:48 PM

Quote:

Originally posted by nuno


heheh done. :)
Grabbed 30k posts, all at once, and no connection timeout, you just have to fool the browser. :D

Can I ask How did you do this? Mine always timesout. I love this script though.

Another question--I'd like to be able to delete the posts without opening them up first (sometimes I can tell what is spam or unrelated to the topic without opening them) and since I edit the garbage out this would make things much easier. Is there a way?

Question 3:
Is there a way to not include the previous replies, etc. that show up under the users post? A lot of times it is just the same thing over and over in each persons post--and this just seams to take up space. Just wondering... Thanks!

Schorsch 03-05-2003 11:38 PM

I have another important question:

How can I exclude the newsgroups forums from the search function ??????

Marv 03-05-2003 11:54 PM

First - it?s a really great hack so far and I want to thank the author for sharing it with us.

But as Schorsch mentioned before - most people in serious newsgroups are not very amused by the produced signature.
Couldn?t there be a way that this hack reads out the mail-adress from the database and takes that as signature ? May be like
Quote:

Contact: emailadress@poster.com
---
posted via NNTP-gateway through http://board.yourdomain.com
Abuse: abuse@yourdomain.com
Not at least I would aprecciate that the mailadress of the poster is his own. Actual the poster-adress in those ng-postings is set to "membername.12345@yourdomain.com - and that?s far from beeing neat if you have a <catchall>-mailfunction running on your domains - never had that much spam before... :surprised: <args>

And beside that other ng-users can calm down.. - actual it?s really producing lots of trouble...

Just my two thoughts - but I think it?s really important.

Marv.

Marv 03-06-2003 12:37 AM

Oups..forgotten: does anybody know if this hack works with the 3.0 RC3 ?

Thx,
Marv.

Gilby 03-06-2003 01:17 AM

Quote:

Originally posted by MaXxed
2. How does this hack handle outgoing attachments? I have them disabled by default as I am using text groups, but I am curious what would happen.
It'll post a URL to the file on your server.

Gilby 03-06-2003 01:19 AM

Quote:

Originally posted by Gardener
Gilby,

I posted before aobut trying to use this hack to download some biniary groups, but I was having trouble with the uuencoded attachments. I've been looking for a way to solve this, and someone sent me here: http://www.php.net/manual/en/function.base64-decode.php

Would this work? I'm willing to pay for this if you can get it working. PM me with the details.

Thanks

That won't work. The script currently supports mime encoded attachments but doe snot support uuencoded attachements.

Gilby 03-06-2003 01:24 AM

Quote:

Originally posted by Jose
Nice hack! Easy to install, and works nicely. My only wish is to be able to set up a newsgroup or POP email that is read-only. That is, posts/emails are read and posted to the forum, but forum replies or new threads are not sent outside the forum. I'm thinking of a different value for the 'enabled' field, or via the use of the "undocumented" prefix.

Any volunteers to try to do this? If no takers, I might do it next weekend.

If you go the email route, just set it up to pull the messages from teh pop server and then send the messages to a "dump" address (where it'll be deleted and not delivered). Or just comment out the lines that sends out the email or newsgroup post.

Gilby 03-06-2003 01:27 AM

Quote:

Originally posted by efoo
just installed this hack in order to archive some email lists and it works great - thanks. However, I've got one hurdle to overcome when it comes to automating the run of gateway.php. My board is off-limits to guest users, so trying to execute gateway.php without first logging into the board manually results in a "you are not logged in" page when the script tries to make all the posts. Is there any way to write a cron job that can both log into the forum and run gateway.php (from lynx)?
You might be able to create a dummy account and then just set the username and password as variables in teh gateway script so that whenever the gateway script is run it'll use that username and pass.

Gilby 03-06-2003 01:28 AM

Quote:

Originally posted by Cluster One
I'm having a bit of trouble.

What i've done is I've installed hamster to pull messages from various newsgroups onto my computer, then setup the addon to download these headers from my pc to the website (Basically my ISP has IP masked access that only allows my IP here to login, but not my websites IP)

My problem is when I run the gateway script, it goes for a few minutes then asks me to download the file? Did i mess something up?

I mean it is actually obtaining the headers and putting them in the forums, its just annoying to get that window.

Sounds like you have your web browser set up incorrectly so that it won't display text files in teh browser window, but instead prompts you to save it.

Gilby 03-06-2003 01:31 AM

Quote:

Originally posted by MaXxed
I have a potential issue. I have been running this hack on my forums for a few months now without problems, it has been working excellently.

Today I have found that my news provider has suspended my posting privelages. This may imply that I will need to change providers.

Should I simply change providers (and the settings on the hack) - I am concerned that I will have thousands of duplicate posts on the first sync.

Any idea how I could make the transition painlessly?

You need to get the message id number of the last post on your new server, which is unique to each news server and set it in the msgid column so that it'll pull starting from there.

Gilby 03-06-2003 01:32 AM

Quote:

Originally posted by Gardener
Well, I can get it to work on my ISP's POP3 account, but not on the POP3 accounts on my server. I'm still trying to find out how to fix this.
What mail server do you have?

Gilby 03-06-2003 01:33 AM

Quote:

Originally posted by qnx
is this hack dead?
I noticed the author (Gilby) hadn't said a word in the forum for more than three months.
Lots of questions/suggestions left unanswered.

I've been busy working on other projects. Sorry about putting this hack on the back burner.

Gilby 03-06-2003 01:40 AM

Quote:

Originally posted by gopherhockey
1. Can you post a sticky thread and will that screw up the system?

2. Is there a way to post in my forum and not have it be sent out to the public.

A sticky thread will work normally (but of course wont be sticky on the news server). To post to the forums and not have it go to the newsgroup, you'll need to make the post and then change the value in the post table to make the gateway script think it was already sent by changing the "isusenetpost" column to 1 for that post.

Gilby 03-06-2003 01:43 AM

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

/*!
-- 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:
Quote:

Mime-Version: 1.0
Content-Type: multipart/mixed
The body should be encoded with MIME, too :
Quote:

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

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

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.

PHP Code:

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

Code:

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

Code:

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

Code:

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

Code:

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


All times are GMT. The time now is 11:10 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.02305 seconds
  • Memory Usage 1,892KB
  • 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
  • (1)bbcode_php_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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