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)

saab340 03-02-2002 02:16 AM

oooohhh... I am not that good.

Is there a way to add that to the code....
I could redownload them all again... since I have cron running I would like to get them stripped then, and not running things twice.

I know there is a way of doing that by using perl, but even my perl would not be able to do so...

would that be hard? ie should I ask custom job for this?
How much would it cost approx?

Gilby 03-02-2002 02:24 AM

Quote:

Originally posted by saab340
Is there a way to add that to the code....
I could redownload them all again... since I have cron running I would like to get them stripped then, and not running things twice.

find this:
Code:

$message[text] = preg_replace("/((\n[ ]*>[^\n]*)+)/","[ color=blue]\\1[/ color]",$message[text]);
And replace that with this:
Code:

$message[text] = preg_replace("/((\n[ ]*>[^\n]*)+)/","",$message[text]);

saab340 03-02-2002 02:26 AM

Awesome

lifesourcerec 03-02-2002 03:02 AM

Quote:

Originally posted by Gilby
lifesourcerec, looks like you do not have the correct login details so it is not allowing you to view a newsgroup.
I use the same login/password info I use in Outlook Express. So, it's the correct info.

Gilby 03-02-2002 03:06 AM

Quote:

Originally posted by lifesourcerec
I use the same login/password info I use in Outlook Express. So, it's the correct info.
Try this nntp.php and see what that error message that the nntp server is giving.

lifesourcerec 03-02-2002 03:12 AM

I get these errors now:

6 group(s) gatewayed.
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group rec.collecting.cards.discuss
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group rec.collecting.sport.baseball
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group rec.collecting.sport.basketball
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group rec.collecting.sport.football
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group rec.collecting.sport.hockey
200 News.GigaNews.Com (Typhoon v1.2.3)
381 More Authentication Required
502 Failed connection to netblock restricted feed 'cc'
480 Authentication Required
ArrayLogging in to news.tn.comcast.giganews.com, group alt.collecting.autographs

Gilby 03-02-2002 03:18 AM

Quote:

Originally posted by lifesourcerec
I get these errors now:

That tells me that you can't log in from outside their network. You either need to get another Usenet feed, or set up the script to run from a computer within that network (like installing a local version of vb and the gateway script).

lifesourcerec 03-02-2002 03:20 AM

Quote:

Originally posted by Gilby


That tells me that you can't log in from outside their network. You either need to get another Usenet feed, or set up the script to run from a computer within that network (like installing a local version of vb and the gateway script).

Heh, oh well.. guess this won't work for me. Been looking for public usenet servers without success.

lifesourcerec 03-02-2002 03:40 AM

Quote:

Originally posted by Gilby


That tells me that you can't log in from outside their network. You either need to get another Usenet feed, or set up the script to run from a computer within that network (like installing a local version of vb and the gateway script).

Found a public server, but it didn't dump the files in the forums.

lifesourcerec 03-02-2002 04:38 AM

Got it working. IS there a way to filter it to a certain date? Trying to find out how to set showthread to "the beginning" instead of 30 days.

Gilby 03-02-2002 05:05 AM

Quote:

Originally posted by lifesourcerec
Got it working. IS there a way to filter it to a certain date? Trying to find out how to set showthread to "the beginning" instead of 30 days.
In the admin control panel, click on modify under the forums and moderators heading. Then click edit next to the forum you want to do this for, and change the "Default view age" to however many days you want.

saab340 03-02-2002 05:12 AM

This is the best hack. Period

Now I need a provider, that allows me to also post on the groups.
(I only need 3 groups. text only ie not too much bandwith requirements)

Willing to pay for service, but I'll take the free one if one is around.

E-mail me or PM me your suggestion.

Hopefully one that someone has tested this with.

Thanks

lifesourcerec 03-02-2002 05:23 AM

I found a free one, but the download is SUPER slow. Getting 527 bytes/sec

lifesourcerec 03-02-2002 06:55 AM

Quote:

Originally posted by Erwin
I can say that the webdiscuss.com server works with this script. FANTASTIC!!!

The script doesn't work with my ISP's newserver though. I will need to search for a free one...

If you fine a fast free one, let me know. I found one, but getting as low as 448 bytes/sec transfer. Taking forever.

lifesourcerec 03-02-2002 06:36 PM

I run crobtab crontab.txt , but show this error in e-mail:

Quote:

/bin/sh: no closing quote

