]> 4ch.mooo.com Git - test.git/blobdiff - yotsubanome.php
modified: config.php
[test.git] / yotsubanome.php
index 4b3fb4839ecb73fd74240ea2e148bc0b43807a75..4b0b3d11a509e625e481ecd08556f4c233a6fc4a 100755 (executable)
@@ -9,7 +9,7 @@ yotsubanome.php*/$ver = "v0.7.8.1.0001 β lot.100404";/*
 配布条件はレッツPHP!に準じます。改造、再配布は自由にどうぞ。
 このスクリプトに関する質問はレッツPHP!にしないようにお願いします。
 最新版は<http://4ch.irc.su/+4/script/>で配布しています。
-ご質問は準備板@四葉の芽<http://4ch.irc.su/+4/core/>までどうぞ。
+ご質問は準備板@四葉の芽<http://4ch.irc.su/+4/test/>までどうぞ。
 
 --【スパーキー(④ ^ヮ^)】◆FCr.DTJy2k◆◆/ODv/gdbGrBJVTTiLB/IBFugUUM=◆四葉の芽◇ちゃんねる ## 管理者 ##
 ********************************
@@ -56,15 +56,10 @@ error_reporting(E_ALL); // show all errors for debugging
 
 /* Enviorment Settings */
 // Do not change unless you renamed the directories
-define("PHP_DIRECTORY", '../core/'); // yotsubanome "C:\windows\system\"
-define("DATA_DIR", PHP_DIRECTORY.'data/'); // data directory
-define("CSS_DIR", DATA_DIR.'css/'); // CSS directory
-define("ICON_DIR", DATA_DIR.'icon/'); // icon directory [Graphics of the software go here]
-define("TEMP_DIR", PHP_DIRECTORY.'temp/'); // upload content temperary directory
-define("TPLT_DIR", DATA_DIR.'tplt/'); // template directory
-define("JS_DIR", DATA_DIR.'js/'); // javascript directory
-define("SALTFILE", DATA_DIR.'salt.php'); // saltfile for secure t. codes
+define("PHP_DIRECTORY", '../test/'); // yotsubanome "C:\windows\system\"
 
+/* Include */
+include_once(PHP_DIRECTORY.'env.php'); // Enviorment Settings
 include_once(PHP_DIRECTORY.'config.php'); // 引入設定檔
 include_once(PHP_DIRECTORY.'lib/lib_language.php'); // 引入語系
 include_once(PHP_DIRECTORY.'lib/lib_common.php'); // 引入共通函式檔案
@@ -305,7 +300,8 @@ function arrangeThread($PTE, $tree, $tree_cut, $posts, $hiddenReply, $resno=0, $
        if(gettype($tree_cut) == 'array') $tree_cut = array_flip($tree_cut); // array_flip + isset 搜尋法
        if(gettype($tree) == 'array') $tree_clone = array_flip($tree);
        if($hiddenReply){ // o++
-               // $o = 0 (首篇), $o = 1~n (回應) //++++----\r             for($o = 0; $o < $posts_img_count; $o++){ // o++
+               // $o = 0 (首篇), $o = 1~n (回應) //++++----
+               for($o = 0; $o < $posts_img_count; $o++){ // o++
                        extract($posts_img[$o]); // o++
                        if($ext && $FileIO->imageExists($tim.$ext)) $hiddenImage++; // o++ all images in thread
                }
@@ -332,7 +328,8 @@ function arrangeThread($PTE, $tree, $tree_cut, $posts, $hiddenReply, $resno=0, $
                // 設定欄位值
                $name = str_replace('&'.TRIP_KEY, '&amp;'.TRIP_KEY, $name); // 避免 &#xxxx; 後面被視為 Trip 留下 & 造成解析錯誤
                if(CLEAR_SAGE) $email = preg_replace('/^sage( *)/i', '', trim($email)); // 清除E-mail中的「sage」關鍵字
-               //Tripcode indicator // t++ //++++----
+               // Tripcode indicator // t++ //++++----
+               // This may be a blob of code but it apparently works >< please help me here
                $tripkeycount = substr_count($name, TRIP_KEY);
                if(ALLOW_NONAME==2){ // 強制砍名
                        if($tripkeycount==1) $name = preg_match('/(\\'.TRIP_KEY.'.{10})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
@@ -418,6 +415,7 @@ function arrangeThread($PTE, $tree, $tree_cut, $posts, $hiddenReply, $resno=0, $
                        if($flgh->exists('TS')) $WARN_ENDREPLY = '<span class="warn_txt">'._T('warn_locked').'</span><br />'."\n"; // 被標記為禁止回應
                        if($hiddenReply) $WARN_HIDEPOST = '<span class="omittedposts">'._res($hiddenReply, $hiddenImgs)._T('notice_omitted_reply').'</span><br />'."\n"; // 有隱藏的回應
                }
+
                // 對類別標籤作自動連結
                if(USE_CATEGORY){
                        $ary_category = explode(',', str_replace('&#44;', ',', $category)); $ary_category = array_map('trim', $ary_category);
@@ -561,7 +559,7 @@ function regist(){
                $size = @getimagesize($dest);
                if(!is_array($size)) error(_T('regist_upload_notimage'), $dest); // $size不為陣列就不是圖檔
                $imgsize = @filesize($dest); // 檔案大小
-               if(!KB) $imgsize .= ' B'; // B only
+               if(!KB) $imgsize .= ' B'; // Bytes only
                else $imgsize = ($imgsize>=1024) ? (int)($imgsize/1024).' KB' : $imgsize.' B'; // KB和B的判別
                switch($size[2]){ // 判斷上傳附加圖檔之格式
                        case 1 : $ext = ".gif"; break;
@@ -579,7 +577,7 @@ function regist(){
                        case 13 : $ext = ".swf"; break;
                        case 14 : $ext = ".aiff"; break;
                        case 15 : $ext = ".wbmp"; break;
-                       case 16 : $ext = ".xbm"; break;
+                       case 16 : $ext = ".xbm"; break; // I add more media support (^^,)
                        default : $ext = ".xxxx"; error(_T('regist_upload_notsupport'), $dest);
                }
                $allow_exts = explode('|', strtolower(ALLOW_UPLOAD_EXT)); // 接受之附加圖檔副檔名
@@ -588,7 +586,7 @@ function regist(){
                $md5chksum = md5_file($dest); // 檔案MD5
                if(array_search($md5chksum, $BAD_FILEMD5)!==FALSE) error(_T('regist_upload_blocked'), $dest); // 在封鎖設定內則阻擋
 
-               // 四‧計算附加圖檔圖檔縮圖顯示尺寸
+               // 四‧計算附加圖檔圖檔縮圖顯示尺寸 //++++---- <- the comment from pixmicat team is broken here 
                $W = $imgW = $size[0];
                $H = $imgH = $size[1];
                $MAXW = $resto ? MAX_RW : MAX_W;
@@ -611,6 +609,7 @@ function regist(){
 
        // E-mail / 標題修整
        $email = str_replace("\r\n", '', $email); $sub = str_replace("\r\n", '', $sub);
+
        // Tripcode area--------------------------------------------------------------------------------
        if($name){
                // 名稱修整