From: <var...@us...> - 2008-10-20 16:47:26
|
Revision: 6310 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6310&view=rev Author: vargenau Date: 2008-10-20 16:47:13 +0000 (Mon, 20 Oct 2008) Log Message: ----------- Implemented 'quiet' argument in Transclude plugin, like in IncludePage plugin Modified Paths: -------------- trunk/lib/plugin/Transclude.php trunk/pgsrc/Help%2FTranscludePlugin Modified: trunk/lib/plugin/Transclude.php =================================================================== --- trunk/lib/plugin/Transclude.php 2008-10-17 09:27:28 UTC (rev 6309) +++ trunk/lib/plugin/Transclude.php 2008-10-20 16:47:13 UTC (rev 6310) @@ -62,7 +62,8 @@ function getDefaultArguments() { return array( 'src' => false, // the src url to include - 'height' => 450 // height of the iframe + 'height' => 450, // height of the iframe + 'quiet' => false // if set, frame appears as normal content ); } @@ -114,9 +115,13 @@ $iframe = new HtmlElement('ilayer', array('src' => $src), $iframe); */ - return HTML(HTML::p(array('class' => 'transclusion-title'), - fmt("Transcluded from %s", LinkURL($src))), - $this->_js(), $iframe); + if ($quiet) { + return HTML($this->_js(), $iframe); + } else { + return HTML(HTML::p(array('class' => 'transclusion-title'), + fmt("Transcluded from %s", LinkURL($src))), + $this->_js(), $iframe); + } } /** @@ -157,46 +162,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.9 2004/06/14 11:31:39 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.8 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.7 2003/02/27 22:47:27 dairiki -// New functions in HtmlElement: -// -// JavaScript($js) -// Helper for generating javascript. -// -// IfJavaScript($if_content, $else_content) -// Helper for generating -// <script>document.write('...')</script><noscript>...</noscript> -// constructs. -// -// Revision 1.6 2003/02/25 05:45:34 carstenklapp -// Added "See: " in front of url, so for browsers that do not support -// <iframe> at least there is an indication to the user that this -// plugin is actually doing something while at the same time without -// being (subjectively) too disruptive to page content. -// -// Revision 1.5 2003/02/24 14:34:44 carstenklapp -// Added iframe title (bobby.org accessibility guidelines). -// Simplified output for non-iframe and non-visual browsers (as suggested -// by http://www.uwosh.edu/programs/accessibility/tutorial.html). -// -// Revision 1.4 2003/01/18 22:08:01 carstenklapp -// Code cleanup: -// Reformatting & tabs to spaces; -// Added copyleft, getVersion, getDescription, rcs_id. -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/pgsrc/Help%FTranscludePlugin =================================================================== --- trunk/pgsrc/Help%2FTranscludePlugin 2008-10-17 09:27:28 UTC (rev 6309) +++ trunk/pgsrc/Help%2FTranscludePlugin 2008-10-20 16:47:13 UTC (rev 6310) @@ -1,4 +1,4 @@ -Date: Mon, 16 Jun 2008 14:15:24 +0000 +Date: Mon, 20 Oct 2008 14:15:24 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -13,19 +13,30 @@ !!! Arguments -=src= | - The URL of the page to transclude -=height= | - The (initial) height of the transclusion frame. - If, possible, after the transcluded page is loaded, - the frame is resized via javascript so that it - fits the entire transcluded page. (See below for more.) +{| class="bordered" +|- +| Argument +| Description +| Default value +|- +| src +| The URL of the page to transclude +| ''none'' +|- +| height +| The (initial) height of the transclusion frame. If, possible, after the transcluded page is loaded, the frame is resized via Javascript so that it fits the entire transcluded page. (See below for more.) +| 450 +|- +| quiet +| If set, frame appears as normal content +| false +|} !!! Bugs / Caveats o Pages are transcluded using =<iframe>= tags. Older browsers do not support ''iframe''s. In that case the user will be presented with a - link to the trancluded material. + link to the transcluded material. o When possible, JavaScript code is used to adjust the height of the _iframe_ so that it fits the entire transcluded page. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |