サマリ | 画像ファイルの簡易サムネイル機能とキャッシュを管理機能 |
---|---|
リビジョン | 1.0 |
対応バージョン | 1.4 |
投稿者 | upk |
投稿日 | 2003-10-28 (TUE) 00:52:17 |
./cache/
キャッシュディレクトリを定義
1
キャッシュ削除可否
1
キャッシュ管理機能可否
5
横に並べられる画像数
90
GIFなどの場合は、サムネイルファイルの生成ができないため、一覧表示時の最大表示サイズ
HTML_CACHE_IMG_SIZE は、showhtml 設定値を同一にして下さい。
名称 | ファイル名URL |
日本語マッピングテーブル | :config/plugin/showcache/URL |
キャッシュホルダー名マッピングテーブル | :config/plugin/showcache/Folder |
キャッシュの一覧表示・整列表示・削除機能と、showhtmlと連携した再表示機能があります。
html2pw と連携できるようになっています。
#showcache #showcache(cmd, dir, adm) #showcache(Thumbnail, Thumbnail_Dir)
#showcache #showcache(,,1) #showcache(ext,./cache/html,1) #showcache(,url)
#showcache(img,./face) #showcache(img,./image/)
キャッシュ一覧の表示順を指定
ファイル作成日順(date) 値 date(降順),date_a(昇順),ext,url のいずれか
#showcache #showcache(url)
管理メニューを表示できるかどうかの指定
HTML_CACHE_ADM が 1 の場合のみ機能します。
#showcache(,,1) #showcache(ext,,1)
サムネイル指定表示
img
#showcache(img)
サムネイルディレクトリ
第1パラメータが img の場合のみ有効
#showcache(img,./face)
一部のタグの属性で引用符で囲み忘れあり。タグ間違いあり。
- $hed1 = "<th align=left style=\""; - $hed2 = "\" colspan=1>"; + $hed1 = "<th align=\"left\" style=\""; + $hed2 = "\" colspan=\"1\">";
- $rc = "<th align=left style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">↑</font></th>"; + $rc = "<th align=\"left\" style=\"color:#ffffff;background-color:#3366cc\">↑</th>"; - $rc .= "<th align=left>". + $rc .= "<th align=\"left\">". "<a href=\"./?plugin=showcache&cmd=sort&adm=".$adm. "&sort=".$sort."&dir=".CACHE_DIR."\">top</a></th>";
- $rc .= "<th align=left>/</th>"; + $rc .= "<th align=\"left\">/</th>"; if ($tok) { - $rc .= "<th align=left>". + $rc .= "<th align=\"left\">". "<a href=\"./?plugin=showcache&cmd=sort&adm=".$adm. "&sort=".$sort."&dir=".$path."\">".$name."</a></th>"; } else { - $rc .= "<th align=left>".$name."</th>"; + $rc .= "<th align=\"left\">".$name."</th>"; }
- return "<small><table border=0 cellspacing=1>".$rc."</table></small>"; - return "<table border=\"0\" cellspacing=\"1\" style\"font-size:small\">".$rc."</table>";
- $rc = "<th align=left style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">↓</font></th>"; + $rc = "<th align=\"left\" style=\"color:#ffffff;background-color:#3366cc\">↓</font></th>";
- $rc .= "<th align=left style=\"background-color:#ccccee\">". + $rc .= "<th align=\"left\" style=\"background-color:#ccccee\">". "<a href=\"./?plugin=showcache&cmd=sort&adm=".$adm. "&sort=".$sort."&dir=". $data['dir'].$data['sub']."\">". (empty($pconfig_FolderName[$data['dir'].$data['sub']][0]) ? $data['sub'] : $pconfig_FolderName[$data['dir'].$data['sub']][0]). "</a></th>";
- $rc = "<small><table border=0 cellspacing=1>".$rc."</table></small>"; + $rc = "<table border=\"0\" cellspacing=\"1\" style=\"font-size:small\">".$rc."</table>";
- $hed = "<td ".$td_c."><small>".$date."</small></td>"; - $hed .= "<td ".$td_c."><small>(".$data["cache_time"].")</small></td>"; + $hed = "<td ".$td_c." style=\"font-size:small\">".$date."</td>"; + $hed .= "<td ".$td_c." style=\"font-size:small\">(".$data["cache_time"].")</td>";
- $msg .= $hed."<td ".$td_c."><small>".$data["ext"]."</small></td>"; + $msg .= $hed."<td ".$td_c." style=\"font-size:small\">".$data["ext"]."</td>";
- $msg .= $hed."<td ".$td_c."><small>".$data["ext"]."</small></td>"; + $msg .= $hed."<td ".$td_c." style=\"font-size:small\">".$data["ext"]."</td>";
- $msg .= $hed."<td ".$td_c."><small>".$data["ext"]."</small></td>"; + $msg .= $hed."<td ".$td_c." style=\"font-size:small\">".$data["ext"]."</td>";
- $msg .= $hed."<td ".$td_c."><small>".$data["ext"]."</small></td>"; + $msg .= $hed."<td ".$td_c." style=\"font-size:small\">".$data["ext"]."</td>"; if ($adm && ($data["ext"] != "img" || $data["ext"] != "bin")) { - $msg .= "<td ".$td_c." align=center>[<a href=\"". + $msg .= "<td ".$td_c." align=\"center\">[<a href=\"". "./?plugin=showcache&adm=".$adm. "&cmd=menu&sort=".$sort."&". "lst=".$data["filename"]."&dir=".$data["dir"]. "\">".$_showcache_messages['msg_Str_Select']."</a>]</td>"; }
- $msg .= "<table align=center border=0 cellpadding=". - HTML_CACHE_IMG_CTR." cellspacing=0>"; + $msg .= "<table align=\"center\" border=\"0\" cellpadding=\"". + HTML_CACHE_IMG_CTR."\" cellspacing=\"0\">";
- $msg .= "<td align=center valign=bottom width=\"". + $msg .= "<td align=\"center\" valign=\"bottom\" width=\"". HTML_CACHE_IMG_SIZE."\"><a href=\"". SHOWHTML.$dir."&url=".rawurlencode($org_filename)."\">". $org_filename."</a></td>\n";
- $msg .= "<td align=center valign=bottom width=\"". + $msg .= "<td align=\"center\" valign=\"bottom\" width=\"". HTML_CACHE_IMG_SIZE."\"><a href=\"".$dir.$filename."\">";
$msg .= " alt=\"".$_showcache_messages['msg_Str_Kind'].":". $org_ext." ".$_showcache_messages['msg_Str_Size'].":".$size. " ". $_showcache_messages['msg_Str_Cache'].":".$cache_time."\"". " width=\"" .$img_size[3]."\"". - " height=\"".$img_size[4]."\"></a>". - "<br><small>".$org_body."</small>". + " height=\"".$img_size[4]."\" /></a>". + "<br /><span style=\"font-size:small\">".$org_body."</span>". "</td>\n";
- $rc .= "<table border=1 cellspacing=0 cellpadding=2 width=\"100%\" summary=\"cache_mv_menu\">\n"; + $rc .= "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\" summary=\"cache_mv_menu\">\n"; $rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Addr']. - "</font></td><td width=\"85%\">".decode($name)."</td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Addr']. + "</td><td width=\"85%\">".decode($name)."</td>". "</tr>\n"; if (!empty($pconfig_url[decode($name)][0])) { $rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Jpn']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Jpn']. + "</td>". "<td width=\"85%\">".$pconfig_url[decode($name)][0]."</td>". "</tr>\n"; }
$rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Syubetu']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Syubetu']. + "</td>". "<td width=\"85%\">".showcache_SetExtName($ext)."</td></tr>\n"; if ($ext != "txt") { $rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Syozai']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Syozai']. + "</td>". "<td width=\"85%\">".showcache_dir_alias($dir). "</td></tr>\n"; }
$rc .= - "<br><form>". + "<br /><form><div>". "<input type=\"button\" value=\"". $_showcache_messages['msg_Btn_Can']."\" onClick=\"history.back()\">". - "</form>"; + "</div></form>";
- $rc .= "<h3>".$_showcache_messages['msg_H3_adm']."</h3><br>\n"; + $rc .= "<h3>".$_showcache_messages['msg_H3_adm']."</h3><br />\n"; - $rc .= "<table border=1 cellspacing=0 cellpadding=2 width=\"100%\" summary=\"cache_adm_menu\">\n"; + $rc .= "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\" summary=\"cache_adm_menu\">\n"; $rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Mv']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Mv']. + "</td>". "<td width=\"85%\">"; // 選択用リストボックスの生成 $rc .= "<form action=\"$script?plugin=showcache\" method=\"post\">\n". - "<select name=\"mvdir\">\n"; + "<div><select name=\"mvdir\">\n";
$rc .= "</select>\n". "<input type=\"hidden\" name=\"cmd\" value=\"mv\" />\n". "<input type=\"hidden\" name=\"dir\" value=\"$dir\" />\n". "<input type=\"hidden\" name=\"lst\" value=\"$filename\" />\n". "<input type=\"hidden\" name=\"adm\" value=\"$adm\" />\n". "<input type=\"hidden\" name=\"sort\" value=\"$sort\" />\n". "<input type=\"submit\" value=\"".$_showcache_messages['msg_Btn_Mv']. - "\">\n". + "\" /></div>\n". "</form>\n"; $rc .= "</td></tr>\n";
// 削除 $rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_Del']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_Del']. - "</td>". "<td width=\"85%\">"; $rc .= "<input type=\"button\" value=\"". $_showcache_messages['msg_Btn_Del']."\"". " onClick=\"parent.location='./?plugin=showcache&adm=".$adm. "&cmd=rm&sort=".$sort. - "&lst=".$filename."&dir=".$dir."'\">\n"; + "&lst=".$filename."&dir=".$dir."'\" />\n";
$rc .= - "<tr><td width=\"15%\" style=\"background-color:#3366cc\">". - "<font color=\"#ffffff\">".$_showcache_messages['msg_Str_ConvPage']. - "</font></td>". + "<tr><td width=\"15%\" style=\"color:#ffffff;background-color:#3366cc\">".$_showcache_messages['msg_Str_ConvPage']. + "</td>". "<td width=\"85%\">"; $rc .= "<form action=\"$script?plugin=html2pw\" method=\"post\">". - "<input type=\"hidden\" name=\"lst\" value=\"$filename\" />". + "<div><input type=\"hidden\" name=\"lst\" value=\"$filename\" />".
} - $rc .= "</form></td></tr>\n"; + $rc .= "</div></form></td></tr>\n"; }
$msg = - "<br><form>". + "<br /><form><div>". "<input type=\"button\" value=\"". - $_showcache_messages['msg_Btn_back']."\" onClick=\"history.back()\">". + $_showcache_messages['msg_Btn_back']."\" onClick=\"history.back()\" />". " ";
case "lst": $msg .= "<input type=\"button\" value=\"". $_showcache_messages['msg_Btn_Thumbnail']."\"". " onClick=\"parent.location='./?plugin=showcache&cmd=img". - "&dir=".$dir."'\">"; + "&dir=".$dir."'\" />"; $msg .= " ". "<input type=\"button\" value=\"". $_showcache_messages['msg_Btn_SetName']."\"". " onClick=\"parent.location='?". rawurlencode("[[:config/plugin/showcache/URL]]"). - "'\">"; + "'\ /">"; $msg .= " ". "<input type=\"button\" value=\"". $_showcache_messages['msg_Btn_SetFolder']."\"". " onClick=\"parent.location='?". rawurlencode("[[:config/plugin/showcache/Folder]]"). - "'\">"; + "'\" />"; break; } - $msg .= "</form>"; + $msg .= "</div></form>"; return $msg; }
バッチ済みファイル,もしくは,unified diffをぜひご提供ください.