vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   NNTP Gateway for Usenet ( Newsgroups ), Mailing Lists (https://vborg.vbsupport.ru/showthread.php?t=92588)

lierduh 08-14-2005 02:01 AM

Quote:

Originally Posted by tutorials.de
Hi together,

I've got a little tricky question for those NNTP Gateway experts out there :)

As you can see on the first attached screenshot (guests_on_forumdisplay.gif), the username is displayed in the "Last Post" column of forumdisplay.php. Those guys in the example are only "guest posters" from usenet but as you can see, everyone is displayed by his original username.

When we now head up to the next screenshot (guests_on_threaded_view.gif), we look inside an imported usenet thread, where the Threaded Mode feature of vBulletin is active. There you can see, that all guys are named "Newsgroup poster" (that's my alias for the usergroup guest).

I think it would be much better, if the naming of the authors in the Threaded / Hybrid mode box was the same as in forumdisplay.php - everyone, no matter if guest or registered member, should be displayed by his original, individual username. Does anyone have an idea how to achieve that?

Big thanks in advance & keep up the fabulous work! ;)

- Dominik

The next version has the Ext User Prefix with all the messages imported. That would probably help people who are in your position wanting to distinguish internal posts and external posts.

You can see the samples:

http://phorums.com.au/forumdisplay.php?f=21

lierduh 08-14-2005 02:12 AM

Quote:

Originally Posted by wcbryant
I've got what's probably a silly question, but after doing some reading and searches, haven't been able to find an answer or solution.

My forum defaults to linear, and 99% of my users stick with that. Does anyone know of a way where I can make a forum (the ones using this hack) default to threaded or hybrid mode for all users?

That is global/user setting, not by Forums. However it will be quite easy to implemented this as a hack through Plugin system. I will include this in the next version.

wcbryant 08-14-2005 09:36 AM

Quote:

Originally Posted by lierduh
That is global/user setting, not by Forums. However it will be quite easy to implemented this as a hack through Plugin system. I will include this in the next version.

Wonderful. Thanks for the quick response.

I have this running on a test forum right now, sort of staging everything for my production move to 3.5.0. Anyway, after some feedback with my mods and admins, there's concern about the overwhelming volume of one of the newsgroups (alt.sport.football.college) we want to offer a gateway to.

Is there an option, or could there be an option, for imported threads/posts from offsite *not* to be counted towards the forum totals? So that forum post/thread totals are representative of local user contributions alone. For example, my little testing/staging forum is 2 days old, and has 80 or so local posts on it between myself, and my staff. But just one of the newsgroups has brought in over 7k posts in the same amount of time, thus skewing (severely) the impressions offered by post and thread totals throughout the site. Would be great if we had the ability to clean that up as described. 7k posts is a drop in the well when I move this over to my production side. But even over there, over the course of a year, this could add up very quickly.

Also, is a pruning option feasible? I seem to recall this came up elsewhere in the thread, but if it was, I just missed it browsing back through. I would love to see the option of making imported threads 'decay' after X days, and/or the option to limit the number of posts in one of the forums to Y, where everything older falls off. Either way, with the option (ideally) to make threads that local users have participated in exempt, for the sake of maintaining a relevant and meaningful history.

Just tossing these things out there. The extension is outstanding as-is, and my staff is ecstatic about it. Thanks so much for putting it together, and offering the support you do.

PhillipH 08-17-2005 12:38 AM

hm. anyone know if its possible to use google usenets? if so, the settings would be? thanks.

Cyburbia 08-17-2005 01:16 PM

Update - with Yahoo Groups, the gateway seems to be working flawlessly. The update from RC 1 to RC 2 didn't affect anything. I don't have a report on threading yet, since all the recent posts on the Yahoo group I'm gatewaying seem to be announcements.

A caveat: those using the extension should be aware that maintaining the subforum on the message board side takes a lot of work; there's cleaning up Yahoo-inserted message footers, out of office notifications, long legal disclaimers, and other text normally not found in message board posts. It's not too bad for slow lists, but for fast lists, it may take more moderation work than what would be encountered in a non-gatewayed group. For the gatewayed groups, I'm including this message below the page header:

To keep threads in this subforum readable, moderators may edit excessive backquoting, e-mail confidentiality notices and other legal disclaimers, and advertising inserted by the e-mail or mailing list server. They may also delete spam, out-of-office and similar notifications, and off-topic messages that are gatewayed from the mailing list.

See http://www.cyburbia.org/forums/forumdisplay.php?f=34

Thanks for a great script!

Quote:

Originally Posted by PhillipH
hm. anyone know if its possible to use google usenets? if so, the settings would be? thanks.

I don't think Google is possible, unless there's a mail gateway of some sort. Maybe group alerts for Usenet --> vBulletin, but the other way around? I don't know.

You could try free NNTP servers -- there are many out there -- but odds are they'll be read-only. You probably won't be able to use your ISP's NNTP server because it'll be accessed from your Web host; most ISPs won't allow their NNTP servers to be accessed from an IP range outside what is assigned to that ISP.

If you really want to gateway with a Usenet group, your best bet is a cheap NNTP account with Giganews, EasyNews, or a similar Usenet provider, where you have full access to the NNTP server from any IP.

eandhra 08-20-2005 11:02 AM

hi, everybody,

I installed this mod, and working well.

can anybody please tell me the newsgroups/mailing list servers addresses, bcoz, i dont have any idea on this.

and give me suggestions, where and how to get these.

thanks

frakman 09-07-2005 10:14 AM

Okay, this is only a quick hack so I could import my MBOX file (extracted from Yahoo Goops) direct. (most because my server is running qmail).
I hope this gets included in standard. (does not require much polish)

First, install mbox.php from PEAR into the includes directory.

I don't think we are to post complete code - if I'm wong on that please tell me - so here are just the changes to pop.php:
Before
PHP Code:

class pop 

PHP Code:

require_once('./includes/mbox.php'); 

After
PHP Code:

    function prepare_connection$user$pass$host "127.0.0.1"$port "110" 

PHP Code:

        if (! (strpos($host'/')===false) ) {    //mbox
            
$this->mbox true;        //mbox
            
$this->_mbox = new Mail_Mbox();    //mbox
        
} else {                    //mbox 

Replace
PHP Code:

        if ($host == '') { 
            return 
0
        }
        
$this->port $port;
        
$this->username $user;
        
$this->password $pass;
        
$this->host $host

With
PHP Code:

            $this->password $pass;
        }                    
//mbox
        
if ($host == '') {         //mbox
            
return 0;             //mbox
        
}                    //mbox
        
$this->host $host;        //mbox 

after
PHP Code:

    function connect()
    { 

Add
PHP Code:

//MBOX-START
        
if ($this->mbox) {
            
$this->pop_connect $this->_mbox->open$this->host );
            if (!
$this->pop_connect) {
                echo 
"ERROR OPENING MBOX FILE\r\n";
                return -
1;
            }


        } else {
//MBOX-END 

After
PHP Code:

        return -2

Add
PHP Code:

    }    //MBOX 

Replace this block
PHP Code:

    function howmany()
    {
        return 
$this->_howmany();
    } 

with
PHP Code:

    function _howmany()
    {
        if (
$this->mbox) {  //MBOX
            
return $this->_mbox->size$this->pop_connect )-1;    //MBOX
        
} else {            //MBOX
        
$this->_write("STAT");
        
$results $this->_gets();
        
$this->log .= $results;
        list (
$results$messages$bytes) = split(' '$results);
        return 
$messages;
        }                
//MBOX
    


Lastly replace
PHP Code:

    function delete_mail $id )
    {
        
$this->_write("DELE $id");
        
$results $this->_gets();
    } 

