The websiteFrame PHP extension

From SaruWiki
Jump to navigation Jump to search

The sourcecode for the extension can be found here.

To add the extension: copy the souce code in a file named websiteFrame.php, and put it in directory /usr/share/mediawiki-extensions. Then create a symlink to this source code in directory /etc/mediawiki-extensions/extensions-available. Finally, create a symlink in /etc/mediawiki-extensions/extensions-enabled to this previous symlink. To bring this about, execute the following commands:

vi /usr/share/mediawiki-extensions/websiteFrame.php
ln -s /usr/share/mediawiki-extensions/websiteFrame.php /etc/mediawiki-extensions/extensions-available/websiteFrame.php 
ln -s /etc/mediawiki-extensions/extensions-available/websiteFrame.php /etc/mediawiki-extensions/extensions-enabled/websiteFrame.php

Of course, in the first line, you're put in your favourite text editor vim, where you'll need to type or paste the actual source code.

As an example, you can use an iFrame by putting in code like this:

<websiteFrame>
website=http://www.google.com/talk/service/badge/Show?tk&#61;z01q6a-longcode-8k5lm1&amp;w=200&amp;h=60 
border=0
height=60
width=200
name=GoogleChatwithSaruman!
allowtransparency=true
</websiteFrame>

Note that the "=" sign is replaced with &#61; and the & sign by &amp; because the PHP script doesn't like them literally.