Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Gilby Gilby is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-19-2002 Last Update: Never Installs: 71
 
No support by the author.

This hack provides a gateway to any NNTP newsgroup such as those from Usenet and other newsgroup servers. Selected newsgroups are imported from your news server and post on the forum are sent out to the newsgroup. This hack was greatly inspired by fastforward's usenet gateway hack. This one is a complete rewrite of that hack written in PHP and works with vB 2.2.2.

Installation:
Installation is pretty simple. No modifications to the vB php files are needed and it simply consists of dropping in the files to your forums directory, running the SQL modifications, and modifying the newsgroup settings for your desired newsgroups. For the complete installation details, read the readme.txt file.

Here are some of the features:
  • Real cool vbcode to text conversion!
  • All posts are inserted, even if parent thread cannot be found for replies
  • Guests posts also get sent to the newsgroup.
  • Importing of attachments from the newsgroup
  • Poll info sent to newsgroup
  • Attachment link sent to newsgroup
  • Supports unlimited newsgroups and servers.
  • email notification of new replies, just like regular forum posts
  • Can import HTML messages and convert to limited vb code.

For control panel integration, please check out GameCrash's Graphical Interface addition.

What's not in it that was in fastforward's usenet gateway hack:
  • No control panel integration at the moment. (Available separately)
  • 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.

There is still lots that I'd like to add to it, but this is competely functional for basic newsgroup gateway support. It is most likely not free of bugs. If you have questions, suggestions or annoyances, please post in this thread.

vb3 support
lierduh modified this to provide support for the beta versions of vb3. When the release candidates of vb3 come out, I plan to add support for vb3 and add other features to this hack. If you have suggestions for new features, let me know.

E-mail gateway support
New in this version, you can now gateway with an email list. This will fetch emails from a POP email account and send via php's mail function to the mailing list's email address. To set up the list, in the newsgroup field, enter in the email address to send outgoing posts to. In the server field, enter in the pop3 server, and in the username and password fields enter in, you guessed it, the username and password to your pop account. Note: the email gateway capabilities has not been fully tested, so it might not work with your POP server. Also, it does not work in combo with a news<->forum gateway in the same forum (you can use either kind though in differnet forums within your forums).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #622  
Old 09-20-2003, 03:07 AM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #623  
Old 09-20-2003, 04:50 AM
PhoenixBB PhoenixBB is offline
 
Join Date: May 2002
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #624  
Old 09-20-2003, 06:57 AM
PhoenixBB PhoenixBB is offline
 
Join Date: May 2002
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #625  
Old 09-20-2003, 10:49 AM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #626  
Old 09-20-2003, 11:07 AM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #627  
Old 09-22-2003, 12:27 AM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #628  
Old 09-22-2003, 01:17 AM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #629  
Old 09-22-2003, 04:26 AM
PhoenixBB PhoenixBB is offline
 
Join Date: May 2002
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #630  
Old 09-22-2003, 08:13 AM
PhoenixBB PhoenixBB is offline
 
Join Date: May 2002
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #631  
Old 09-22-2003, 08:22 AM
allan grossman allan grossman is offline
 
Join Date: Apr 2003
Location: surreal city, usa
Posts: 163
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05726 seconds
  • Memory Usage 2,354KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete