iframe.inc.php
Inline frame plugin
サマリ | Inline frame plugin |
---|---|
リビジョン | 1.1 |
対応バージョン | Verified with 1.4.3,1.4.4 |
開発者 | sonots |
ライセンス | GPL |
Table of Contents |
Abstract
Inline frame is a frame embeded into a page. It enables to show other pages in a page. It would be useful to include CGI or Web Applications.
That is, this is an iframe tag, however, object tag is used basically because XHTML1.1 does not allow to use iframe. However, iframe is used in the case of IE because object tag does not work well on IE.
You may use ../htmlinsert.inc.php to include some files without inline frames. Of course, this can not include CGIs, though.
Preparation
Permit URLs
It is possible to retrieve urls only which are allowed in iframe.inc.php.
From rev.8, it became possible to freely specify urls when the current page is frozen or edit_authed or the whole system is under PKWK_READONLY.
Use $accept_regurl to allow urls using regular expressions, and use $accept_url to allow urls using simple string.
static $accept_url = array( 'http://pukiwiki.sourceforge.jp', ); static $accept_regurl; if (! isset($accept_regurl)) $accept_regurl = array( '^' . preg_quote('http://www.google.com') . '$', '^' . preg_quote('http://pukiwiki.sourceforge.jp/dev/'), );
This example allows http://www.google.co.jp , all usls which start from http://pukiwiki.sourceforge.jp/dev/
and http://pukiwiki.sourceforge.jp
.
CSS
The default size can be configured using style sheet. Use class 'iframe' as
object.iframe { height:500px; width:100%; margin-left:auto; margin-right:auto; } iframe.iframe { height:500px; width:100%; margin-left:auto; margin-right:auto; }
iframe.iframe is for IE, and object.iframe is for other browsers.
How to use
#iframe(URL[,Options])
Necessary
- URL
Retrived URL. InterWikiName is also available.
Options
- style=CSS Style
- スタイル設定。ここで style=width:100%;height:500px; のように指定。
ヒント:スクロール不要にするには、そののページに対して十分大きな height 値を調べ、設定するしかなさそうです。ウィンドウの幅を狭められるとまた必要な height 値が変わってくるので十分ではないでしょうが、 height:100%; が期待通りに動いてくれないので仕方ありません(height:200px;ぐらいになる)。
- スタイル設定。ここで style=width:100%;height:500px; のように指定。
- iestyle=CSS Style for IE
- IE 用のスタイル指定。指定されない場合 style の値が使われる。
ヒント:IE(5|6) では object タグによる取り込みが期待通りに動作しないため iframe タグが使用されます。
- IE 用のスタイル指定。指定されない場合 style の値が使われる。
Example
#iframe(dev:FrontPage,style=width:100%;height:150px;,iestyle=width:100%;height:150px;)
dev:FrontPage は http://pukiwiki.sourceforge.jp/dev/?FrontPage に展開されるように InterWikiName のページで設定してあります。
#iframe(http://pukiwiki.sourceforge.jp,style=width:100%;height:300em;)
Download
Save from right-click, and put into plugin directory.
What's new
viewcvs
Revision | Date | Note |
rev.212 (以降 svn 上のリビジョン) | 2007/01/11 | ユーザ設定機構に対応。準備参照 |
iframe.inc.php.10 | 2006/11/03 | IE7 対応。IE7 でも object タグで iframe 代わりはできないらしいですね(IE7 インストールしてませんが)。いっそのこと iframe タグに統一しようかなんて思ってしまいます。 |
iframe.inc.php.9 | 2006/07/21 | url に InterWikiName を使用可能に。許可 URL 設定には使用できません(InterWikiName ページの編集で変更できてしまうので) |
iframe.inc.php.8 | 2006/07/20 | 編集制限されているページ上でならどの URL でも取り込み可能に。ほぼ一から書き直し。設定方法が変わっているのでアップグレードの際、注意してください。 |
![]() | 2005/01/25 | iestyleを指定していない場合でもstyleが指定してあればそちらを利用する処理を消してしまっていたので修正 |
![]() | 2005/01/25 | pukiwiki1.4.4対応*1。サイズ指定がうまくいかない不具合を修正。オプション変更。いっそのことスタイルシートクラス名も変更。 |
![]() | 2004/07/09 | modified by sonots |
![]() | 2004/05/09 | by ino_mori? |
Compatibility Check
Please join us to check compatibilities.
Compatible
Incompatible
*1 $html_transitionalが$pkwk_dtdになった。1.4.3以前対応のためにも両方書かなければいけない。HTTP_USER_AGENTがgetenv("HTTP_USER_AGENT")になった。これは getenv のほうだけでよい。