2,054,148 Pages


The "Send to a friend" button was created at LyricWiki to allow people to easily email their friends links to pages on the wiki. Please note that this is NOT an extension since the parserhooks don't work to put it on the part of the page desired. Therefore, there will be a little direct-modification of the Monobook.php file which will mean you need to preserve a copy of this file so that you can replace it after each time you upgrade versions of MediaWiki.

NOTE: On April 4, 2007 we updated the code to include a fix that prevents malicious users from sending out multiple email messages (by exploiting the email headers). Some spammers were using this to BCC the messages to dozens of recipients.

If you are using an older version of the code, it would be best to get the updated code.


  1. Put the code in a file called sendToFriend.php in /extensions/sendToFriend/ directory.
  2. Put the icon in the same /extensions/sendToFriend/ directory.
  3. Open /extensions/sendToFriend/sendToFriend.php and read the comments (there is a configuration setting section and an explaination of what is needed to set up stats logging).
  4. Open /skins/Monobook.php and find this line (it should be line 98):
<h1 class="firstHeading">

And right ABOVE that h1, insert this code:

        <div style='float:right;border:1px #aaa solid;background-color:#ffff80;font-weight:bold;padding:5px;margin-top:3px;'>
            <a href='/extensions/sendToFriend/sendToFriend.php?page=<?php print $pageName; ?>' style='float:left;line-height:16px;'>
            <img src='/extensions/sendToFriend/sendToFriend.png' alt='->' title='Spread the word!' style='float:left;margin-right:3px;' width='16' height='16'/>
            Send to a friend


We don't require attribution, but it would be nice if you made a post on your site or in your blog somewhere mentioning where you got the button (we could always use the incoming links :). Also, we like to see our work in the wild, so if you use it, please add a link to your site in the section below.

Uses in the wild

Community content is available under Copyright unless otherwise noted.