This took me a whole afternoon and involved a lot of hope as I browsed the Internet and no one seemed to have done this before.  Fortunately, MediaWiki extensions are easier to write than Joomla CMS ones :c)

This article shows you how to get your MediaWiki system to display your Camtasia Studio SWF files in it's articles.

Why Camtasia when there are other free options?

We tried lots of FLV players that were usually branded or not free.  These were awkward to configure a full screen button on the controls and do basic customization.  Our screen recorder was also not displaying the captions of the video unless it was an AVI file that we converted to FLV.  The quality was horrible.  Then we moved to Camtasia Studio where their videos were displaying in good quality but as SWF files.  This extension includes the default settings for "ExpressShow" in Camtasia Studio.

In not as many words as others, here's my MySQL query to extract details on images stored in the MediaWiki CMS system (v1.14).

Prior to a migration and just after another change freeze, I had sent all Wiki articles modified since the last export but then needed to send all images that had also been either added/modified since.

Using MySQL, the following query lists the image name, size, user who uploaded, timestamp and the path. Remember that the paths are determined using the MD5 Hash of the filename:

What do I want?
Page ID, Title, Content, Category, AccessLevel (note that AccessLevel is extra to your standard MediaWiki setup and one that was customized for my day job).

Thought I already had this somewhere on my site, so it took a while again but I've posted my finished query here:

The base query to list mediawiki articles
Page ID, Title, Content, Category

  1.  SELECT 
  2.  p.page_id AS PageID, 
  3.  CONVERT(p.page_title USING latin1) AS PageTitle, 
  4.  CONVERT(t.old_text USING latin1) AS PageContent, 
  5.  (SELECT GROUP_CONCAT(CONVERT(wikimedia_categorylinks.cl_to USING latin1)) FROM wikimedia_categorylinks WHERE wikimedia_categorylinks.cl_from=p.page_id) AS PageCategory 
  6.  FROM 
  7.  wikimedia_page p 
  8.  LEFT JOIN wikimedia_revision r ON p.page_latest=r.rev_id 
  9.  LEFT JOIN wikimedia_text t ON r.rev_text_id=t.old_id 
  10.  WHERE 
  11.  p.page_namespace=0 
  12.  AND t.old_text='' 
  13.  AND p.page_is_redirect=0 

The Error: This file contains HTML or script code that may be erroneously interpreted by a web browser

This is a common error when uploading files that the MediaWiki system does not allow.  By making some minor changes to the MediaWiki LocalSettings.php file, we can fix this.

For demo purposes, I'm going to make our system recognize SWF files (by default these are disallowed):