[Mediawiki-l] Feature: "Email this page"

Al Degutis al.degutis at gmail.com
Thu Oct 19 11:24:27 UTC 2006

On 10/18/06, Eric K <ek79501 at yahoo.com> wrote:
>   What I want to ask then is: Is there a way to pass the pageURL variable to a hidden
> field of an HTML form? That will help. Then it'll be like the Clickability links of CNN.com,
> where pages can be emailed with the Link of the page already embedded in the email
> form.


What I've done is edit MonoBook.php to add an include to page with my
links as such

 <div id="bodyContent">
   <h3 id="siteSub">
right after:
  <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php
$this->html('newtalk')  ?></div><?php } ?>
I added:
   <?php include("mylinks.php"); ?>

In the mylinks.php page, I include;
  <p align="right"><a href="/sendarticle.php">Send this article to a

sendarticle.php grabs the URL via referer, runs the function
get_title_tag (found on the Internet somewhere) to get the page title
and presents a form for the user to fill out which includes a visual
confirmation field. It is also important to code this page to ensure
that there is a refering page, otherwise bots will try to abuse it by
accessing it directly.

See it in action here:

Hope this helps
Al Degutis

More information about the MediaWiki-l mailing list