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 <Send2Friend.i18n.php>:
#---------------------------------------------------------------------------- # Español #---------------------------------------------------------------------------- $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.", );
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
editIs 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
edit#---------------------------------------------------------------------------- # French #---------------------------------------------------------------------------- $wgSend2FriendMessages['fr'] = array( $wgSend2FriendMsgPrefix . 'title' => 'Envoyer à 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é que cet article ($2) pourrait t'intéresser. Voici le lien $3.", $wgSend2FriendMsgPrefix . 'error' => "Erreur", $wgSend2FriendMsgPrefix . 'success' => "Envoyé", $wgSend2FriendMsgPrefix . 'failure' => "Echec", );
Dutch Translation
editAdded by Sypie
#---------------------------------------------------------------------------- # Dutch #---------------------------------------------------------------------------- $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.", );
Bug
editWith 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"
editI changed line 40 in Send2Friend_body.php
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:
- $articleUrl = "http://www." . $_SERVER['HTTP_HOST'] . "/" . $title->getLocalUrl();
changed to:
- $articleUrl = "http://" . $_SERVER['HTTP_HOST'] . "" . $title->getLocalUrl();
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)
- Hi Mauririxxx, thank you for your tip. Sadly this extension seems to have been abandoned in the meantime. I case you would like to take over... Cheers --[[kgh]] 20:49, 23 March 2011 (UTC)
PHP Notice: Undefined variable: text in /.../extensions/Send2friend/S2FForm.php on line 13
editHi, in order to fix this please replace line 13 in S2FForm.php
$text .= "<form id='send2friend' name='send2friend' action='" . $title->getLocalUrl('action=send') . "' method='post'>";
by
$text .= "<form id='send2friend' name='send2friend' action='send'" . $title->getLocalUrl('action=send') . "' method='post'>";
Cheers --[[kgh]] 12:05, 16 April 2011 (UTC)