六月 02
如果你在 MYSQL 強制設定
default-character-set = utf8
default-collation = utf8_general_ci
OSCommeric 還是不吃你這一套,存進去的資料仍然不會是UTF8

首先請先用 OSCommeric 備份你的資料庫,備份完後請先用文字檔確認內容沒有亂碼。(很重要,後面會用到)
接下來在下面2個檔案中修改程式
osc/includes/application_top.php
osc/admin/includes/application_top.php
找到
tep_db_connect() or die('Unable to connect to database server!');
修改成下面這個樣子(2個檔案都要修改)
tep_db_connect() or die('Unable to connect to database server!');
if (substr(mysql_get_server_info(), 0, 3) >= '4.1') {
tep_db_query("SET NAMES 'UTF8'");
}
改完後你會發現原來正常顯示的資料都變成亂碼,不用緊張
這時候再把我們之前備份的資料庫再還原回去(再次提醒還原前一定要確認備份的檔案內容是正常的,沒有亂碼的)
還原完成後,資料庫與網頁的顯示就都正常了。
四月 27
如果你是使用 KMD 的 OSCommeric 在 PHP5 上執行會有一些小問題
在後台按下 "客戶/訂單" 會出現下面的訊息
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
/var/www/osc/admin/customers.php on line 763
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in
/var/www/osc/admin/customers.php on line 765
Warning: reset() [function.reset]: Passed variable is not an array or object in
/var/www/osc/admin/includes/classes/object_info.php on line 17
Warning: Variable passed to each() is not an array or object in
/var/www/osc/admin/includes/classes/object_info.php on line 18
要解決此問題要修正2個檔案
在 admin/customers.php 中找到下面程式
line 7XX: $customer_info = array_merge($country, $info, $reviews);
line 7XX: $cInfo_array = array_merge($customers, $customer_info);
修改成
$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);
$cInfo_array = array_merge((array)$customers, (array)$customer_info);
---------------------------------------------------------------------------------------
在 admin/includes/classes/object_info.php 中找到下面程式
class objectInfo {
// class constructor
function objectInfo($object_array) {
reset($object_array);
while (list($key, $value) = each($object_array)) {
$this->$key = tep_db_prepare_input($value);
}
}
}
修改成
class objectInfo {
function objectInfo($object_array) {
$object_array = is_array($object_array) ? $object_array : array($object_array);
reset($object_array);
while(list($key, $value) = each($object_array)) {
$this->$key = tep_db_prepare_input($value);
}
}
}
這就子就解決了
四月 21
WordPress 預設是不支援放入 iframe 的
要可以插入 iframe 必需先裝一個外掛,外掛的名字是 Embed Iframe
你可以選擇用上傳壓縮檔或是直接用網頁的方式安裝
外掛安裝好,使用方式為在發表的內容中加入下面這行樣版
[iframe 網址 寬 高]
例如本站的即時匯率就是使用 iframe 來完成的
四月 15
使用 IE 7 進入 VirtueMart 1.1.3 的後台管理介面編修商品時
會發生"操作已終止"的情況,這是 IE 的問題,微軟的本身也說明了這個問題

.
為什麼我收到下列錯誤訊息當我造訪 Internet Explorer 中的網頁?
Internet Explorer 無法開啟網際網路網站 http://<Web site>.com. 作業已中止。
答案 : Internet Explorer 7 無法顯示特定的項目,以在該網站 Web 網頁上。
我如何做修正這個問題?
要修正這個問題,最簡單的方法是升級至 Internet Explorer 8。 這個問題不再發生在 Internet Explorer 8 中。 若要升級此項為 Internet Explorer 8,請造訪下列 Microsoft 網站 (英文): Windows Internet Explorer 8: 首頁
http://www.microsoft.com/windows/internet-explorer/beta/default.aspx
.
官方說只要裝 IE8 就能解決此問題。但如果不想裝 IE8 呢?
很簡單,只要下載這個檔案,解壓縮後蓋過下列檔案
Root/administrator/components/com_virtuemart/toolbar.html.php
Root/administrator/components/com_virtuemart/classes/htmlTools.class.php
Root/administrator/components/com_virtuemart/classes/menuBar.class.php
Root/administrator/components/com_virtuemart/classes/ps_config.php
Root/administrator/components/com_virtuemart/html/product.product_form.php
Root/components/com_virtuemart/js/wz_tooltip.js
Root/components/com_virtuemart/js/slimbox/css/slimbox.css
Root/components/com_virtuemart/js/slimbox/js/slimbox.js
最後記得把 IE 裡的快取檔案清空,重新進入。問題就解決了
參考資料:
Fix for Internet Explorer (IE7) Operation Aborted issue.
四月 14
如果你的 VirtueMart 是 1.1.3 的版本,那就可能會有這個問題
就是如果你的分類有2~3層,而每層又有數個分類
那麼你就會發現,該層的其中幾個不能調上下順序(見圖)

.
一開始使用 VirtueMart 討論區的 code 來修正,結果還是一樣
花了一點時間研究一下,改了一些 code 就 OK 了
首先,先下載這個檔案
然後放到 administrator/components/com_virtuemart/html 蓋過舊檔(請視需要先備份舊檔)
這樣子就OK了

.
參考資料:http://forum.virtuemart.net/index.php?topic=33720.0