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.
If you are using an older version of the code, it would be best to get the updated code.
- Put the code in a file called sendToFriend.php in /extensions/sendToFriend/ directory.
- Put the icon in the same /extensions/sendToFriend/ directory.
- 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).
- Open /skins/Monobook.php and find this line (it should be line 98):
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 </a> </div>
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.