2011年6月3日 星期五

druapl menu system type


NameDescription
MENU_CALLBACKMenu type -- A hidden, internal callback, typically used for API calls.
MENU_DEFAULT_LOCAL_TASKMenu type -- The "default" local task, which is initially active.
MENU_LOCAL_ACTIONMenu type -- An action specific to the parent, usually rendered as a link.
MENU_LOCAL_TASKMenu type -- A task specific to the parent item, usually rendered as a tab.
MENU_NORMAL_ITEMMenu type -- A "normal" menu item that's shown in menu and breadcrumbs.
MENU_SUGGESTED_ITEMMenu type -- A normal menu item, hidden until enabled by an administrator.

MENU_NORMAL_ITEM: 一般有效頁面,會在導覽選單內建立一個連結。
(好像是預設)
MENU_SUGGESTED_ITEM: 一般有效頁面,預設為隱藏。
(沒用過)
MENU_CALLBACK: 不具有實體路徑的頁面,或是頁面的化名
(ex. node其實是node/view,node模組中,items['node']的類型就是 MENU_CALLBACK)
MENU_DEFAULT_LOCAL_TASK: 群組裡的預設頁面,若搭配CALLBACK使用,頁面路徑會被CALLBACK取代。
(ex. node模組中,items['node/view']的類型就是 MENU_DEFAULT_LOCAL_TASK)
MENU_LOCAL_TASK: 群組裡面其他的頁籤。
(ex. node模組中,items['node/edit']的類型就是 MENU_LOCAL_TASK)

我自己也看不懂我的解釋在寫啥…

參考資料:
http://drupaltaiwan.org/forum/20080901/2473
http://api.drupal.org/api/drupal/includes--menu.inc/group/menu_item_types/6

2011年5月18日 星期三

設定網頁預設IE模式

IE7: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
IE9: <meta http-equiv=”X-UA-Compatible” content=”IE=9” />

放置於head,可設定IE讀取網頁的預設引擎
註:若瀏覽器本身未安裝更高版本引擎,應該也是無效…

參考來源:http://blog.darkthread.net/post-2011-03-28-test-ie9-doc-modes.aspx

2011年2月18日 星期五

ereg正規表示email

ereg("^[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[@]{1}[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[.]{1}[A-Za-z]{2,5}$", $mail))