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
20 * along with PhpWiki; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
52 function getDescription () {
53 return _("Used to create a clickable popup link.");
55 function getDefaultArguments() {
56 return array('link' => "HomePage",
65 'directories' => "no",
68 'copyhistory' => "no",
73 function run($dbi, $argstr, &$request, $basepage) {
74 extract($this->getArgs($argstr, $request));
75 return HTML::a(array('href' => WikiURL($link),
77 'onclick' => ($close == "yes" ? "window.close()" : ("window.open('" .
78 WikiURL($link) . "', '" .
79 ($title == "" ? ($text == "" ? $link : $text) : $title) . "', '" .
82 "resizable=$resizable," .
83 "scrollbars=$scrollbars," .
85 "location=$location," .
86 "directories=$directories," .
89 "copyhistory=$copyhistory')"
92 ($text == "" ? ($close == "yes" ? "Close window" : $link) : $text)
101 // c-hanging-comment-ender-p: nil
102 // indent-tabs-mode: nil