]> 4ch.mooo.com Git - test.git/blobdiff - yotsubanome.php
modified: config.php
[test.git] / yotsubanome.php
index ef3a8da1be072ce8ce7a6a165fabaa8427b2d725..8ccfcf68452e59237f7b2d32b15724e5b231fb17 100755 (executable)
@@ -342,7 +342,9 @@ function arrangeThread($PTE, $tree, $tree_cut, $posts, $hiddenReply, $resno=0, $
                // 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($config['ALLOW_NONAME']==3){
+                       if($email) $now = "<a href=\"mailto:$email\" class=\"linkmail\">$now</a>";
+               }elseif($config['ALLOW_NONAME']==2){ // 強制砍名
                        if($tripkeycount==1) $name = preg_match('/(\\'.TRIP_KEY.'.{10})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
                        if($tripkeycount==2) $name = preg_match('/(\\'.TRIP_KEY.TRIP_KEY.'.{16})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
                        if($tripkeycount==3) $name = preg_match('/(\\'.TRIP_KEY.'.{32})/', $name, $matches) ? '<span class="postertrip">'.$matches[1].'</span>' : '';
@@ -697,15 +699,15 @@ function regist(){
        $com = str_replace("\n", '', $com); // 若還有\n換行字元則取消換行
        // 預設的內容
        if(!$name || ereg("^[ | |]*$", $name)){
-               if(ALLOW_NONAME) $name = DEFAULT_NONAME;
+               if($config['ALLOW_NONAME']) $name = $config['DEFAULT_NONAME'];
                else error(_T('regist_withoutname'), $dest);
        }
        if(!$sub || ereg("^[ | |]*$", $sub)){
-               if(ALLOW_NOSUB) $sub = DEFAULT_NOTITLE;
+               if($config['ALLOW_NOSUB']) $sub = $config['DEFAULT_NOTITLE'];
                else error(_T('regist_withoutsubject'), $dest);
        }
        if(!$com || ereg("^[ | |\t]*$", $com)){
-               if(ALLOW_NOSUB) $com = DEFAULT_NOCOMMENT;
+               if($config['ALLOW_NOCOM']) $com = $config['DEFAULT_NOCOMMENT'];
                else error(_T('regist_withoutcomment'), $dest);
        }
        // 修整標籤樣式
@@ -716,7 +718,7 @@ function regist(){
        if($up_incomplete) $com .= '<br /><br /><span class="warn_txt">'._T('notice_incompletefile').'</span>'; // 上傳附加圖檔不完全的提示
 
        // 密碼和時間的樣式 
-       if($pwd=='') if(ALLOW_NOPASS) error(_T('regist_withoutpassword'), $dest); else $pwd = ($pwdc=='') ? substr(rand(),0,8) : $pwdc;
+       if($pwd=='') if($config['ALLOW_NOPASS']) error(_T('regist_withoutpassword'), $dest); else $pwd = ($pwdc=='') ? substr(rand(),0,8) : $pwdc;
        $pass = $pwd ? substr(md5($pwd), 2, 8) : '*'; // 生成真正儲存判斷用的密碼
        $youbi = array(_T('sun'),_T('mon'),_T('tue'),_T('wed'),_T('thu'),_T('fri'),_T('sat'));
 //---- $yd = $youbi[gmdate('w', $time+TIME_ZONE*60*60)];
@@ -1506,7 +1508,7 @@ function showstatus(){
 <tr><td>'._T('info_basic_bumphours').'</td><td colspan="3"> '.MAX_AGE_TIME.' '._T('info_basic_hours').' '._T('info_basic_0disable').'</td></tr>
 <tr><td>'._T('info_basic_urllinking').'</td><td colspan="3"> '.AUTO_LINK.' '._T('info_0no1yes').'</td></tr>
 <tr><td>'._T('info_basic_com_limit').'</td><td colspan="3"> '.COMM_MAX._T('info_basic_com_after').'</td></tr>
-<tr><td>'._T('info_basic_anonpost').'</td><td colspan="3"> '.ALLOW_NONAME.' '._T('info_basic_anonpost_opt').'</td></tr>
+<tr><td>'._T('info_basic_anonpost').'</td><td colspan="3"> '.$config['ALLOW_NONAME'].' '._T('info_basic_anonpost_opt').'</td></tr>
 <tr><td>'._T('info_basic_del_incomplete').'</td><td colspan="3"> '.KILL_INCOMPLETE_UPLOAD.' '._T('info_0no1yes').'</td></tr>
 <tr><td>'._T('info_basic_use_sample',THUMB_Q).'</td><td colspan="3"> '.USE_THUMB.' '._T('info_0notuse1use').'</td></tr>
 <tr><td>'._T('info_basic_useblock').'</td><td colspan="3"> '.BAN_CHECK.' '._T('info_0disable1enable').'</td></tr>