From: <var...@us...> - 2016-07-11 15:54:52
|
Revision: 9875 http://sourceforge.net/p/phpwiki/code/9875 Author: vargenau Date: 2016-07-11 15:54:50 +0000 (Mon, 11 Jul 2016) Log Message: ----------- Derive ImageButton from HtmlElement instead of Button; use __construct Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2016-07-11 15:18:21 UTC (rev 9874) +++ trunk/lib/WikiTheme.php 2016-07-11 15:54:50 UTC (rev 9875) @@ -1725,17 +1725,15 @@ * @param string $url The url (href) for the button. * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. - * - * Do NOT replace with __construct: will break RSS icons links in RecentChanges */ - function Button($text, $url, $class = '', $options = array()) + function __construct($text, $url, $class = '', $options = array()) { /** * @var WikiRequest $request */ global $request; - $this->_init('a', array('href' => $url)); + parent::_init('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); if (!empty($options) and is_array($options)) { @@ -1749,13 +1747,12 @@ $this->setAttr('rel', 'nofollow'); $this->pushContent($GLOBALS['WikiTheme']->maybeSplitWikiWord($text)); } - } /* * A clickable image button. */ -class ImageButton extends Button +class ImageButton extends HtmlElement { /** * @param string $text The text for the button. @@ -1763,17 +1760,15 @@ * @param string $class The CSS class for the button. * @param string $img_url URL for button's image. * @param array $img_attr array Additional attributes for the <img> tag. - * - * Do NOT replace with __construct: will break RSS icons links in RecentChanges */ - function ImageButton($text, $url, $class, $img_url, $img_attr = array()) + function __construct($text, $url, $class, $img_url, $img_attr = array()) { /** * @var WikiRequest $request */ global $request; - $this->__construct('a', array('href' => $url)); + parent::__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-07-28 14:53:00
|
Revision: 10382 http://sourceforge.net/p/phpwiki/code/10382 Author: vargenau Date: 2021-07-28 14:52:50 +0000 (Wed, 28 Jul 2021) Log Message: ----------- No default value before mandatory argument Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-07-28 14:45:17 UTC (rev 10381) +++ trunk/lib/WikiTheme.php 2021-07-28 14:52:50 UTC (rev 10382) @@ -1836,7 +1836,7 @@ * @param string $img_url URL for button's image. * @param array $img_attr Additional attributes for the <img> tag. */ - function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) + function __construct($text, $name, $class, $img_url, $img_attr = array()) { parent::__construct('input', array('type' => 'image', 'src' => $img_url, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-11-25 15:13:03
|
Revision: 10690 http://sourceforge.net/p/phpwiki/code/10690 Author: vargenau Date: 2021-11-25 15:13:00 +0000 (Thu, 25 Nov 2021) Log Message: ----------- Duplicate function makeBox from WikiPlugin to avoid warning Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-11-25 14:49:07 UTC (rev 10689) +++ trunk/lib/WikiTheme.php 2021-11-25 15:13:00 UTC (rev 10690) @@ -1874,14 +1874,23 @@ { function __construct($title, $body) { - require_once 'lib/WikiPlugin.php'; $this->title = $title; $this->body = $body; } + function makeBox($title, $body) + { + if (!$title) { + $title = $this->getName(); + } + return HTML::div(array('class' => 'box'), + HTML::div(array('class' => 'box-title'), $title), + HTML::div(array('class' => 'box-data'), $body)); + } + function format() { - return WikiPlugin::makeBox($this->title, $this->body); + return $this->makeBox($this->title, $this->body); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-11-18 08:48:41
|
Revision: 10658 http://sourceforge.net/p/phpwiki/code/10658 Author: vargenau Date: 2021-11-18 08:48:38 +0000 (Thu, 18 Nov 2021) Log Message: ----------- $args must be an array Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-11-17 18:51:03 UTC (rev 10657) +++ trunk/lib/WikiTheme.php 2021-11-18 08:48:38 UTC (rev 10658) @@ -1076,7 +1076,7 @@ { extract($this->_get_name_and_rev($page_or_rev)); - $args = $version ? array('version' => $version) : false; + $args = $version ? array('version' => $version) : array(); if ($action) $args['action'] = $action; return $this->makeButton($label ? $label : $pagename, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-11-21 17:48:26
|
Revision: 10666 http://sourceforge.net/p/phpwiki/code/10666 Author: vargenau Date: 2021-11-21 17:48:24 +0000 (Sun, 21 Nov 2021) Log Message: ----------- Get language from preferences if possible Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-11-21 17:20:48 UTC (rev 10665) +++ trunk/lib/WikiTheme.php 2021-11-21 17:48:24 UTC (rev 10666) @@ -1618,7 +1618,12 @@ $dbi = $request->getDbh(); // display flat calender dhtml in the sidebar - $jslang = @$GLOBALS['LANG']; + if (isset($request->_prefs)) { + $pref = $request->_prefs; + $jslang = $pref->get('lang'); + } else { + $jslang = "en"; + } $this->addMoreHeaders( $this->_CSSlink(0, $this->_findFile('jscalendar/calendar-phpwiki.css'), 'all')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-11-23 14:23:11
|
Revision: 10678 http://sourceforge.net/p/phpwiki/code/10678 Author: vargenau Date: 2021-11-23 14:23:10 +0000 (Tue, 23 Nov 2021) Log Message: ----------- class RelatedExternalLinksBox is not used Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-11-22 21:03:32 UTC (rev 10677) +++ trunk/lib/WikiTheme.php 2021-11-23 14:23:10 UTC (rev 10678) @@ -1951,32 +1951,6 @@ } } -class RelatedExternalLinksBox extends SidebarBox -{ - function __construct($title = false, $body = '', $limit = 20) - { - /** - * @var WikiRequest $request - */ - global $request; - - $this->title = $title ? $title : _("External Links"); - $this->body = HTML::ul($body); - $page = $request->getPage($request->getArg('pagename')); - $cache = &$page->_wikidb->_cache; - $counter = 0; - foreach ($cache->getWikiPageLinks() as $link) { - $linkto = $link['linkto']; - if ($linkto) { - $this->body->pushContent(HTML::li(WikiLink($linkto))); - $counter++; - if ($limit and $counter > $limit) - continue; - } - } - } -} - function listAvailableThemes() { if (THEME == 'fusionforge') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |