Difference between revisions of "Extension:EmailToWiki"

From Biowikifarm Metawiki
Jump to: navigation, search
m (Installation: added section)
m (+installation)
Line 12: Line 12:
 
*Include the PHP script from your [[LocalSettings.php]] file like usual:
 
*Include the PHP script from your [[LocalSettings.php]] file like usual:
  
<source lang=php>
+
<syntaxhighlight lang=php>
include( "$IP/extensions/EmailToWiki/EmailToWiki.php" );
+
require_once( "$IP/extensions/EmailToWiki/EmailToWiki.php" );
</source>
+
</syntaxhighlight>
 +
 
 +
<syntaxhighlight lang="bash">
 +
sudo apt-get install libwww-perl libnet-imap-simple-ssl-perl libemail-mime-perl
 +
</syntaxhighlight>
  
 
If using a Windows server you can get Perl from [http://www.activeperl.org www.activeperl.org] and add the execution to you system scheduler from control panel. On Linux you'll already have Perl and you can add the script to your [[w:crontab|<code>/etc/crontab</code>]] with a line similar to the following which calls the script once every 5 minutes.
 
If using a Windows server you can get Perl from [http://www.activeperl.org www.activeperl.org] and add the execution to you system scheduler from control panel. On Linux you'll already have Perl and you can add the script to your [[w:crontab|<code>/etc/crontab</code>]] with a line similar to the following which calls the script once every 5 minutes.
 
  */5 * * * * root /var/www/wiki/extensions/EmailToWiki/EmailToWiki.pl > /dev/null
 
  */5 * * * * root /var/www/wiki/extensions/EmailToWiki/EmailToWiki.pl > /dev/null
 +
  
 
NOTE: The configuration <code>EmailToWiki.conf</code> will only work for ''one'' wiki only, work around:
 
NOTE: The configuration <code>EmailToWiki.conf</code> will only work for ''one'' wiki only, work around:
 
* for each wiki a separate extension folder, configure each differently
 
* for each wiki a separate extension folder, configure each differently

Revision as of 11:49, 13 July 2016

See Extension:EmailToWiki (MediaWiki)

Installation

  • Download the following source files from the Github mirror.
  • Put all files in a directory called EmailToWiki in the wikis extensions directory (done by bash script)
  • Create an empty directory in EmailToWiki called EmailToWiki.tmp which is writable by the webserver (done by bash script)
  • Create an empty file in EmailToWiki called EmailToWiki.log which is writable by the webserver (done by bash script)
  • Create configuration in a file called EmailToWiki.conf based on the EmailToWiki.conf.sample file (done by bash script)
  • Ensure the configuration file is readable by the Perl script, but not readable by the web-server (done by bash script)
  • Call the script on a regular basis, say every five minutes, from crontab as root or a privileged user
  • Include the PHP script from your LocalSettings.php file like usual:
require_once( "$IP/extensions/EmailToWiki/EmailToWiki.php" );
sudo apt-get install libwww-perl libnet-imap-simple-ssl-perl libemail-mime-perl

If using a Windows server you can get Perl from www.activeperl.org and add the execution to you system scheduler from control panel. On Linux you'll already have Perl and you can add the script to your /etc/crontab with a line similar to the following which calls the script once every 5 minutes.

*/5 * * * * root /var/www/wiki/extensions/EmailToWiki/EmailToWiki.pl > /dev/null


NOTE: The configuration EmailToWiki.conf will only work for one wiki only, work around:

  • for each wiki a separate extension folder, configure each differently