The websiteFrame PHP extension: Difference between revisions

From SaruWiki
Jump to navigation Jump to search
(rough description)
 
m (changed actual location for PHP file to "official" extension directory)
 
Line 1: Line 1:
The sourcecode for the extension can be found [[websiteFrame.php Source Code | here]].
The sourcecode for the extension can be found [[websiteFrame.php Source Code | here]].


To add the extension: copy the souce code in a file named ''websiteFrame.php'', and put it in directory ''/etc/mediawiki-extensions/extensions-available''; then execute the following commands:
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:
  cd /etc/mediawiki-extensions/extensions-enabled
  vi /usr/share/mediawiki-extensions/websiteFrame.php
  ln -s ../extensions-available/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.


Now you can use an iFrame by putting in code like this:
As an example, you can use an iFrame by putting in code like this:
<pre>
<pre>
&lt;websiteFrame&gt;
&lt;websiteFrame&gt;

Latest revision as of 13:04, 26 October 2008

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.