Gilby 03-02-2002 06:41 PM

Quote:

Originally posted by lifesourcerec
I run crobtab crontab.txt , but show this error in e-mail:


What's in your crontab.txt?

mood 03-02-2002 06:46 PM

FEATURE REQUEST:

Gilby,
Now that you have put such a great gateway together, do you think you could add the feature to gate the messages to a mailing list?
THAT would be THE BEST!

Pls contact me "off forum" if you'd like some "extra" support"

Mood

lifesourcerec 03-02-2002 06:46 PM

25,50 * * * * /usr/bin/lynx -source "http://www.collectorempire.com/forums/gateway.php?log=cron

Gilby 03-02-2002 06:53 PM

Quote:

Originally posted by lifesourcerec
25,50 * * * * /usr/bin/lynx -source "http://www.collectorempire.com/forums/gateway.php?log=cron
you are missing the " at the end of that line.

lifesourcerec 03-02-2002 06:55 PM

Quote:

Originally posted by Gilby


you are missing the " at the end of that line.

Ok. Thanks :)

Gilby 03-02-2002 06:58 PM

Quote:

Originally posted by mood
Now that you have put such a great gateway together, do you think you could add the feature to gate the messages to a mailing list?
THAT would be THE BEST!

Actually, I was thinking of doing something of that sort, although, I'm working on other projects at the moment and that may be a ways away. A lot of the code from this hack can be used for that. Maybe i'll take a look at it now and see if it's really easier than I expected.

saab340 03-02-2002 11:57 PM

I dont know what happened, but all my posts start with []

(Brackets in fromt of all the post that goes to the usenet)

It shows fine on my forum (Without the brackets)

Which line specifies the heading?

Only think I modified was the signature, and remove the > >> >>> stuff.

Thanks

Otherwise its working great :)

Help me out with this issue, since replies are generated in new threads.... Otherwise it would not matter.

This is my signature edit:

function sendnews($newthread, $isreply=false){
global $settings, $group, $prefix, $news, $DB_site, $msgid_date;
// 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";
// $signature .= format_text($userinfo[signature]);
// }
$signature .= "\n http://www.test.com \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";
}



and this is to remove the >>> stuff :)

//$message[text] = preg_replace("/((\n[ ]*>[^\n]*)+)/","$1",$message[text]);
$message[text] = preg_replace("/((\n[ ]*>[^\n]*)+)/","",$message[text]);
//$message[text] = preg_replace("/((\n[ ]*>[ ]*>[^\n]*)+)/","$1",$message[text]);
//$message[text] = preg_replace("/((\n[ ]*>[ ]*>[ ]*>[^\n]*)+)/","$1",$message[text]);

$message[text] = preg_replace("/((\n[ ]*>[ ]*>[^\n]*)+)/","",$message[text]);
$message[text] = preg_replace("/((\n[ ]*>[ ]*>[ ]*>[^\n]*)+)/","",$message[text]);


Those are only changes I made, and now all my posts start with:[]

Any idea why?

Gilby 03-03-2002 12:04 AM

Are the brackets in the body or the subject?

saab340 03-03-2002 12:11 AM

subject

Gilby 03-03-2002 12:21 AM

Quote:

Originally posted by saab340
subject
OK then, make sure that everything in the prefix column is set to NULL.

This SQL will do the trick:
Code:

UPDATE nntp_groups SET prefix = NULL

nafae 03-03-2002 12:22 AM

Ok so I think I did everything right, but then again I am not sure... Gilby can I get you to check out my server for me and check and see if you can tell what the problem is? I am sketchy at best with this sql stuff...

Gilby 03-03-2002 12:31 AM

Quote:

Originally posted by nafae
Ok so I think I did everything right, but then again I am not sure... Gilby can I get you to check out my server for me and check and see if you can tell what the problem is? I am sketchy at best with this sql stuff...
What/Where do you want me to look at?

saab340 03-03-2002 12:33 AM

Also I just remembered, I changed the time to show correct time... ie not time when cron (ie when downloaded)

and I see that some of the posts which are replied... ie Re: something

will show in different posts. What is the cause of this? time issue?

Thanks (Gilby You are doing a great job)

this is the mod for time....
// if ($group[lastmsg] == 0){
$date = strtotime($message[date]);
//} else {
//$date = time();
//}

nafae 03-03-2002 12:34 AM

