Skip to content

Commit 82691ce

Browse files
committed
init
1 parent 656f8fb commit 82691ce

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

HelloworldPlugin.inc.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
import("lib.pkp.classes.plugins.GenericPlugin");
4+
5+
class HelloworldPlugin extends GenericPlugin {
6+
7+
function register($category, $path, $mainContextId = null) {
8+
$success = parent::register($category, $path, $mainContextId);
9+
if (!Config::getVar('general', 'installed') || defined('RUNNING_UPGRADE')) return true;
10+
if ($success && $this->getEnabled($mainContextId)) {
11+
// handlers here
12+
}
13+
14+
$this->_registerTemplateResource();
15+
16+
return $success;
17+
}
18+
19+
function getDisplayName() {
20+
21+
return "hello world";
22+
23+
}
24+
25+
function getDescription() {
26+
27+
return "my first plugin";
28+
29+
}
30+
31+
}

README.md

Whitespace-only changes.

index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
require_once("HelloworldPlugin.inc.php");
4+
5+
return new HelloworldPlugin();
6+
7+
?>

version.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE version SYSTEM "../../../lib/pkp/dtd/pluginVersion.dtd">
3+
4+
<version>
5+
<application>helloworld</application>
6+
<type>plugins.generic</type>
7+
<release>1.0.0.0</release>
8+
<date>2019-05-21</date>
9+
<lazy-load>1</lazy-load>
10+
<class>HelloworldPlugin</class>
11+
</version>

0 commit comments

Comments
 (0)