最終更新:2010-02-27 (土) 02:46:38 (5189d)
PukiWiki/自作プラグイン/Google Docs Viewer
PukiWikiでGoogle Docs Viewerを使ってPDF、PowerPoint、TIFFを表示するためのプラグイン。
docview.inc.php
<?php // PukiWiki - Yet another WikiWikiWeb clone. // // Inline-Google Docs Viewer plugin by tokkyo // Output inline-google_docs_viewer tag from a URI function plugin_docview_convert() { $args = func_get_args(); $url = isset($args[0]) ? $args[0] : ''; $encoded_url=urlencode($url); return <<<EOD <div> <iframe src="http://docs.google.com/viewer?url={$encoded_url}&embedded=true" width="600" height="780" style="border: none;"></iframe> <br> <a href="$url">このファイルへのリンク</a> </div> EOD; } ?>