max = 5; } function install() { //set initial value $title[1] = "NucleusCMS(JP)"; $url[1] = "http://japan.nucleuscms.org/"; $tooltip[1] = "Nucleus CMS Japanese Official"; for ($i = 1; $i <= $this->max; $i++) { $this->createOption("title{$i}", "Title {$i}", "text", $title[$i]); $this->createOption("url{$i}", "URL {$i}", "text", $url[$i]); $this->createOption("tooltip{$i}", "ToolTip {$i}", "text", $tooltip[$i]); } } function uninstall() { } function event_QuickMenu(&$data) { global $member; // only show to admins if (!($member->isLoggedIn() && $member->isAdmin())) return; for ($i = 1; $i <= $this->max; $i++) { if ( $this->getOption("title{$i}") and $this->getOption("url{$i}") ) { array_push( $data['options'], array( 'title' => $this->getOption("title{$i}"), 'url' => $this->getOption("url{$i}"), 'tooltip' => $this->getOption("tooltip{$i}") ) ); } } } } ?>