4 * Copyright 2004 Nicolas Noble <pixels@users.sf.net>
5 * Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent
7 * This file is part of PhpWiki.
9 * PhpWiki is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * PhpWiki is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * Display a page in a clickable popup link.
30 * title="PopUpped HomePage"
31 * text="Click here to popup the HomePage"
43 * <<PopUp close=yes >>
46 class WikiPlugin_PopUp
54 function getDescription()
56 return _("Used to create a clickable popup link.");
59 function getDefaultArguments()
61 return array('link' => "HomePage",
70 'directories' => "no",
73 'copyhistory' => "no",
78 function run($dbi, $argstr, &$request, $basepage)
80 extract($this->getArgs($argstr, $request));
81 return HTML::a(array('href' => WikiURL($link),
83 'onclick' => ($close == "yes" ? "window.close()" : ("window.open('" .
84 WikiURL($link) . "', '" .
85 ($title == "" ? ($text == "" ? $link : $text) : $title) . "', '" .
88 "resizable=$resizable," .
89 "scrollbars=$scrollbars," .
91 "location=$location," .
92 "directories=$directories," .
95 "copyhistory=$copyhistory')"
98 ($text == "" ? ($close == "yes" ? "Close window" : $link) : $text)
109 // c-hanging-comment-ender-p: nil
110 // indent-tabs-mode: nil