2012年4月23日 星期一

由區塊取得偏好設定

TAD老師:「在任何取不到特定模組資訊的地方(例如首頁或其他不在模組底下的頁面),只要實體化一個模組控制器,就能取得該模組資訊」
//--------   由區塊取得徧好設定  -----------------

global $xoopsDB, $xoopsUser;

// 得到指定模組 mid

$module_handler =& xoops_gethandler('module');

$xoopsModule =& $module_handler->getByDirname('tad_form');

$mid = $xoopsModule->getVar('mid');

// 取得該 mid 的模組參數

$config_handler = & xoops_gethandler('config');

$xoopsModuleConfig = & $config_handler->getConfigsByCat(0, $mid);

//----------------------------------------------------------------

$stop_level=$xoopsModuleConfig['cate_level'];

$csn=$options[2];

//----------------------------------------------------------------

2012年4月11日 星期三

XOOPS常用的靜態變數



// $Id:$
// _LANGCODE: zh_tw
// _CHARSET : UTF-8
define("_PLEASEWAIT","請稍候");
define("_FETCHING","載入頁面…");
define("_TAKINGBACK","返回原來頁面…");
define("_LOGOUT","登出");
define("_SUBJECT","標題");
define("_MESSAGEICON","文章圖示");
define("_COMMENTS","評論");
define("_POSTANON","匿名發表");
define("_DISABLESMILEY","關閉表情圖");
define("_DISABLEHTML","關閉HTML語法");
define("_PREVIEW","預覽");
define("_GO","確定");
define("_NESTED","巢狀顯示");
define("_NOCOMMENTS","尚無評論");
define("_FLAT","全部展開");
define("_THREADED","樹狀顯示");
define("_OLDESTFIRST","舊的在前");
define("_NEWESTFIRST","新的在前");
define("_MORE","更多…");
define("_MULTIPAGE","如果文章需要跨頁,請在段落間插入 [pagebreak] 代碼。");
define("_IFNOTRELOAD","如果頁面沒有自動跳轉,請 點擊此處 繼續");
// Error messages issued by XoopsObject::cleanVars()
define( "_XOBJ_ERR_REQUIRED", "%s 為必填項" );
define( "_XOBJ_ERR_SHORTERTHAN", "%s 必須少於 %d 字元。" );
//%%%%%% File Name themeuserpost.php %%%%%
define("_PROFILE","會員資料");
define("_POSTEDBY","作者");
define("_VISITWEBSITE","存取網站");
define("_SENDPMTO","傳送私人訊息給 %s");
define("_SENDEMAILTO","傳送電子郵件給 %s");
define("_ADD","新增");
define("_REPLY","回覆");
define("_DATE","日期");   // Posted date
//%%%%%% File Name admin_functions.php %%%%%
define("_MAIN","主選單");
define("_MANUAL","使用手冊");
define("_INFO","資訊");
define("_CPHOME","管理區首頁");
define("_YOURHOME","網站首頁");
//%%%%%% File Name misc.php (who's-online popup) %%%%%
define("_WHOSONLINE","線上資訊");
define('_GUESTS', '訪客');
define('_MEMBERS', '會員');
define("_ONLINEPHRASE","%s人線上");
define("_ONLINEPHRASEX","%s人在瀏覽%s");
define("_CLOSE","關閉");  // Close window
//%%%%%% File Name module.textsanitizer.php %%%%%
define("_QUOTEC","參照:");
//%%%%%% File Name admin.php %%%%%
define("_NOPERM","抱歉,您沒有權限造訪該區域。");
//%%%%% Common Phrases %%%%%
define("_NO","否");
define("_YES","是");
define("_EDIT","編輯");
define("_DELETE","刪除");
define("_SUBMIT","送出");
define("_MODULENOEXIST","所選模組不存在!");
define("_ALIGN","對齊方式");
define("_LEFT","靠左");
define("_CENTER","齊中");
define("_RIGHT","靠右");
define("_FORM_ENTER", "請輸入 %s");
define("_MUSTWABLE","檔案 %s 的屬性需設為可寫!");// %s represents file name
// Module info
define('_PREFERENCES', '系統基本設定');
define("_VERSION", "版本");
define("_DESCRIPTION", "說明");
define("_AUTHOR", "作者");
define("_CREDITS", "Credits");
define("_LICENCE", "許可通訊協定");
define("_ERRORS", "錯誤");
define("_NONE", "無");
define('_ON','於');
define('_READS','次閱讀');
define('_WELCOMETO','歡迎存取 %s');
define('_SEARCH','搜尋');
define('_ALL', '全部');
define('_TITLE', '標題');
define('_OPTIONS', '選項');
define('_QUOTE', '引用');
define('_LIST', '清單');
define('_LOGIN','會員登入');
define('_USERNAME','帳號:');
define('_PASSWORD','密碼:');
define("_SELECT","選擇");
define("_IMAGE","圖片");
define("_SEND","傳送");
define("_CANCEL","取消");
define("_ASCENDING","升冪排列");
define("_DESCENDING","降冪排列");
define('_BACK', '返回');
define('_NOTITLE', '無標題');
/**
* Image manager
*/
define("_MD_ADDIMGCAT","新增分類");
define("_MD_IMGCATNAME","分類名稱");
define("_MD_IMGCATRGRP","選擇可使用此圖片管理的群組");
define("_MD_IMGCATWGRP","選擇可上傳圖片的群組");
define("_MD_IMGCATWEIGHT","在圖片管理中顯示順序");
define("_MD_IMGCATDISPLAY","顯示");
define("_MD_IMGCATSTRTYPE","圖片會上傳至:");
define("_MD_STRTYOPENG","選定後日後將無法更動!");
define("_MD_ASFILE","存為檔案(置於 uploads 目錄下)《建議!》");
define("_MD_INDB","存到資料庫(存為 \"blob\" 資料)");
define ("_MD_IMGMAIN","分類");
define ("_MD_EDITIMGCAT", "圖片設定");
define('_IMGMANAGER','圖片管理');
define('_NUMIMAGES', '%s 張圖片');
define('_ADDIMAGE','新增圖片');
define('_IMAGENAME','名稱');
define('_IMGMAXSIZE','最大檔案(位元組):');
define('_IMGMAXWIDTH','最大寬度(像素):');
define('_IMGMAXHEIGHT','最大高度(像素):');
define('_IMAGECAT','類別:');
define('_IMAGEFILE','圖片');
define('_IMGWEIGHT','顯示順序:');
define('_IMGDISPLAY','顯示此圖片?');
define('_IMAGEMIME','MIME格式:');
define('_FAILFETCHIMG', '檔案 %s 無法上傳。');
define('_FAILSAVEIMG', '檔案 %s 無法儲存。');
define('_NOCACHE', '不使用快取');
define('_CLONE', '複製');
// %%%%%    For xoopsform files %%%%%
define("_STARTSWITH", "起始");
define("_ENDSWITH", "結束");
define("_MATCHES", "符合");
define("_CONTAINS", "包括");
define('_REQUIRED', '要求回覆');
//%%%%%% File Name commentform.php %%%%%
define("_REGISTER","註冊新帳號");
//%%%%%% File Name xoopscodes.php %%%%%
define("_SIZE","大小");  // font size
define("_FONT","字型");  // font family
define("_COLOR","色彩");  // font color
define("_EXAMPLE","範例");
define("_ENTERURL","輸入連結網址:");
define("_ENTERWEBTITLE","輸入網站名稱:");
define("_ENTERIMGURL","輸入圖片網址");
define("_ENTERIMGPOS","輸入圖片位置");
define("_IMGPOSRORL","'R'或'r'為右,'L'或'l'為左邊,或空白。");
define("_ERRORIMGPOS","錯誤!請輸入圖片位置。");
define("_ENTEREMAIL","輸入電子郵件地址");
define("_ENTERCODE","輸入代碼內容");
define("_ENTERQUOTE","輸入引用內容");
define("_ENTERTEXTBOX","輸入文字內容");
define("_ALLOWEDCHAR","最大字元長度:");
define("_CURRCHAR","目前字元長度:");
define("_PLZCOMPLETE","請填寫主題和內容。");
define("_MESSAGETOOLONG","內容太長");
//%%%%% TIME FORMAT SETTINGS   %%%%%
define('_SECOND', '1秒');
define('_SECONDS', '%s秒');
define('_MINUTE', '1分鐘');
define('_MINUTES', '%s分鐘');
define('_HOUR', '1小時');
define('_HOURS', '%s小時');
define('_DAY', '1天');
define('_DAYS', '%s天');
define('_WEEK', '1週');
define('_MONTH', '1月');
define("_DATESTRING","Y年m月d日 H:i:s");
define("_MEDIUMDATESTRING","m月d日 H:i");
define("_SHORTDATESTRING","m月d日");
/*
The following characters are recognized in the format string:
a - "am" or "pm"
A - "AM" or "PM"
d - day of the month, 2 digits with leading zeros; i.e. "01" to "31"
D - day of the week, textual, 3 letters; i.e. "Fri"
F - month, textual, long; i.e. "January"
h - hour, 12-hour format; i.e. "01" to "12"
H - hour, 24-hour format; i.e. "00" to "23"
g - hour, 12-hour format without leading zeros; i.e. "1" to "12"
G - hour, 24-hour format without leading zeros; i.e. "0" to "23"
i - minutes; i.e. "00" to "59"
j - day of the month without leading zeros; i.e. "1" to "31"
l (lowercase 'L') - day of the week, textual, long; i.e. "Friday"
L - boolean for whether it is a leap year; i.e. "0" or "1"
m - month; i.e. "01" to "12"
n - month without leading zeros; i.e. "1" to "12"
M - month, textual, 3 letters; i.e. "Jan"
s - seconds; i.e. "00" to "59"
S - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"
t - number of days in the given month; i.e. "28" to "31"
T - Timezone setting of this machine; i.e. "MDT"
U - seconds since the epoch
w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)
Y - year, 4 digits; i.e. "1999"
y - year, 2 digits; i.e. "99"
z - day of the year; i.e. "0" to "365"
Z - timezone offset in seconds (i.e. "-43200" to "43200")
*/
//%%%%% LANGUAGE SPECIFIC SETTINGS   %%%%%
//define('_CHARSET', 'UTF-8');
//define('_LANGCODE', 'zh-TW');
define('_CHARSET', empty($xlanguage["charset"])?'UTF-8':$xlanguage["charset"]);
define('_LANGCODE', empty($xlanguage["code"])?'zh-TW':$xlanguage["code"]);
$xlanguage['charset_base'] = "utf8";
// change 0 to 1 if this language is a multi-bytes language
define("XOOPS_USE_MULTIBYTES", "1");
/**
* Additions to 2.4.0
**/
//define('_RESET', 'Reset');
define('_RESET', '重設');
define('_RE', 'Re:');
?>