$i=0; //這是第一組,第二組請改為 $i++; $theme_config[$i]['name']="show_var"; $theme_config[$i]['text']= "顯示佈景變數資訊"; $theme_config[$i]['desc']="是否顯示所有 tad_themes 提供的控制變數及設定值"; $theme_config[$i]['type']="yesno"; $theme_config[$i]['default']="0"; ``` 2. name 是變數名稱,到時候在樣板中會變成樣板標籤變數 <{$name}> 3. text 是變數標題,會成現在畫面上當作該欄位標題 4. desc 是變數說明,會成現在畫面上當作該欄位說明 5. type 是欄位類型,有 text(文字框)、color(挑顏色)、textarea(大量文字)、yesno(是否單選)、file(上傳框)、array(陣列)等類型。 6. default 是該欄位預設值,若預設值中有中文,或是要套用語系(語系在 language 下),那麼,請寫成類似這樣: ``` $theme_config[$i]['default']=constant('語系常數'); $theme_config[$i]['default']=constant('TF_TOPMENU_DEFAULT'); ``` 7. 若欄位類型為 array ,其預設值格式為 json 格式,例如: ``` [{"name":"回首頁","url":"{XOOPS_URL}","target":"_self"}, {"name":"最新消息","url":"{XOOPS_URL}/modules/tadnews/","target":"_self"}, {"name":"電子相簿","url":"{XOOPS_URL}/modules/tadgallery/,"target":"_self""}, {"name":"檔案下載","url":"{XOOPS_URL}/modules/tad_uploader/","target":"_self"}, {"name":"聯絡我們","url":"{XOOPS_URL}/modules/ugm_contact_us/","target":"_self"}] ``` 8. 可以隨意在佈景中加入任何區塊,只要取得區塊編號: ``` <{block id=337}> ```
$theme_config[$i]['default']=constant('語系常數'); $theme_config[$i]['default']=constant('TF_TOPMENU_DEFAULT'); ``` 7. 若欄位類型為 array ,其預設值格式為 json 格式,例如: ``` [{"name":"回首頁","url":"{XOOPS_URL}","target":"_self"}, {"name":"最新消息","url":"{XOOPS_URL}/modules/tadnews/","target":"_self"}, {"name":"電子相簿","url":"{XOOPS_URL}/modules/tadgallery/,"target":"_self""}, {"name":"檔案下載","url":"{XOOPS_URL}/modules/tad_uploader/","target":"_self"}, {"name":"聯絡我們","url":"{XOOPS_URL}/modules/ugm_contact_us/","target":"_self"}] ``` 8. 可以隨意在佈景中加入任何區塊,只要取得區塊編號: ``` <{block id=337}> ```
[{"name":"回首頁","url":"{XOOPS_URL}","target":"_self"}, {"name":"最新消息","url":"{XOOPS_URL}/modules/tadnews/","target":"_self"}, {"name":"電子相簿","url":"{XOOPS_URL}/modules/tadgallery/,"target":"_self""}, {"name":"檔案下載","url":"{XOOPS_URL}/modules/tad_uploader/","target":"_self"}, {"name":"聯絡我們","url":"{XOOPS_URL}/modules/ugm_contact_us/","target":"_self"}] ``` 8. 可以隨意在佈景中加入任何區塊,只要取得區塊編號: ``` <{block id=337}> ```
<{block id=337}> ```
進階搜尋
48人線上 (21人在瀏覽線上書籍)
會員: 0
訪客: 48