Jump to content

Email the page function adds + in between each word


craigtolputt

Recommended Posts

Hi All,

 

I have a script that i bought and a part of it has a share icon with an email icon so if the user clicks the email icon then it opens up your email client and adds the details of the deal to the email.

 

The problem is that it seems to break each word up by placing a + between them.

 

So for example you get this...

 

Come+and+check+out+Welcome+to+theSocialDeal,+they+have+this+great+local+deal,+if+we+all+buy+it+then+we+get+it+cheaper!

Today's+Deal:+4+hours+of+extreme+MTB+action+at+John+Doe+Extreme+Trail+Centre+for+the+price+of+1+hour

Click+this+link+to+check+it+out:+

 

 

which should be this...

 

Come and check out Welcome to theSocialDeal, they have this great local deal, if we all buy it then we get it cheaper!

Today's Deal: 4 hours of extreme MTB action at John Doe Extreme Trail Centre for the price of 1 hour

Click this link to check it out:

 

Here is the php function, does anyone know what this could be and how i can stop it?

 

function share_mail($team) {
global $login_user_id;
global $INI;
if (!$team) {
	$team = array(
			'title' => $INI['system']['sitename'] . '(' . $INI['system']['wwwprefix'] . ')',
			);
}
$pre[] = "Come and check out {$INI['system']['sitename']}, they have this great local deal, if we all buy it then we get it cheaper!";
if ( $team['id'] ) {
	$pre[] = "Today's Deal: {$team['title']}";
	$pre[] = "Click this link to check it out: ";
	$pre[] = $INI['system']['wwwprefix'] . "/team.php?id={$team['id']}&r={$login_user_id}";
	$pre = mb_convert_encoding(join("\n\n", $pre), 'UTF-8', 'UTF-8');
	$sub = "The Deal: {$team['title']}";
} else {
	$sub = $pre[] = $team['title'];
}
$sub = mb_convert_encoding($sub, 'UTF-8', 'UTF-8');
$query = array( 'subject' => $sub, 'body' => $pre, );
$query = http_build_query($query);
return 'mailto:?'.$query;
}

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.