FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » NNTP suggestion
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
NNTP suggestion [message #16089] Tue, 13 January 2004 20:23 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
When importing newsgroup messages, you currently have the option to automatically create FUD accounts for posters. This has the big drawback that it can potentially create hundreds of accounts for users that will never use the forum itself.

So I have this option turned off. The problem with this is that all messages are labelled as coming from the anonymous (guest) user. This makes it difficult to see who really sent a message, and who sent the reply to it, because they all look like the same person.

So, I'd like to make two suggestions:

1. Put the real email address of the sender at the start of the message. So, if "foo(at)bar(dot)com" sends an email message to the newsgroup, the message might have the text "Message originally posted by foo(at)bar(dot)com" prepended at the top of the body. It doesn't have to go into the header, since I'd imagine that would be pretty difficult.

2. Add a new setting for the account to assign to these anonymous postings. Right now, my "Anonymous Coward" user is actually called "Guest". For newsgroups, however, I think it would be better to have an account called "Unknown Newsgroup User", so that it's more obvious to users what this means.
Re: NNTP suggestion [message #16090 is a reply to message #16089] Tue, 13 January 2004 21:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Quote:


1. Put the real email address of the sender at the start of the message. So, if "foo(at)bar(dot)com" sends an email message to the newsgroup, the message might have the text "Message originally posted by foo(at)bar(dot)com" prepended at the top of the body. It doesn't have to go into the header, since I'd imagine that would be pretty difficult.



I'll consider it, but seems to me like most people would miss that link.

Quote:


2. Add a new setting for the account to assign to these anonymous postings. Right now, my "Anonymous Coward" user is actually called "Guest". For newsgroups, however, I think it would be better to have an account called "Unknown Newsgroup User", so that it's more obvious to users what this means.


No.


FUDforum Core Developer
Re: NNTP suggestion [message #16114 is a reply to message #16090] Wed, 14 January 2004 20:12 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
I just implemented #1 by adding the following code at line 402 of data/include/nntp.inc:
if( $msg_post->poster_id == 0 ) {
	if( !empty( $this->from_name ) ) {
		$msg_post->body = '<b>Originally posted by:</b> "' .
			$this->from_name . '" &lt;' . $this->from_email . '&gt;<br /><br />' . $msg_post->body;
	}
	else {
		$msg_post->body = '<b>Originally posted by:</b> ' .
			'&lt;' . $this->from_email . '&gt;<br /><br />' . $msg_post->body;
	}
}

I think it helps a lot, since now I can see who actually posted the message. I didn't bother to make this a "mailto:", since I don't really think it's necessary.
Re: NNTP suggestion [message #16152 is a reply to message #16114] Fri, 16 January 2004 18:15 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Added, although the code is not quite the same the end result is. This was added to both NNTP & Mailing List import code.

FUDforum Core Developer
Re: NNTP suggestion [message #16206 is a reply to message #16089] Tue, 20 January 2004 18:08 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
I had requested special users for nntp senders but this is a good workaround. Thanks Ilia!
Re: NNTP suggestion [message #16226 is a reply to message #16152] Tue, 20 January 2004 23:27 Go to previous messageGo to next message
KVentz is currently offline  KVentz   Russian Federation
Messages: 65
Registered: November 2002
Location: Moscow, Russia
Karma: 0
Member
Ilia ÐÉÓÁÌ(Á) ðÔÎ, 16 ñÎ×ÁÒÑ 2004 21:15

Added, although the code is not quite the same the end result is. This was added to both NNTP & Mailing List import code.


I hope that this feature is switchable: I don't want to publish thousands of emails in my forum for spamers! I have enough spam and spam reports and I don't need and don't want any more...
Re: NNTP suggestion [message #16227 is a reply to message #16226] Tue, 20 January 2004 23:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The feature only works if account creation for posters is disabled and it prints encoded e-mail.

FUDforum Core Developer
Re: NNTP suggestion [message #16229 is a reply to message #16227] Tue, 20 January 2004 23:43 Go to previous messageGo to next message
KVentz is currently offline  KVentz   Russian Federation
Messages: 65
Registered: November 2002
Location: Moscow, Russia
Karma: 0
Member
Ilia ÐÉÓÁÌ(Á) óÒÄ, 21 ñÎ×ÁÒÑ 2004 02:37

The feature only works if account creation for posters is disabled and it prints encoded e-mail.


This assures me Smile
Re: NNTP suggestion [message #16458 is a reply to message #16089] Fri, 30 January 2004 20:14 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Error in CVS:

 if (!$msg_post->poster_id) {
                if ($frm->forum_opt & 16) {
                        $msg_post->body = "[b]Originally posted by:[/b] [email={(!empty($this->from_name) ? $this->from_name : '')}]{$this->from_email}[/email]\n\n".$msg_post->body;
                } else {
                        $msg_post->body = "Originally posted by: ".str_replace('@', '@', $this->from_email)."\n\n".$msg_post->body;
                }
        }


This code occurs outside the object and $this is not effective, change $this references to $emsg. This causes the error to go aware that complains about $this being an undefined variable, but the poster info still does not appear, I am doing further debugging now.
Re: NNTP suggestion [message #16461 is a reply to message #16458] Fri, 30 January 2004 20:52 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Not true. The code is inside parse_msgs() method of the fud_nntp class. The $this->from_name & $this->from_email are appropriate in this context and are used several times inside that very function.

FUDforum Core Developer
Re: NNTP suggestion [message #16462 is a reply to message #16089] Fri, 30 January 2004 20:57 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Ok I think I got it, the apply_custom_replace function was blowing away the email header. By changing the order of the routines it now works:

        if (!$emsg->from_email || !$emsg->from_name) {
                $msg_post->poster_id = 0;
        } else {
                $msg_post->poster_id = match_user_to_post($emsg->from_email, $emsg->from_name, $mlist->mlist_opt & 64, $emsg->user_id);
        }

        $msg_post->body = apply_custom_replace($emsg->body);

/* for anonymous users prefix 'contact' link */
        if (!$msg_post->poster_id) {
                if ($frm->forum_opt & 16) {
                        $msg_post->body = "[b]Originally posted by:[/b] [email=" . $emsg->from_email . "]" . (!empty($emsg->from_name) ? $emsg->from_name : '') . "[/email]\n\n" . $msg_post->body;
                } else {

                        $msg_post->body = "Originally posted by: ".str_replace('@', '@', $emsg->from_email)."\n\n".$msg_post->body;
                }
        }
Re: NNTP suggestion [message #16463 is a reply to message #16089] Fri, 30 January 2004 20:58 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Well I changed it and the error went away. Must be my version of PHP.
Re: NNTP suggestion [message #16482 is a reply to message #16089] Sat, 31 January 2004 17:35 Go to previous messageGo to next message
Anonymous   Canada
Aah, ok Ilia I know whay we are not seeing eye to eye. The bugfix I made was in mailinglist.php. In mailinglist.php, the code in question is not in a class, but in a procedure. You will also want to not that the insertion of name and email is backwards, resulting in an email link that shows the email and when clicked trys to send an email to the name.
Re: NNTP suggestion [message #16489 is a reply to message #16089] Mon, 02 February 2004 14:05 Go to previous message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
Hmm, that should have been from me rather than from anonymous.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Attach mangled sig to mailing list postings
Next Topic: Alternative registration pr. cell phone?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 18:34:39 GMT 2024

Total time taken to generate the page: 0.02895 seconds