User Tools

Site Tools


Sidebar

technical_notes:applications:dokuwiki:plugins:jcapture

jCapture Plugin

This plugin provides a javascript application that captures screenshots. Screen clipping is one of the most useful features of Microsoft's OneNote product. DokuWiki will soon allow me to replace it.

The jCapture plugin did not work right when I first installed it, so I moved the code to Github and added the bugfix below to my Puppet manifests.

See Also:

The plugin appears to require an undefined URL /somenonexistingcodebase. If DokuWiki is configured to accept non-existing pages via the send404 parameter, then this plugin fails with the error below:

This error goes away when send404 parameter is selected, but creates SEO problems when a wiki has many undefined pages.

An alternative is to configure the web server to send 404s only for the /somenonexistingcodebase page.

Puppet Code Fragments

If the plugin is to be installed, set a flag.

dokuwiki_role.pp
    if 'jcapture' in $plugins {
        $location_jcapture = true   # This variable used in location.erb
    } else {
        $location_jcapture = false
    }

Use the flag to add the following parameters in the nginx location stanza.

location.erb
<% if @location_jcapture -%>
  # Requirement for jcapture plugin: return 404 when below
  # url is accessed; otherwise plugin fails  
  location ^~ /somenonexistingcodebase  { return 404; }
<% end -%>

Testing

Testing in Weathermax by creating a screencapture under Windows.

technical_notes/applications/dokuwiki/plugins/jcapture.txt · Last modified: 2013/11/01 05:15 by Jon Jaroker