• Skip to navigation (Press Enter).
  • Skip to main content (Press Enter).
  • English Version
  • Blog
  • Topics
  • Activities
  • Publications
  • Talks
  • Contact
  • Search

  • Twitter Updates

    • Categories

      • events (35)
        • CfP (6)
        • conference (21)
        • learntec (1)
        • symposium (7)
      • project (35)
        • agent-dysl (2)
        • mature-ip (20)
        • mirror (3)
        • myui (2)
        • soprano (8)
        • universaal (4)
      • publications (13)
      • tools (2)
        • mediawiki (1)
      • topics (61)
        • aal (10)
        • adaptivity (1)
        • affective (1)
        • competencies (15)
        • context (12)
        • education (3)
        • elearning (14)
        • hr (11)
        • km (15)
        • maturing (22)
        • microlearning (1)
        • motivation (4)
        • ontology (10)
        • project management (1)
        • workplace learning (21)
    • Archive

      • March 2012
      • February 2012
      • February 2011
      • November 2010
      • October 2010
      • September 2010
      • July 2010
      • May 2010
      • February 2010
      • January 2010
      • November 2009
      • September 2009
      • May 2009
      • March 2009
      • December 2008
      • November 2008
      • October 2008
      • September 2008
      • June 2008
      • May 2008
      • April 2008
      • March 2008
      • February 2008
      • January 2008
      • November 2007
      • October 2007
      • September 2007
      • August 2007
      • June 2007
      • May 2007
      • March 2007
      • February 2007
      • January 2007
      • December 2006
      • October 2006
      • September 2006
      • August 2006
    • RSS My MATURE Project blog

      • People Tagging Tool / SOBOLEO release as open source
      • "A refreshing new perspective on learning": MATURE raises interest at Learntec 2012
      • knowledge-maturing.com launched for releasing MATURE results
      • New Flyer on Knowledge Maturing Model
      • Two journal articles accepted
      • STELLAR Roundtable on Social Mobile Networking for Informal Learning (SoMobNet)
      • Knowledge Maturing for Organizational Development: A Workshop with IFIP
      • MATURE at WikiSym 2011
      • MATURE and competence development: Professional Training Facts 2011
      • 2nd Workshop on Motivational and Affective Aspects in TEL
    • Tags

      aal competence ectel10 elearning enterprise20 hr km knowledge_management learning matureip mirror-ip ontology pwm2011 reflection scohrid soprano web20 web30

    Archive for the ‘mediawiki’ Category

    Google Gears hack: MediaWiki offline functionality in less than one hour

    Monday, October 15th, 2007

    Wikis are popular intranet tools in which teams collaboratively develop a shared knowledge base. So far, however, there has often been the problem that wikis were not available (even read-only) offline, e.g., when traveling.

    Google Gears is an interesting new technology to solve the problem of offline web applications in a surprisingly easy way. In order to try out the potential of it, I have recently tried to apply it to the MediaWiki system (actually a Semantic MediaWiki installation).

    What do you have to do?

    • Create a folder gears in your MediaWiki installation directory
    • Download the gears_init.js from the Google Gears web site and place it in the newly created folder
    • Download the gears_offline.js from the Google Gears tutorial
    • Modify the manifest file name in this file to a php script, e.g. manifest.php
    • Create the manifest.php that creates the file list on the fly (based on access to the database):

    {
    “betaManifestVersion”: 1,
    <?php
    $l = mysql_connect(‘localhost’,’user‘,’pass‘);
    mysql_selectdb(‘mediawikidbname‘);
      $q = “SELECT max(rc_timestamp) from recentchanges”
    $r = mysql_query($q);
    $t = mysql_fetch_row($r);
      echo ‘”version”: “‘ . $t[0] . ‘”,’;
    ?>

    “entries”:
    [

    <?php
    $q = "SELECT page_title from page"
    $r = mysql_query($q);
     while ($t = mysql_fetch_row($r))
    {
    echo '{ "url": "
    /index.php/' . $t[0] . ‘” },’;
    }
      echo ‘{ “url”: “/index.php/Main” }’;
    ?>
    ]

    }

    • Modify the MonoBook.php skin file (or any other skin you are using):
      • Include the two javascript files in the header section
      • add “init()” to body onload
      • add a link somewhere on the page (e.g., footer) invoking the javascript function createStore()
      • add a placeholder <span id=’textOut’></span> somewhere for status messages, e.g. in the footer

    Of course, the approach is quite a hack and does not scale for large wikis because there is always a complete replication of online content as soon as some change occurred (this could be made smarter by not leaving everything to Gears, but implementing your own update strategy). Likewise, offline search, editing, and other cool features are not available (this would require much more effort towards AJAXifying MediaWiki). So this simple solution just provides the possibility of offline reading – and this transparently to the user (and within less than one hour :) .

    Technorati tags: MediaWiki, Gears

    Posted in mediawiki | 3 Comments »

    E-mail:  email address Contact information
    Copyright © 2010, Andreas Schmidt.