From 75f404b35b9e395aab1d886bdf18b4c92dd06956 Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 12 Oct 2006 06:30:30 +0000 Subject: [PATCH] New simple plugin BoxRight to work around not existing
tag. (see ENABLE_MARKUP_DIVSPAN) git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@5171 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/BoxRight.php | 70 +++++++++++++++++++++++++++++++++++++ pgsrc/Help%2FBoxRightPlugin | 43 +++++++++++++++++++++++ themes/default/phpwiki.css | 12 ++++++- 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 lib/plugin/BoxRight.php create mode 100644 pgsrc/Help%2FBoxRightPlugin diff --git a/lib/plugin/BoxRight.php b/lib/plugin/BoxRight.php new file mode 100644 index 000000000..1357c990d --- /dev/null +++ b/lib/plugin/BoxRight.php @@ -0,0 +1,70 @@ + with wikimarkup + */ +class WikiPlugin_BoxRight +extends WikiPlugin +{ + function getName () { + return "BoxRight"; + } + + function getDescription () { + return _("A simple plugin for
with wikimarkup"); + } + + function getVersion() { + return preg_replace("/[Revision: $]/", '', + "\$Revision: 1.1 $"); + } + + function managesValidators() { + // The plugin output will only change if the plugin + // invocation (page text) changes --- so the necessary + // validators have already been handled by displayPage. + return true; + } + + function run($dbi, $argstr, &$request, $basepage) { + if (!$basepage) { + return $this->error("$basepage unset?"); + } + include_once("lib/BlockParser.php"); + $page = $request->getPage($basepage); + return HTML::div(array('class'=>'boxright'), TransformText($argstr)); + } + +} + +// $Log: not supported by cvs2svn $ + +// For emacs users +// Local Variables: +// mode: php +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: +?> diff --git a/pgsrc/Help%2FBoxRightPlugin b/pgsrc/Help%2FBoxRightPlugin new file mode 100644 index 000000000..77847e4c7 --- /dev/null +++ b/pgsrc/Help%2FBoxRightPlugin @@ -0,0 +1,43 @@ +Date: Wed, 11 Oct 2006 09:16:43 +0200 +Mime-Version: 1.0 (Produced by PhpWiki 1.3.13pre-20061010) +X-Rcs-Id: $Id: Help%2FBoxRightPlugin,v 1.1 2006-10-12 06:30:30 rurban Exp $ +Content-Type: application/x-phpwiki; + pagename=Help%2FBoxRightPlugin; + flags=PAGE_LOCKED; + pgsrc_version="2 $Revision: 1.1 $"; + markup=2; + charset=iso-8859-1 +Content-Transfer-Encoding: binary + +!! Synopsis + +The [BoxRight|Help:BoxRightPlugin] plugin displays its content as a wiki-formatted +right-floating div box with border. +Since v1.3.13. + +!! Typical Usage + +This Wiki ([What is a Wiki?|WikiWikiWeb]) is a place where problems and +solutions are being documented. + +See [How to use this Wiki|Help/HowToUseWiki] for instructions. + +Don't be afraid - it's easy and you can't break anything! +?> + + + +!! Examples + +This Wiki ([What is a Wiki?|WikiWikiWeb]) is a place where problems and +solutions are being documented. + +See [How to use this Wiki|Help/HowToUseWiki] for instructions. + +Don't be afraid - it's easy and you can't break anything! +?> + +---- +PhpWikiDocumentation Help:WikiPlugin diff --git a/themes/default/phpwiki.css b/themes/default/phpwiki.css index 26d10eca3..22cbab485 100644 --- a/themes/default/phpwiki.css +++ b/themes/default/phpwiki.css @@ -1,5 +1,5 @@ /** - * $Id: phpwiki.css,v 1.53 2006-09-30 09:46:20 rurban Exp $ + * $Id: phpwiki.css,v 1.54 2006-10-12 06:30:30 rurban Exp $ * * This incarnation of this stylesheet is a complete rewrite from the * ground up. @@ -862,6 +862,16 @@ td.spacerow{background:#cad9ea;color:#000000} .box-data .wiki { font-weight: normal; } td.sidebar { border-spacing: 0px; margin: 0ex;} +/* plugin BoxRight */ +div.boxright { + width: 200px; + right: 10px; + padding: 0.5em; + float: right; + border: thin solid #888888; + padding: 0.5em; +} + /* RssFeed */ div.rss { margin: 1em; padding: 1em; font-size: 0.9em; background-color: #eeeeee; border: thin dashed #aaa; } div.feed { color: #333; margin: -0.5em; margin-bottom: 0em; padding: 0.3em; font-weight: bold; background-color: #f2f2f2; font-size: 1.2em; } -- 2.45.0