well, I installed it and set for alt.comp.programming 31 0 (usenet url) NULL NULL 1 under nntp-groups, then I run gateway.php, it downloads a file that sayes

1 group(s) gatewayed.
Logging in to (usenet).com, group alt.comp.programming

but when I check forum 31 (http://www.coderforums.net/forumdisp...?s=&forumid=31) nothing appears there...

Gilby 03-03-2002 12:43 AM

Quote:

Originally posted by nafae
well, I installed it and set for alt.comp.programming 31 0 (usenet url) NULL NULL 1 under nntp-groups, then I run gateway.php, it downloads a file that sayes

1 group(s) gatewayed.
Logging in to (usenet).com, group alt.comp.programming

but when I check forum 31 (http://www.coderforums.net/forumdisp...?s=&forumid=31) nothing appears there...

Is the script running from the same network as your nntp server?

nafae 03-03-2002 12:43 AM

no, my nntp server is the one that my isp uses

Gilby 03-03-2002 12:45 AM

Quote:

Originally posted by saab340
Also I just remembered, I changed the time to show correct time... ie not time when cron (ie when downloaded)

and I see that some of the posts which are replied... ie Re: something

will show in different posts. What is the cause of this? time issue?

Thanks (Gilby You are doing a great job)

this is the mod for time....
// if ($group[lastmsg] == 0){
$date = strtotime($message[date]);
//} else {
//$date = time();
//}

With that code change, youdon't get a parsing error? You commented out the } which should produce a parse error, unless you added one somewhere else. Uncomment that and see if you still have problems.

Gilby 03-03-2002 12:47 AM

Quote:

Originally posted by nafae
no, my nntp server is the one that my isp uses
Most ISPs will not allow you to access the server from outside the network of the ISP. They only allow local users to use their news server. You may be able to use it if you put in your username and password that you use with that ISP.

nafae 03-03-2002 12:50 AM

so the next step would be, assuming that I can't access my isp's usnet group... I purchase a username to another usenet server? What are the typical prices and where can I buy a usenet account :confused:

Gilby 03-03-2002 12:55 AM

Quote:

Originally posted by nafae
so the next step would be, assuming that I can't access my isp's usnet group... I purchase a username to another usenet server? What are the typical prices and where can I buy a usenet account :confused:
You can check with your webhost to see if they have a usenet server you can use. You can install php on your home computer and run the gateway script from there (connecting to your servers mysql database), or you can get a usenet account. Typically, they cost under $10 a month. I haven't used any of them though, but just do a search in google for them and you should have no problem finding one.

nafae 03-03-2002 12:57 AM

ok, thanks for your help.

saab340 03-03-2002 01:05 AM

remove // from } ?

I did this like you suggested early on, to show correct thread date...

I dont understand? It seems correct.

Please confirm.

Gilby 03-03-2002 01:15 AM

Quote:

Originally posted by saab340
Also I just remembered, I changed the time to show correct time... ie not time when cron (ie when downloaded)

and I see that some of the posts which are replied... ie Re: something

will show in different posts. What is the cause of this? time issue?

Ignore my last thing... I just saw it wrong. What exactly is happening? Which of the times that you used "posts" above should it be "threads"?

saab340 03-03-2002 01:24 AM

My problems are [] listed right before each post on the topic, and when replied... they will show up on a different post.

some Re: posts also show as a different topic.

Gilby 03-03-2002 01:30 AM

Quote:

Originally posted by saab340
My problems are [] listed right before each post on the topic, and when replied... they will show up on a different post.


some Re: posts also show as a different topic.

That shouldn't be happening. Is the prefix column in the thread table set to default to NULL? If not, change it to do that.

Otherwise, if all else fails, we can hardcode it to not use my undocumented feature for you:

Change:
Code:

                if ($prefix[$newthread[forumid]] and !$isreply){
                        $cat = "[".$prefix[$newthread[forumid]]."] ";
                } elseif ($isreply and $newthread[prefix]) {
                        $cat = "Re: [".$newthread[prefix]."] ";
                } elseif ($isreply){
                        $cat = "Re: ";
                } else { $cat = ''; }

Into this:
Code:

                if ($isreply){
                        $cat = "Re: ";
                } else { $cat = ''; }



All times are GMT. The time now is 09:05 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.02115 seconds
  • Memory Usage 1,845KB
  • 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
  • (5)bbcode_code_printable
  • (21)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