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)

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

Quote:

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

Quote:


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

Quote:

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?

Quote:

< 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

Quote:

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

Quote:

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

Quote:

Originally Posted by bitg
...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

Quote:

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.

Quote:

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','".addslashe s($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 -

PHP Code:

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


All times are GMT. The time now is 01:51 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.01960 seconds
  • Memory Usage 1,802KB
  • 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
  • (1)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
  • (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