4 by yu (http://nucleus.datoka.jp)
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 (see nucleus/documentation/index.html#license for more info)
15 class NP_QuickMenu extends NucleusPlugin {
17 function getName() { return 'QuickMenu'; }
18 function getAuthor() { return 'yu'; }
19 function getURL() { return 'http://nucleus.datoka.jp/'; }
20 function getVersion() { return '0.1'; }
21 function getMinNucleusVersion() { return '250'; }
22 function getEventList() { return array('QuickMenu'); }
23 function getTableList() { return array(); }
25 function getDescription() {
26 return "You can make links in Quick Menu. ";
29 function supportsFeature($what) {
31 case 'SqlTablePrefix':
44 $title[1] = "NucleusCMS(JP)";
45 $url[1] = "http://japan.nucleuscms.org/";
46 $tooltip[1] = "Nucleus CMS Japanese Official";
47 for ($i = 1; $i <= $this->max; $i++) {
48 $this->createOption("title{$i}", "Title {$i}", "text", $title[$i]);
49 $this->createOption("url{$i}", "URL {$i}", "text", $url[$i]);
50 $this->createOption("tooltip{$i}", "ToolTip {$i}", "text", $tooltip[$i]);
54 function uninstall() {
57 function event_QuickMenu(&$data) {
60 // only show to admins
61 if (!($member->isLoggedIn() && $member->isAdmin())) return;
63 for ($i = 1; $i <= $this->max; $i++) {
64 if ( $this->getOption("title{$i}") and $this->getOption("url{$i}") ) {
68 'title' => $this->getOption("title{$i}"),
69 'url' => $this->getOption("url{$i}"),
70 'tooltip' => $this->getOption("tooltip{$i}")