added plugin options: header=true|false border=1|0
header - whether include string: "Transcluded from <link>" border - draw border around iframe
Logged In: YES user_id=1372145
diff -Naur phpwiki_1.3.11/phpwiki-1.3.11p1/lib/plugin/Transclude.php phpwiki-1.3.11p1/lib/plugin/Transclude.php
phpwiki_1.3.11/phpwiki-1.3.11p1/lib/plugin/Transclude.php 2005-04-25 22:41:59.000000000 +0200 +++ phpwiki-1.3.11p1/lib/plugin/Transclude.php 2005-11-02 20:44:10.000000000 +0100 @@ -62,7 +62,9 @@
function getDefaultArguments() { return array( 'src' => false, // the src url to
include - 'height' => 450 // height of the iframe + 'height' => 450, // height of the iframe + 'header' => true, + 'border' => 1 ); }
@@ -92,6 +94,7 @@ 'marginwidth' => 0, 'marginheight' => 0, 'class' => 'transclude', + 'frameborder' => $border, "onload" => "adjust_iframe_height(this);");
$noframe_msg[] = fmt("See: %s",
HTML::a(array('href' => $src), $src)); @@ -104,10 +107,12 @@ / This doesn't work very well... maybe because CSS screws up NS4 anyway... $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 ($header=='false') + $header_txt=''; + else + $header_txt=HTML::p(array('class' => 'transclusion-title'), + fmt("Transcluded from %s", LinkURL($src))); + return HTML($header_txt, $this->_js(), $iframe); }
/**
Log in to post a comment.
Logged In: YES
user_id=1372145
diff -Naur
phpwiki_1.3.11/phpwiki-1.3.11p1/lib/plugin/Transclude.php
phpwiki-1.3.11p1/lib/plugin/Transclude.php
phpwiki_1.3.11/phpwiki-1.3.11p1/lib/plugin/Transclude.php
2005-04-25 22:41:59.000000000 +0200
+++ phpwiki-1.3.11p1/lib/plugin/Transclude.php 2005-11-02
20:44:10.000000000 +0100
@@ -62,7 +62,9 @@
include
- 'height' => 450 // height of the iframe
+ 'height' => 450, // height of the iframe
+ 'header' => true,
+ 'border' => 1
);
}
@@ -92,6 +94,7 @@
'marginwidth' => 0,
'marginheight' => 0,
'class' => 'transclude',
+ 'frameborder' => $border,
"onload" =>
"adjust_iframe_height(this);");
HTML::a(array('href' => $src), $src));
@@ -104,10 +107,12 @@
/ This doesn't work very well... maybe because
CSS screws up NS4 anyway...
$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 ($header=='false')
+ $header_txt='';
+ else
+ $header_txt=HTML::p(array('class' =>
'transclusion-title'),
+ fmt("Transcluded from %s",
LinkURL($src)));
+ return HTML($header_txt, $this->_js(), $iframe);
}