craigtolputt Posted February 24, 2011 Share Posted February 24, 2011 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; } Quote Link to comment https://forums.phpfreaks.com/topic/228685-email-the-page-function-adds-in-between-each-word/ Share on other sites More sharing options...
samoht Posted February 24, 2011 Share Posted February 24, 2011 I would guess that your problem is coming from the mb_convert_encoding do you really need to convert ? Quote Link to comment https://forums.phpfreaks.com/topic/228685-email-the-page-function-adds-in-between-each-word/#findComment-1179067 Share on other sites More sharing options...
craigtolputt Posted February 27, 2011 Author Share Posted February 27, 2011 Hi Thanks for your response, erm, im not sure if i need to convert or not. I bought this script and it seems to have a few funny bugs throughout but the developers arent helpful at all. What would you suggest? Quote Link to comment https://forums.phpfreaks.com/topic/228685-email-the-page-function-adds-in-between-each-word/#findComment-1180315 Share on other sites More sharing options...
harristweed Posted February 27, 2011 Share Posted February 27, 2011 ask for your money back! Quote Link to comment https://forums.phpfreaks.com/topic/228685-email-the-page-function-adds-in-between-each-word/#findComment-1180316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.