4 Copyright 2004 Nicolas Noble <pixels@users.sf.net>
6 This file is (not yet) part of PhpWiki.
8 PhpWiki is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 PhpWiki is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * Display a page in a clickable popup link.
29 * title="PopUpped HomePage"
30 * text="Click here to popup the HomePage"
42 * <?plugin PopUp close=yes ?>
45 class WikiPlugin_PopUp
51 function getDescription () {
52 return _("Used to create a clickable popup link.");
55 function getVersion() {
56 return preg_replace("/[Revision: $]/", '',
59 function getDefaultArguments() {
60 return array('link' => "HomePage",
69 'directories' => "no",
72 'copyhistory' => "no",
77 function run($dbi, $argstr, &$request, $basepage) {
78 extract($this->getArgs($argstr, $request));
79 return HTML::a(array('href' => WikiURL($link),
81 'onClick' => ($close == "yes" ? "window.close()" : ("window.open('" .
82 WikiURL($link) . "', '" .
83 ($title == "" ? ($text == "" ? $link : $text) : $title) . "', '" .
86 "resizable=$resizable," .
87 "scrollbars=$scrollbars," .
89 "location=$location," .
90 "directories=$directories," .
93 "copyhistory=$copyhistory')"
96 ($text == "" ? ($close == "yes" ? "Close window" : $link) : $text)
101 // $Log: not supported by cvs2svn $
109 // c-hanging-comment-ender-p: nil
110 // indent-tabs-mode: nil