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

Home » FUDforum » FUDforum Suggestions » NNTP suggestion
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
NNTP suggestion [message #16089] Tue, 13 January 2004 15:23 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 16: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
add to buddy list
ignore all messages by this user
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 15:12 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 13: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
add to buddy list
ignore all messages by this user
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 13:08 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 18: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
add to buddy list
ignore all messages by this user
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 18: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
add to buddy list
ignore all messages by this user
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 18: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
add to buddy list
ignore all messages by this user
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 15:14 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 15: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
add to buddy list
ignore all messages by this user
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 15:57 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 15:58 Go to previous messageGo to next message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
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 12:35 Go to previous messageGo to next message
Anonymous   Canada
Karma:
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 09:05 Go to previous message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Hmm, that should have been from me rather than from anonymous.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Mon Oct 23 16:59:50 EDT 2017

Total time taken to generate the page: 0.00583 seconds