Extension:AlfrescoSearch

What can this extension do?
Alfresco Search is written by Sufyaan Kazi as a very simple means to search an Alfresco repository while browsing a MediaWiki based wiki site. It creates a new SpecialPage in your Wiki that provides a mechanism to search for documents within an Alfresco repository. The returned results are hyperlinks to these documents in your Alfresco repository.

Usage
Alfresco Search can be used to search for documents in any Alfresco instance that has the PHP Library installed which basically provides a PHP API to the Alfresco OpenSearch.

Download instructions
Create a new folder under your MediaWiki extensions directory called AlfrescoSearch. Please cut and paste the code found below and place it in  directory in new files with the names supplied, you should end up creating five files. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Pre-Requisites
This software was tested with MediaWiki 1.15.1 on a Windows based MediaWiki installation. It may or may not work with earlier or later versions, but please test it. It should work on UNIX too, please amend the paths etc. as appropriate. We are running PHP 5.3 and Alfresco Community Edition 3.2.

It requires the following packages:


 * Alfresco PHP library (http://wiki.alfresco.com/wiki/Alfresco_PHP_Library_Installation_Instructions)
 * SimpleForms Extension for MediaWiki (http://www.mediawiki.org/wiki/Extension:Simple_Forms)

Install the PHP API Library

 * Download and install the Alfresco PHP library locally on your server somewhere
 * Edit your php.ini folder and update the include path to include the location of the php librabry as per the instructions here: (http://www.modwest.com/help/kb.phtml?qid=98&cat=5) e.g. http://www.modwest.com/help/kb.phtml?qid=98&cat=5

Install SimpleForms

 * Download and install the SimpleForms extensions

Install AlfrescoSearch

 * Edit the file AlfrescoConfig.php which you downloaded from below, change the hostname to match the host for your Alfresco installation.

(Note: localhost won't work even if MediaWiki and Alfresco are on the same server - otherwise when a user runs the search it will interpret this as localhost on their machine!). Also edit the username and password in this file. We created a mediawiki user in Alfresco to make things simpler and restrict what the user can do.


 * Add the following to LocalSettings.php
 * and optionally add the following too if you want your Alfresco links to open in new windows (Note, this will affect all External links).
 * and optionally add the following too if you want your Alfresco links to open in new windows (Note, this will affect all External links).


 * Upload an Alfresco logo (25x24) to your wiki and call it AlfrescoLogo.png (or alternatively follow the instructions in AlfrescoConfig.php if you don't want an image.

Good luck :)

Testing
Open 'yourwikiURL'/index.php?title=Special:AlfrescoSearch, this should load the search page. Try it out. If this link doesn't work, at the very least you should a link 'Alfresco Search' when you go to 'Special Pages' for your wiki.