MediaWiki Extension

From Kaltura Wiki

Jump to: navigation, search
Kaltura’s Collaborative Video Extension for MediaWiki

Note that this extension can only be used with MediaWiki version 1.10.

Release Status: Current Version - 1.0.8

Contents

[edit] Description

Kaltura’s Video-Wiki xml tag extension allows wiki users to add videos to any article page, using MediaWiki capabilities including: special pages, hooks and a custom namespace. The end result is a flash-based video player that allows wiki users to add rich media to the video and edit the video collaboratively.

The tag extension supplies users with a shorthand code snippet that generates the HTML instance of a widget that can be pasted in any article.


See how it works on Kaltura's MediaWiki Site

[edit] Installation Instructions

If you are installing this extension for the first time:

1. Extract the zipped file under the wiki/extensions directory. It will create a directory called kaltura_wiki_ext which will include 20 files of types 'php' 'js' and 'css' and a directory named 'log' (which includes a single file) and a directory named 'images'

2. In the wiki's main directory, edit LocalSettings.php, and under the line saying
require_once( "$IP/includes/DefaultSettings.php" );
Or
require_once( "includes/DefaultSettings.php" );
paste the following:
require_once( "$IP/extensions/kaltura_wiki_ext/kaltura_extension.php" );

3. Log into the wiki as an admin. Now refresh the wiki and go to Special Pages – you will see a new special page named: "Video extension installation". Click on the new page and follow the instructions to complete installation

4. Following the installation, we recommend that you enable logging, in order to monitor and track any issues. To enable logging:

  • Set $log_kaltura_services = true;
  • Grant write permissions to the '../kaltura_wiki_ext/log' directory in order to allow the extension to log debug info into a file called 'kaltura_extension_log'

5. Feel free to contact Kaltura at support@kaltura.com with any question you have.


If you are updating your existing Kaltura video extension /Already have a Kaltura Partner ID:

1. Under the wiki/extensions directory, rename the directory called kaltura_wiki_ext to be named kaltura_wiki_ext1. This will ensure that your previous version is saved (in the rare case that it will need to be referenced in the future)

2. Extract the zipped file under the wiki/extensions directory. It will create a directory called kaltura_wiki_ext which will include 20 files of types 'php' 'js' and 'css' and a directory named 'log' (which includes a single file) and a directory named 'images'

3. Log into the wiki as an admin. Now refresh the wiki and go to Special Pages – you will see a new special page named: "Video extension installation". Click on the new page and follow the instructions to complete installation.

IMPORTANT NOTE: Make sure to mark on the installation page that you ALREADY have a Kaltura Partner ID. You will then be prompted to provide your Kaltura Partner ID and Secret (provided when you first signed up) in order to save your previous settings and information.

4. Following the installation, we recommend that you enable logging, in order to monitor and track any issues. To enable logging:

  • Set $log_kaltura_services = true;
  • Grant write permissions to the '../kaltura_wiki_ext/log' directory in order to allow the extension to log debug info into a file called 'kaltura_extension_log'

5. Feel free to contact Kaltura at support@kaltura.com with any question you have.

[edit] Usage

[edit] Components

  1. Widget
    • link to "Kaltura:" special page
    • link to "Add to Video" page
    • link to Kaltura Editor
    • link to "Update Collaborative Video"
  2. Upload and Import Flash based component
  3. Kaltura Editor, displaying partner logo and links back to wiki

[edit] Tag Extension

<kaltura-widget kalturaid='ID num' align='L|R|C|N’ size='M|L'/>

@kalturaid 
Kaltura video id (internal Kaltura unique number)
@align 
Align with text parameter, default is left.
Other options: R (right), C (Center), N (None)
@size 
Size parameter, default is Large: 400x425 pixels
Medium size widget dimensions: 267x305 pixels

The proper way to use the extension:

  • Generate a new code snippet from the special page "Add Collaborative Video" (a link to it is automatically added to the left toolbox when adding the extension)
  • Copy existing snippet and paste it in a new article.

When the widget is first embedded, no content is displayed. The widget displays a placeholder text slide including the name of the article in which the widget is embedded (this default text can later be edited in the Kaltura editor).

[edit] Special Page Extension

  1. Add Collaborative Video: Properties required for a new Collaborative Video widget includes title (unique), summary, new id number (unique).
    Other optional parameters: alignment and size of widget.
    When the widget code is generated, a new article representing the collaborative video is created. This article is automatically watched by the user who generated the widget code.
  2. Update Collaborative Video: This page enables users to modify properties assigned to any Collaborative Video widget (title, summary, alignment, size).
  3. Add to Video page: Includes flash component which includes upload mechanism for videos, images and audio files as well as search and import capabilities from various web sources.
  4. The article which represents the collaborative video is automatically watched by the user who contributes.
  5. Editor launch page: this page passes parameters from the wiki to the Kaltura hosted editor and is also used as a return page from the editor, updating the article that represents the Kaltura collaborative video.

[edit] Hooks grouped by function

Hook name / array Function name purpose
MonoBookTemplateToolboxEnd FnKalturaMonoBookTemplateToolboxEnd Adds the "collaborative Video" link to the toolbox
$wgAjaxExportList ajaxKalturaUpdateArticle Receives an AJAX call to update a KalturaArticle once a contribution is done
ParserAfterTidy kalturaWidgetParserAfterTidy Hooked only from a Widget tag.

Is used to inspect the context of article surrounding the tag and inject Javascript.
userCan

$wgExtensionFunctions
(written by Petr Andreev)
namespacePermissionsCheckNamespace

wfNamespacePermissions
Enforces permissions for the Kaltura: namespace
ArticleFromTitle NamespaceManagers::hArticleFromTitle Returns the KalturaNamespace (derived from the Article object) to handle Kaltura: articles
CustomEditor NamespaceManagers::hCustomEditor Controls editing and saving of Kaltura: articles
SpecialVersionExtensionTypes

(written by Jean-Lou Dupont)
NamespaceManagers::hSpecialVersionExtensionTypes Reports the status of the extension in the Special:Version page

[edit] Kaltura Namespace

Any article starting with "Kaltura:" will be part of the Kaltura Namespace. These articles display and represent a particular collaborative video and provide additional information relating to that video:

  • History
  • Embed Code

On this page user can view previous versions of the video.
Diff and Revert options will be added in the next few days.
These pages are not supposed to be manually edited.
The included code uses Namespace ID = 320 (for Kaltura Talk = 321)

[edit] Permissions

Users need to be logged in, in order to generate code, update widget, add content and edit video.

Personal tools