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

Home » FUDforum Development » Bug Reports » Error in maillist.php,v 1.38
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Error in maillist.php,v 1.38 [message #16499] Tue, 03 February 2004 04:18 Go to previous message
Squeebee is currently offline  Squeebee   Canada
Messages: 110
Registered: November 2003
Karma:
Senior Member
Couple of things with the new anonymous poster ID code:

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);
	}

	/* 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={(!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;
		}
	}

	$msg_post->body = apply_custom_replace($emsg->body);
	if (!($mlist->mlist_opt & 16)) {
		if ($frm->forum_opt & 16) {
			$msg_post->body = tags_to_html($msg_post->body, 0);
		} else {
			$msg_post->body = nl2br($msg_post->body);
		}
	}


1) This code occurs in the procedural code at the bottom of the file, after the object declarations. This the use of $this causes an error and needs to be changed to $emsg

2)
[email={(!empty($this->from_name) ? $this->from_name : '')}]{$this->from_email}[/email]


Code has potentially redundant {} characters (I removed them and it still works), code is arranged so user sees email address, click address and it tries to send email to poster's name.

3) Call to apply_custom_replace blows away poster information. Poster information needs to come after this.

Changes I made to get this working:

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;
		}
	}

	if (!($mlist->mlist_opt & 16)) {
		if ($frm->forum_opt & 16) {
			$msg_post->body = tags_to_html($msg_post->body, 0);
		} else {
			$msg_post->body = nl2br($msg_post->body);
		}
	}
[Message index]
 
Read Message
Read Message
Previous Topic: ERROR: Unable to identify a prefix operator '!' for type 'integer'
Next Topic: admin rights - error
Goto Forum:
  

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

Current Time: Sat Nov 30 03:43:52 GMT 2024

Total time taken to generate the page: 0.04602 seconds