ojs : got example plugin to do something
I've finally got the example plugin working.
It turns out that there has to be a record in the versions table in the mysql database for the plugin. (http://pkp.sfu.ca/support/forum/viewtopic.php?f=9&t=7386) The values for that record are conventionally stored in a version.xml file in the root of the plugin. What wasn't clear to me at first is that xml file is read only when the plugin is installed or upgraded using the OJS installer/upgrader mechanism (i.e. it is not read at any other time). So, if you're building the plugin (rather than deploying one already built as a .tar.gz file), you have to add the record in the versions table manually (I used phpmyadmin).
The xml file I created (not that it's actually been read by OJS yet)
is below.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE version SYSTEM "../../../lib/pkp/dtd/pluginVersion.dtd">
<!--
* plugins/generic/dataverse/version.xml
*
* Copyright (c) 2013-2014 Simon Fraser University Library
* Copyright (c) 2003-2014 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Plugin version information.
-->
<version>
<application>example</application>
<type>plugins.generic</type>
<release>1.1.1.0</release>
<date>2014-11-18</date>
<lazy-load>0</lazy-load>
<class>ExamplePlugin</class>
</version>
Here are the field names and values in the record in the versions table I manually entered in the db (but which presumably would be added/modified by the installer/upgrader mechanism).
major 1
minor 1
revision 1
build 0
date_installed 2014-11-18 10:40:33
current 1
product_type plugins.generic
product exmaple
product_class_name ExamplePlugin
lazy_load 0
sitewide 0
Now I've got to start figuring out how to get the plugin to actually do what I want it to do, which is a lot more complicated than writing a link into a page.