|
修改對應版本 : 別問我是誰 版本 新天下 FLASH 遊戲
本修改在 Discuz!5.0.0 / Discuz!5.5.0 / Discuz!6.0.0 / Discuz!7.0.0 上測試過
修改檔案 : /plugins/nkflash.php
新增檔案 : /images/nkflash/zoom_in.gif
/images/nkflash/zoom_out.gif
/images/nkflash/zoom_100.gif
/images/nkflash/reload.gif
/images/nkflash/zoom.js
(1)
修改前備份原有檔案 nkflash.php
(2)
/plugins/nkflash.php 找 :
ECHO "<p align=\"center\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"$gamelist[flash_width]\" height=\"$gamelist[flash_height]\" id=\"$gamelist[game_id]\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist[flash_url]\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist[flash_bgcolor]\">\n";
ECHO "<embed src=\"$gamelist[flash_url]\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist[flash_bgcolor]\" width=\"$gamelist[flash_width]\" height=\"$gamelist[flash_height]\" name=\"$gamelist[game_id]\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></p>\n";
替換為 :
ECHO "<p align=\"center\"><script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelist[flash_width]px';document.getElementById('zoom').style.height='$gamelist[flash_height]px'; return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><div id=\"zoom\" style=width:$gamelist[flash_width]px;height:$gamelist[flash_height]px;><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist[game_id]\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist[flash_url]\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist[flash_bgcolor]\">\n";
ECHO "<embed src=\"$gamelist[flash_url]\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist[flash_bgcolor]\" width=\"100%\" height=\"100%\" name=\"$gamelist[game_id]\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></p>\n";
nkflash.php 修改保存後上傳回 /plugins/ 資料夾
(3)
下載附件 : nkflash_zoom_hack.zip 解壓
新增檔案 : zoom_in.gif, zoom_out.gif, zoom_100.gif, reload.gif, zoom.js
上傳至 /images/nkflash/ 資料夾
--------------------------
若想按鈕及遊戲 可全部置中
找
ECHO "<p align=\"center\"><script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelist[flash_width]px';document.getElementById('zoom').style.height='$gamelist[flash_height]px'; return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><div id=\"zoom\" style=width:$gamelist[flash_width]px;height:$gamelist[flash_height]px;><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist[game_id]\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist[flash_url]\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist[flash_bgcolor]\">\n";
ECHO "<embed src=\"$gamelist[flash_url]\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist[flash_bgcolor]\" width=\"100%\" height=\"100%\" name=\"$gamelist[game_id]\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></p>\n";
改為以下
ECHO "<script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><table align=\"center\"><tr><td align=\"center\"><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"> <img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"> <img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelist[flash_width]px';document.getElementById('zoom').style.height='$gamelist[flash_height]px'; return false;\" style=\"cursor:pointer\"> <img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><br><br><div id=\"zoom\" style=\"width:$gamelist[flash_width]px;height:$gamelist[flash_height]px;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist[game_id]\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist[flash_url]\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist[flash_bgcolor]\">\n";
ECHO "<embed src=\"$gamelist[flash_url]\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist[flash_bgcolor]\" width=\"100%\" height=\"100%\" name=\"$gamelist[game_id]\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></td></tr></table>\n";
----------------
若想將按鈕 放在右上方 改為以下
ECHO "<script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><table align=\"center\"><tr><td align=\"center\"><div id=\"zoom\" style=\"width:$gamelist[flash_width]px;height:$gamelist[flash_height]px;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist[game_id]\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist[flash_url]\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist[flash_bgcolor]\">\n";
ECHO "<embed src=\"$gamelist[flash_url]\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist[flash_bgcolor]\" width=\"100%\" height=\"100%\" name=\"$gamelist[game_id]\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></td><td valign=\"top\" align=\"right\" width=\"22\"><img src=\"images/nkflash/1x1.gif\" height=\"5\"><br><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><br><br><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><br><br><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelist[flash_width]px';document.getElementById('zoom').style.height='$gamelist[flash_height]px'; return false;\" style=\"cursor:pointer\"><br><br><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"></td></tr></table>\n"; |
|