WITH
PHP Code:

    function delete_mail $id )
    {
        if ( !
$this->mbox ) { //MBOX

        
$this->_write("DELE $id");
        
$results $this->_gets();
        }                 
//MBOX
    


When testing this I imported 10585 messages in 5m20s (not really a benchmark without doing it via POP3 as a comparison however surely the overheads are a lot less with this system)

How does this work? Put a file reference in the host box eg
/usr/local/apache2/www/mbox_locost_oz
where mbox_locost_oz is the MBOX archive. If you are on a Windows server the code would need to be changed (it looks for "/" which will not appear in a host name - would need to be changed to "\")

It will not delete messages from the archive. I do not see this as a bad thing for my purposes (ie dump in starting messages)

I also in my testing dug up a problem when there are no posts at all (I think its a NULL issue) I get this error:
Invalid SQL:
Code:

UPDATE vb_nntp_settings
                SET value =  WHERE varname = 'last_postid';

And this comes (in gateway.php)from
PHP Code:

$get_max_postid $db->query_first("
    SELECT MAX(postid) as postid FROM " 
TABLE_PREFIX "post
"
); 

ALSO somebody was complaining about lack of HTML formatting in Firefox:
in gateway.php change this line:
header("Content-Type: text/plain");
TO
header("Content-Type: text/html");

Electronic Punk 09-07-2005 05:43 PM

Having a problem that when I pull the threads in from the newsgroup it slows down my entire site because it locks the post table, does anyone else experience this?

the forum mysql logon does not have permission to lock tables, but seems to do it anyway.

lierduh 09-07-2005 10:48 PM

Quote:

Originally Posted by Electronic Punk
Having a problem that when I pull the threads in from the newsgroup it slows down my entire site because it locks the post table, does anyone else experience this?

the forum mysql logon does not have permission to lock tables, but seems to do it anyway.

That is disadvantage of MYISAM table. Everytime you write to it. The entire table needs to be locked. INNODB on the other hand, does row level locking. The problem with INNODB is it does not offer Fulltext index (at least with the current version and near future versions). Also unlike MyISAM, InnoDB needs to do a full table scan for COUNT().

There is really nothing you can do about this. This is a on going performance problem faces anyone who owns a board which has many posts.

Perhaps you can put one second delay between post imports. Find this in the NNTP settings under AdminCP.

Electronic Punk 09-07-2005 11:40 PM

I have set a pause and will see how it goes.
Thanks.


All times are GMT. The time now is 01: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.02795 seconds
  • Memory Usage 1,822KB
  • 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_code_printable
  • (15)bbcode_php_printable
  • (5)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
  • (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