Extension talk:Send2Friend

I want to show the form only if the user is logged in. How can I do it? Thanks! 28 Sep 2010

How do I change the message that the email sends? 67.169.112.215 23:40, 15 June 2010 (UTC)

I´ve added the spanish translation for the messages text, which you could copy and paste into the file :

# # $wgSend2FriendMessages['es'] = array(  $wgSend2FriendMsgPrefix . 'title' => 'Recomendar página',  $wgSend2FriendMsgPrefix . 'yourname' => 'Su nombre',  $wgSend2FriendMsgPrefix . 'youremail' => 'Su correo electrónico',  $wgSend2FriendMsgPrefix . 'friendsname' => 'Nombre del recipiente',  $wgSend2FriendMsgPrefix . 'friendsemail' => 'Correo electrónico del recipiente',  $wgSend2FriendMsgPrefix . 'sendbutton' => "Enviar",  $wgSend2FriendMsgPrefix . 'subject' => "Recomendación de $1",  $wgSend2FriendMsgPrefix . 'body' => "Estimado $1,\n\n te recomiendo leer la pagina $3 en $2 ",  $wgSend2FriendMsgPrefix . 'success' => "Su recomendación ha sido enviada.",  $wgSend2FriendMsgPrefix . 'failure' => "Su recomendación no ha sido enviada. Favore asegurese que los correos electrónicos no tengan errores.", );
 * 1)    Español

I hope it´s usefull, it works fine at http://www.ZonaCostera.info. --Horst Salzwedel 01:49, 19 August 2007 (UTC)

Add to tool box
Is there a way to add this to the tool box so that there is a link that people can click on to 'sent to a friend' rather than having the form visible on all pages all the time

Thanks.

John

You could designate a single page with send to friend and then add the link to that page to the sidebar ( MediaWiki:Sidebar ). 67.169.112.215 23:39, 15 June 2010 (UTC)

French translation
# $wgSend2FriendMessages['fr'] = array(	$wgSend2FriendMsgPrefix . 'title' => 'Envoyer &agrave; un ami', 	$wgSend2FriendMsgPrefix . 'yourname' => 'Votre nom', 	$wgSend2FriendMsgPrefix . 'youremail' => 'Votr eemail',  	$wgSend2FriendMsgPrefix . 'friendsname' => "Nom de votre ami", 	$wgSend2FriendMsgPrefix . 'friendsemail' => "Email de votre ami", 	$wgSend2FriendMsgPrefix . 'sendbutton' => "Envoyer", 	$wgSend2FriendMsgPrefix . 'subject' => "Sujets ", 	$wgSend2FriendMsgPrefix . 'body' => " Salut $1,\n\n J'ai pens&eacute; que cet article ($2) pourrait t'int&eacute;resser. Voici le lien  $3.", 	$wgSend2FriendMsgPrefix . 'error' => "Erreur", 	$wgSend2FriendMsgPrefix . 'success' => "Envoy&eacute;", 	$wgSend2FriendMsgPrefix . 'failure' => "Echec", );
 * 1)    French

Dutch Translation
Added by Sypie $wgSend2FriendMessages['nl'] = array(	$wgSend2FriendMsgPrefix . 'title' => 'Verstuur naar bekende', 	$wgSend2FriendMsgPrefix . 'yourname' => 'Jouw naam', 	$wgSend2FriendMsgPrefix . 'youremail' => 'Jouw e-mailadres',  	$wgSend2FriendMsgPrefix . 'friendsname' => "Naam van de ontvanger", 	$wgSend2FriendMsgPrefix . 'friendsemail' => "E-mailadres van de ontvanger", 	$wgSend2FriendMsgPrefix . 'sendbutton' => "Verstuur", 	$wgSend2FriendMsgPrefix . 'subject' => "$1 wil je helpen met deze Wiki.", 	$wgSend2FriendMsgPrefix . 'body' => "Beste $1, \n\n Hier kun je een Wiki vinden waarvan ik denk dat het je gaat helpen bij het vergroten van je kennis: $2 .De naam van deze Wiki is $3, doe er je voordeel mee. \n\n Mocht deze Wiki je geholpen hebben laat het dan niet na om dit door te sturen naar vrienden en bekenden. \n\n Afzender",  	$wgSend2FriendMsgPrefix . 'error' => "Foutje", 	$wgSend2FriendMsgPrefix. 'success' => "Met succes verstuurd ", $wgSend2FriendMsgPrefix. 'failure' => "De link is niet verstuurd. Controleer of je de benodigde gegevens juist hebt ingevuld.", );
 * 1)    Dutch
 * 1)    Dutch

Bug
With MediaWiki 1.15 i have a little error when i send a mail with this package. The problem was that UserMailer::send (from MediaWiki core) returns true for success or a string for failure. The solution i applied was to change on line 48 of Send2Friend_body.php:

if ($result=="")

by

if ($result)

More "Bugs"
I changed line 40 to show the correct url (it was pre-programmed to prefix "www." to the link, and added a 2nd forward slash). Previous to this change, if your wiki was on http://wiki.example.com/bugs you would get an e-mailed link of http://www.wiki.example.com//bugs - which would obviously fail in that environment. Now when you e-mail http://wiki.example.com/bugs you'll GET http://wiki.example.com/bugs. Relevant code: changed to: Going to see what I can do about getting (recipient), (url) and (article name) to literally not display those texts. Mauirixxx 19:50, 24 January 2011 (UTC)
 * $articleUrl = "http://www." . $_SERVER['HTTP_HOST'] . "/" . $title->getLocalUrl;
 * $articleUrl = "http://" . $_SERVER['HTTP_HOST'] . "" . $title->getLocalUrl;