安裝軟體出現 Please wait while the installer finishes determining your disk space requirements

Author: Eric  //  Category: Free Teaching

一早起來安裝我最喜歡的 PDF-XChange Viewer,卻出現 Please wait while the installer finishes determining your disk space requirements。
// 另一個好用的 PDF Reader 軟體是 PDF Foxit Reader

Google 一下就有解決方法了,用的是 msiexec /Option <必要的參數> [選擇性參數] Read more...

WordPress Plugin:Math Comment Spam Protection

Author: Eric  //  Category: Free Teaching

一開始先到 作者網站 or WordPress Plugin 下載插件, 然後解壓縮上傳到 /wp-content/plugins 目錄,然後將下面的程式碼貼到 Theme 的 comments.php 的適當位置,像我是貼到 Website 的後面。

<p>
<?php  // Math Comment Spam Protection Plugin
if ( function_exists('math_comment_spam_protection') ) {
  $mcsp_info = math_comment_spam_protection();
?>
<b><input type="text" name="mcspvalue" id="mcspvalue" value="" size="22" tabindex="4" />
   <label for="mcspvalue"> Simple Math Problem : <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' = ?' ?></label></b>
   <input type="hidden" name="mcspinfo" value="<?php echo $mcsp_info['result']; ?>" />
<?php } // if function_exists... ?>
</p>

Read more...

比較 Thickbox, LightBux, Auto HighSlide, and WP-Slimbox2

Author: Eric  //  Category: Free Teaching

Thickbox, LightBox, Auto HighSlide, WP-Slimbox2 這四個都可以讓圖片有光箱的特效, 其中 Auto HighSlide, WP-Slimbox2WordPress Plugin

下面是 Thickbox, LightBox, Auto HighSlide, WP-Slimbox2 的用法和比較

01. Thickbox 不用再自己上傳, 因為 WordPress 就有內附了。但如果原圖太大, 點擊不會還原到最大, 而是有一固定大小, 而且用 IE8 測試好像有問題, 愛搞怪的 IE6 這次卻很乖。

a. WP 用的是沒壓縮 /wp-includes/js/jquery/jquery.js
b. WP 用的是壓縮過 /wp-includes/js/thickbox/thickbox.js
c. WP 用的是沒壓縮 /wp-includes/js/thickbox/thickbox.css

用法 : 在您要使用的主題 Theme 的 header.php 找到 之前, 添加下面的code

<!-- For ThickBox Usage -->
<script type="text/javascript" src="./wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="./wp-includes/js/thickbox/thickbox.js"></script>

<?php wp_enqueue_script('jquery'); ?>
<link rel="stylesheet" href="./wp-includes/js/thickbox/thickbox.css" type="text/css" media="screen"/>
<!-- For ThickBox Usage -->

如果您的 Thickbox 是上傳在其它地方, 不是用WP內建的, 就要用絕對路徑, 否則用上面的相對路徑即可。

<!-- For ThickBox Usage -->
<script type="text/javascript" src="http://who-know.com/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="http://who-know.com/wp-includes/js/thickbox/thickbox.js"></script>

<?php wp_enqueue_script('jquery'); ?>
<link rel="stylesheet" href="http://who-know.com/wp-includes/js/thickbox/thickbox.css" type="text/css" media="screen"/>
<!-- For ThickBox Usage -->

插入單張圖片:

<a class="thickbox" title="標題" href="原圖URL"><img src="縮圖URL" alt="" /></a>

插入連續圖片: // 有 Prev、Next 的效果

<a class="thickbox" title="標題1" rel="photo" href="原圖1URL"><img src="縮圖1URL" alt="" /></a>
<a class="thickbox" title="標題2" rel="photo" href="原圖2URL"><img src="縮圖2URL" alt="" /></a>
<a class="thickbox" title="標題3" rel="photo" href="原圖3URL"><img src="縮圖3URL" alt="" /></a>

Read more...

後台搜尋 WP Plugin出現HTTP Error During the API Request

Author: Eric  //  Category: Free Teaching

00. 家裡的速度有時不夠快 (其實是在亂下載),在後台搜尋插件時如果超過5秒沒反應,就會出現An Unexpected HTTP Error occurred during the API request。

01. 找到 /wp_include/ 下的 http.php

02. Ctrl+F 找到

'timeout' => apply_filters( 'http_request_timeout', 5),

03. 把數字改大一點 (eg:120),單位是秒。

'timeout' => apply_filters( 'http_request_timeout', 120),

04. 存檔,就完成了,接下來就可以快樂的在後台搜尋Plugin了。 // 直到下一次的大改版
// 如果是放在虛擬主機的,要下載下來改,改完再上傳覆蓋

Pages: Prev 1 2 3 4 5 6 7 8 9 Next