vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   NNTP Gateway for Usenet ( Newsgroups ), Mailing Lists (https://vborg.vbsupport.ru/showthread.php?t=65152)

AWS 06-18-2004 11:10 AM

Quote:

Originally Posted by fustanella
It's great, that's what is is. :D

I am delighted with this; thank you! It was painless to install, worked both inbound and out the first time without fiddling, and adds a handy new service for my members.

I would like to find a way to automate the gateway.php calls under WinNT 4, though. I understand the concept of 'cron' but don't see how this maps directly over, other than through "Scheduled Tasks" - specifically, how I can run the PHP script either in a browser window that closes when done, or without the need for a browser at all.

(Anyone who has insights on my related question of importing text files as vB3 messages is welcome to chime in as well, over at https://vborg.vbsupport.ru/showthread.php?t=66250 - thanks.)

On Windows create a scheduled task.
Create a new task. When the box pops up browse to php.exe. The full path should show for the exe.
You should see something like
C:\Inetpub\php\php.exe
or whatever the path to php.exe is. At the end of that add the path to gateway.php. When done you should have something like
C:\Inetpub\php\php.exe C:\Inetpub\wwwroot\gateway.php
Now go to advanced and set it to run every 15 minutes for 23 hours and 59 minutes. Click OK and when the password box comes up put in your administartor password.
You now should have a scheduled task called php.exe. Open scheduled task folder and right click the task and run it. A DOS box should popup as it runs. If the box pops up and disapears right away then try to run the task command from a dos prompt. By doing this you'll see what the problem is. More than likely bad path.

fustanella 06-18-2004 01:17 PM

Quote:

Originally Posted by AWS
C:\Inetpub\php\php.exe C:\Inetpub\wwwroot\gateway.php

Thank you. I'm familiar with scheduled tasks, and prefer to try in a command window before creating a task so errors can be seen. Good thing, as I got 'em. :)

Quote:

Turck MMCache - can not create shared memory area
in unknown on line 0
- this occurs both in a graphical warning requiring clicking on the pretty button, and in the text in the command window. I'm running the same script that works through my browser.

I searched my machine and checked my vB install to make sure I didn't have various copies of PHP floating about, and I have only the one in my c:\php4\php dir. It's PHP 4.3.3 if that matters.

Princeton 06-20-2004 04:04 AM

the more I use this hack the more I like it!

... missing htmlspecialchars($subject) :rolleyes:

Cold Steel 06-20-2004 05:55 AM

After getting thousands of messages from usenet, I'm starting to run into errors.

This is the latest:

Code:

Getting message number 300606:
'Re: Bush's war -- against Richard Clarke' from Congenital Kano. Thread found by References.
Getting message number 300607:
'Reversing Pledge, Bush Lets OPEC Bilk Americans' from Paul Kekai Manansala. New thread.
Getting message number 300608:
<html><head><title>asiansINC.com Database Error</title><style type="text/css"><!--.error { font: 11px tahoma, verdana, arial, sans-serif; }--></style></head>
<body></table></td></tr></table></form>
<blockquote><p class="error">&nbsp;</p><p class="error"><b>There seems to have been a slight problem with the asiansINC.com database.</b><br />
Please try again by pressing the <a href="javascript:window.location=window.location;">refresh</a> button in your browser.</p><p class="error">An E-Mail has been dispatched to our <a href="mailto:">Technical Staff</a>, who you can also contact if the problem persists.</p><p class="error">We apologise for any inconvenience.</p><form><textarea class="error" rows="15" cols="100" wrap="off">Database error in vBulletin 3.0.1:

Invalid SQL: SELECT post.postid FROM thread AS thread, post AS post
                                    WHERE thread.threadid = post.threadid AND
                                    (post.msgid = '&lt;For-Tom_Cerco's-benefit-A772E2.23264904042004@phswest.com&gt;') AND
                                    thread.forumid = 72   
                                    ORDER BY post.dateline DESC LIMIT 1
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 's-benefit-A772E2.23264904042004@phswest.com&gt;') AND
           

mysql error number: 1064

Date: Sunday 20th of June 2004 01:44:04 AM
Script: http://forums.asiansinc.com/gateway.php
Referer:
Username: Webmaster
IP Address: **.**.**.***
</textarea></form></blockquote>

</body></html>

Any ideas?

Cold Steel 06-20-2004 05:59 AM

Also, I signed up for an account at Giganews for $7.99/month for 2GB.

Then I found out about Teranews.com - 50MB per day for only a $3.95 setup fee. This is slightly less than 2GB a month, but their paid acccount for $7.95 gives me 250MB a day (~7.3 GB month).

Is there really such a huge difference in the quality of the connection? I don't think I'll need that much bandwidth. I'm considering dropping giganews and signing up with a free account at teranews. Thoughts?

Cold Steel 06-20-2004 06:03 AM

Quote:

Originally Posted by allan grossman
If it's a UNIX or Linux box use top to determine the process ID then kill the process with kill -9 process_id - if it's a Windows machine you can use Task Mangler to kill the task.

How do I determine which one is gateway.php?

lierduh 06-20-2004 06:48 AM

Quote:

Originally Posted by Cold Steel
After getting thousands of messages from usenet, I'm starting to run into errors.

This is the latest:

Code:

                                    (post.msgid = '<For-Tom_Cerco's-benefit-A772E2.23264904042004@phswest.com>') AND
Any ideas?

The single quote in the message ID is the cause of the problem. Message ID should not contain quotes charactor. You can either bypass this message by editing the lastmsg in the control panel, or do the following:

Around line 338 find:

(post.msgid = '$par_msgid') AND

Change it to:

(post.msgid = '" . addslashes($par_msgid) . "') AND

KevinM 06-20-2004 08:19 AM

Quote:

Originally Posted by trackpads
Also, is there a way to disable the killfile for mlists only? The killfile is an AWEOME addition and has really, really helped me on my site.


Yes you can. Find this:
PHP Code:

else if ($killfileresult checkkillfile($message)) 

and change it to to:
PHP Code:

else if ($killfileresult checkkillfile($message) AND $grouptype == 'news'

This will work on newsgroups only.

To work on mailing lists only:
PHP Code:

else if ($killfileresult checkkillfile($message) AND $grouptype != 'news'

I haven't tried it, but it should work.

KevinM 06-20-2004 08:23 AM

Quote:

Originally Posted by Marv
Could you add the body of a message as fifth element ? Some (including me) could find that very useful.

If you find this:
PHP Code:

if     ((stristr(trim($message['subject']), $killphrase)) OR
                        (
stristr(trim($message['from']), $killphrase)) OR
                        (
stristr(trim($message['path']), $killphrase))) 

and change it to this:
PHP Code:

if     ((stristr(trim($message['subject']), $killphrase)) OR
                        (
stristr(trim($message['from']), $killphrase)) OR
                        (
stristr(trim($message['path']), $killphrase)) OR
                        (
stristr(trim($message['text']), $killphrase))) 

This will now search the main text of the message as well.

KevinM 06-20-2004 08:30 AM

This is a quick one to get the thread preview to work with this hack.

Find:
PHP Code:

logging("'$subject' from "$from_name .
                    
". New thread.\r\n"); 

And below it put:
PHP Code:

// enable thread preview
                    
$DB_site->query("UPDATE " TABLE_PREFIX " thread
                    SET firstpostid = 
$postid
                    WHERE threadid = 
$threadid"); 

If you have thread preview enabled in the adminCP then all new threads from now on will show a preview when you hover over them.


All times are GMT. The time now is 05:52 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.01808 seconds
  • Memory Usage 1,778KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (7)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

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

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