WikiPres@MdH
Technical Document
Version 1.0
R
evision History
Date
|
Version
|
Description
|
Author
|
2010-01-15
|
1.0
|
Final
|
Romik Guha Anjoy
|
|
|
|
|
|
|
|
|
|
|
|
|
1.Introduction
1.1Purpose of this document
The document is a technical guide to the WikiPres application.
The document is organized as follows:
-
Section 1, Introduction, describes contents of this guide, used documentation during developing process etc.
-
Section 2, MediaWiki, provides technical information about MediaWiki
-
Section 3, Supporting Applications, provides technical information about the supporting applications used to develop WikiPres application.
-
Section 4, ODP Parser, provides technical information about ODP Parser.
-
Section 5, Environment, provides information about Working Environment of WikiPres application.
-
Section 6, Database Custom Tables, provides information about the custom tables of the WikiPres application database.
1.3Intended Audience
The intended audience is:
1.4Definitions and acronyms
1.4.1Acronyms and abbreviations
-
Acronym or
abbreviation
|
Definitions
|
DOM
|
Document Object Model
|
ODP
|
Open Document Presentation
|
PPT
|
Microsoft Power Point Presentation
|
PDF
|
Portable Document Format
|
2. MediaWiki
2.1MediaWiki Overview
MediaWiki is a free software wiki package written in PHP, originally for use on Wikipedia. MediaWiki 1.15.1 has been used for WikiPres application. The WikiPres application has been developed based on the MediaWiki framework.
2.2MediaWiki Extensions
The MediaWiki Extension that has been used in WikiPres application is:
-
Website in iFrame: This simple extension allows posting a website in an iFrame in MediaWiki articles [http://www.mediawiki.org/wiki/Extension:Website_in_iFrame]
The MediaWiki Maintenance Scripts those have been used in WikiPres application are:
-
importImages,php: importImages.php is a script which imports images to MediaWiki from a local directory
[http://www.mediawiki.org/wiki/Manual:ImportImages.php]
-
importTextFile.php: importTextFile.php is a script which imports the contents of a text file into a wiki page
[http://www.mediawiki.org/wiki/Manual:ImportTextFile.php]
[http://www.mediawiki.org/wiki/Manual:DeleteBatch.php]
-
dumpBackup.php: dumpBackup.php is a script which dumps the wiki page database into an XML interchange wrapper format for export or backup
[http://www.mediawiki.org/wiki/Manual:DumpBackup.php]
2.4MediaWiki Skin
The MediaWiki Skin that has been used in WikiPres application is Monobook. The skin has been modified to fit the usage in WikiPres application.
To use Monobook as WikiPres Skin check for the following line in LocalSettings.php:
$wgDefaultSkin = 'monobook';
To hide the Talk, History, View Source, Watch, Move and Edit tabs from the users use the following code within of $IP/skins/Monobook.php:
MediaWiki article protection is a hack which is implemented in order to provide User Access Restriction feature in WikiPres application.
In order to use this hack the following lines should be added to the MediaWiki include file $IP/includes/Article.php within insertNewArticle function:
global $wgDefaultProtectionLevel;
$prct = $this->updateRestrictions( $wgDefaultProtectionLevel, 'Initial protect' );
if( !$prct ) {
throw new FatalError( "Error: Default Protection Level." );
3.Supporting Applications
3.1OpenOffice.org
OpenOffice.org is a multiplatform and multilingual office suite and an open-source project, which can read and write ODP presentation files. OpenOffice.org 3 has been used for WikiPres application.
3.2Document Converter
Document Converter helps to convert ODP files to PDF, PPT files. DocumentConverter.py is a python script which helps in conversion of ODP files. Run the following command for the Document Converter to work:
"C:\Program Files\OpenOffice.org 3\program\soffice" -accept="socket,port=8100;urp;"
Document Converter is used to convert PPT files to ODP and ODP files to PDF files.
3.3ImageMagick®
ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
ImageMagick is used to generate Images from PDF files.
3.4Ghostscript
Ghostscript is an interpreter for the PostScript language and for PDF.
4.ODP Parser
4.1XPath
XPath, the XML Path Language, is a query language for selecting nodes from an XML document. XPath has been used to develop the ODP Parser for WikiPres application.
4.2PHP DOM
PHP DOM is a Document Object Model framework for XML Manipulation using PHP. The ODP Parser for WikiPres application is developed using PHP DOM. The most common functions used here are as follows:
[http://php.net/manual/en/book.dom.php]
-
getAttribute
-
setAttribute
-
createElement
-
appendChild
-
insertBefore
-
nodeValue
-
parentNode
-
nextSibling
-
length
5.Environment
Wikipres application works only in Windows environment. Given Below is the folder structure of WikiPres application:
MediaWiki Core: wikipres
WikiPres Custom Pages: pages
WikiPres Hostname Setup: setup/hostSetup.php
WikiPres Upload Directory: pages/upload
WikiPres Presentation Archive: pages/archive
WikiPres Site Comment Files: pages/comments
WikiPres Presentation Templates: pages/templates
WikiPres Settings: wikipres/LocalSettings.php and wikipres/AdminSettings.php
6.Database Custom Tables
There are two custom tables in the database wikipresdb:
|