p2/ for version 1.8.100
@@ -162,7 +162,7 @@ | ||
162 | 162 | <script type="text/javascript" src="js/basic.js?2012"></script> |
163 | 163 | <script type="text/javascript" src="iphone/js/respopup.iPhone.js?v=20090429"></script> |
164 | 164 | <script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script> |
165 | - <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script> | |
165 | + <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script> | |
166 | 166 | <script type="text/javascript" src="iphone/js/smartpopup.iPhone.js?v=20130612"></script> |
167 | 167 | <script type="text/javascript"> |
168 | 168 | <!-- |
@@ -201,8 +201,8 @@ | ||
201 | 201 | // --> |
202 | 202 | </script> |
203 | 203 | <?php // ここでは iui.css は読んでいないことに注意 ?> |
204 | -<link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114"> | |
205 | -<link rel="stylesheet" type="text/css" href="./iui/read.css?20140114"> | |
204 | +<link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423"> | |
205 | +<link rel="stylesheet" type="text/css" href="./iui/read.css?20140423"> | |
206 | 206 | <?php |
207 | 207 | |
208 | 208 | echo "<title>{$ptitle_ht}</title>"; |
@@ -574,7 +574,7 @@ | ||
574 | 574 | ?> |
575 | 575 | <div id="footToolbar" class="footbar"> |
576 | 576 | <span class="home"><a name="ntt_bt1" href="<?php eh($index_uri); ?>">TOP</a></span> |
577 | -<span class="other" id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
577 | +<span id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
578 | 578 | <?php |
579 | 579 | if (!isset($GLOBALS['rnum_all_range']) or $GLOBALS['rnum_all_range'] > 0 or !empty($GLOBALS['_is_eq_limit_to_and_to'])) { |
580 | 580 | if (!empty($GLOBALS['_is_eq_limit_to_and_to'])) { |
@@ -584,13 +584,13 @@ | ||
584 | 584 | } |
585 | 585 | ?><span class="next_disabled"></span><?php |
586 | 586 | echo <<<EOP |
587 | - <span class="new"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}{$_conf['k_at_a']}">{$str}</a></span> | |
587 | + <span id="newButton" ontouchstart="startTap(this)" ontouchmove="resetTap()" ontouchend="if(detectTap(this)){ this.style.backgroundPositionY = '-50px' }"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}{$_conf['k_at_a']}">{$str}</a></span> | |
588 | 588 | EOP; |
589 | 589 | } else { |
590 | 590 | echo <<<EOP |
591 | 591 | <span class="next"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}&norefresh=1{$_conf['k_at_a']}">新まとめの続き</a></span> |
592 | 592 | EOP; |
593 | - ?><span class="new_disabled"></span><?php | |
593 | + ?><span class="newButton_disabled"></span><?php | |
594 | 594 | |
595 | 595 | } |
596 | 596 | //{$sb_ht_btm}の |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // このファイルは、特に理由の無い限り変更しないで下さい。 |
4 | 4 | // include from conf.inc.php |
5 | 5 | |
6 | -$_conf['p2version'] = '1.8.99'; // rep2のバージョン | |
6 | +$_conf['p2version'] = '1.8.100'; // rep2のバージョン | |
7 | 7 | |
8 | 8 | $_conf['p2name'] = 'rep2'; // rep2の名前。 |
9 | 9 |
@@ -222,7 +222,7 @@ | ||
222 | 222 | if (!$aThreadList->spmode || $aThreadList->spmode == "news" and (strlen($GLOBALS['word_fm']) > 0)) { |
223 | 223 | |
224 | 224 | $aThread->setThreadPathInfo($aThread->host, $aThread->bbs, $aThread->key); |
225 | - | |
225 | + | |
226 | 226 | // マッチしなければスキップ |
227 | 227 | if (!_matchSbFilter($aThread)) { |
228 | 228 | unset($aThread); |
@@ -446,8 +446,7 @@ | ||
446 | 446 | } |
447 | 447 | } |
448 | 448 | |
449 | - // {{{ 新着ソートの便宜上 (未取得スレッドの)unum をセット調整 | |
450 | - | |
449 | + // 新着ソートの便宜上 (未取得スレッドの)unum をセット調整 | |
451 | 450 | if (!isset($aThread->unum)) { |
452 | 451 | if (in_array($aThreadList->spmode, array('recent', 'res_hist', 'taborn'))) { |
453 | 452 | $aThread->unum = -0.1; |
@@ -456,8 +455,6 @@ | ||
456 | 455 | } |
457 | 456 | } |
458 | 457 | |
459 | - // }}} | |
460 | - | |
461 | 458 | // 勢いのセット |
462 | 459 | $aThread->setDayRes(); |
463 | 460 |
@@ -488,7 +485,7 @@ | ||
488 | 485 | } |
489 | 486 | |
490 | 487 | // ソート |
491 | -_sortThreads($aThreadList); | |
488 | +$aThreadList->sortThreads(!empty($_REQUEST['rsort'])); | |
492 | 489 | |
493 | 490 | //=============================================================== |
494 | 491 | // HTMLプリント |
@@ -498,7 +495,7 @@ | ||
498 | 495 | |
499 | 496 | // {{{ 倉庫にtorder付与 |
500 | 497 | |
501 | - if ($aThreadList->spmode == "soko") { | |
498 | + if ($aThreadList->spmode == 'soko') { | |
502 | 499 | if ($aThreadList->threads) { |
503 | 500 | $soko_torder = 1; |
504 | 501 | $newthreads = array(); |
@@ -505,10 +502,8 @@ | ||
505 | 502 | foreach ($aThreadList->threads as $at) { |
506 | 503 | $at->torder = $soko_torder++; |
507 | 504 | $newthreads[] = $at; |
508 | - unset($at); | |
509 | 505 | } |
510 | - $aThreadList->threads =& $newthreads; | |
511 | - unset($newthreads); | |
506 | + $aThreadList->threads = $newthreads; | |
512 | 507 | } |
513 | 508 | } |
514 | 509 |
@@ -524,11 +519,11 @@ | ||
524 | 519 | $newthreads = array(); |
525 | 520 | for ($i = $disp_navi['from']; $i <= $disp_navi['end']; $i++) { |
526 | 521 | if ($aThreadList->threads[$i-1]) { |
527 | - $newthreads[] =& $aThreadList->threads[$i-1]; | |
522 | + $newthreads[] = $aThreadList->threads[$i-1]; | |
528 | 523 | } |
529 | 524 | } |
530 | - $aThreadList->threads =& $newthreads; | |
531 | - unset($newthreads); | |
525 | + $aThreadList->threads = $newthreads; | |
526 | + | |
532 | 527 | $aThreadList->num = sizeof($aThreadList->threads); |
533 | 528 | |
534 | 529 | // }}} |
@@ -604,74 +599,6 @@ | ||
604 | 599 | } |
605 | 600 | |
606 | 601 | /** |
607 | - * スレ一覧($aThreadList->threads)をソートする | |
608 | - * | |
609 | - * @return void | |
610 | - */ | |
611 | -function _sortThreads(&$aThreadList) | |
612 | -{ | |
613 | - global $_conf; | |
614 | - | |
615 | - $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort'); | |
616 | - | |
617 | - if ($aThreadList->threads) { | |
618 | - if (!empty($GLOBALS['wakati_words'])) { | |
619 | - $GLOBALS['now_sort'] = 'title'; | |
620 | - usort($aThreadList->threads, 'cmp_similarity'); | |
621 | - | |
622 | - } elseif ($GLOBALS['now_sort'] == 'midoku') { | |
623 | - if ($aThreadList->spmode == 'soko') { | |
624 | - usort($aThreadList->threads, 'cmp_key'); | |
625 | - } else { | |
626 | - usort($aThreadList->threads, 'cmp_midoku'); | |
627 | - } | |
628 | - | |
629 | - } elseif ($GLOBALS['now_sort'] == 'res') { | |
630 | - usort($aThreadList->threads, 'cmp_res'); | |
631 | - | |
632 | - } elseif ($GLOBALS['now_sort'] == 'title') { | |
633 | - usort($aThreadList->threads, 'cmp_title'); | |
634 | - | |
635 | - } elseif ($GLOBALS['now_sort'] == 'ita') { | |
636 | - usort($aThreadList->threads, 'cmp_ita'); | |
637 | - | |
638 | - } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') { | |
639 | - if ($_conf['cmp_dayres_midoku']) { | |
640 | - usort($aThreadList->threads, 'cmp_dayres_midoku'); | |
641 | - } else { | |
642 | - usort($aThreadList->threads, 'cmp_dayres'); | |
643 | - } | |
644 | - | |
645 | - } elseif ($GLOBALS['now_sort'] == 'bd') { | |
646 | - usort($aThreadList->threads, 'cmp_key'); | |
647 | - | |
648 | - } elseif ($GLOBALS['now_sort'] == 'fav') { | |
649 | - usort($aThreadList->threads, 'cmp_fav'); | |
650 | - | |
651 | - } if ($GLOBALS['now_sort'] == 'no') { | |
652 | - if ($aThreadList->spmode == 'soko') { | |
653 | - usort($aThreadList->threads, 'cmp_key'); | |
654 | - } else { | |
655 | - usort($aThreadList->threads, 'cmp_no'); | |
656 | - } | |
657 | - } | |
658 | - } | |
659 | - | |
660 | - // ニュースチェック | |
661 | - if ($aThreadList->spmode == 'news') { | |
662 | - for ($i = 0; $i < $threads_num ; $i++) { | |
663 | - if ($aThreadList->threads) { | |
664 | - $newthreads[] = array_shift($aThreadList->threads); | |
665 | - } | |
666 | - } | |
667 | - $aThreadList->threads = $newthreads; | |
668 | - $aThreadList->num = sizeof($aThreadList->threads); | |
669 | - } | |
670 | - | |
671 | - $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort'); | |
672 | -} | |
673 | - | |
674 | -/** | |
675 | 602 | * p2_setting 記録する |
676 | 603 | * |
677 | 604 | * @return boolean |
@@ -982,154 +909,6 @@ | ||
982 | 909 | return false; |
983 | 910 | } |
984 | 911 | |
985 | -//============================================================ | |
986 | -// ソート関数 | |
987 | -//============================================================ | |
988 | - | |
989 | -/** | |
990 | - * 新着ソート | |
991 | - * | |
992 | - * @return integer | |
993 | - */ | |
994 | -function cmp_midoku($a, $b) | |
995 | -{ | |
996 | - if ($a->new == $b->new) { | |
997 | - if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) { | |
998 | - return ($a->torder > $b->torder) ? 1 : -1; | |
999 | - } else { | |
1000 | - return ($a->unum < $b->unum) ? 1 : -1; | |
1001 | - } | |
1002 | - } else { | |
1003 | - return ($a->new < $b->new) ? 1 : -1; | |
1004 | - } | |
1005 | -} | |
1006 | - | |
1007 | -/** | |
1008 | - * レス数 ソート | |
1009 | - * | |
1010 | - * @return integer | |
1011 | - */ | |
1012 | -function cmp_res($a, $b) | |
1013 | -{ | |
1014 | - if ($a->rescount == $b->rescount) { | |
1015 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1016 | - } else { | |
1017 | - return ($a->rescount < $b->rescount) ? 1 : -1; | |
1018 | - } | |
1019 | -} | |
1020 | - | |
1021 | -/** | |
1022 | - * タイトル ソート | |
1023 | - * | |
1024 | - * @return integer | |
1025 | - */ | |
1026 | -function cmp_title($a, $b) | |
1027 | -{ | |
1028 | - if ($a->ttitle == $b->ttitle) { | |
1029 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1030 | - } else { | |
1031 | - return strcmp($a->ttitle, $b->ttitle); | |
1032 | - } | |
1033 | -} | |
1034 | - | |
1035 | -/** | |
1036 | - * 板 ソート | |
1037 | - * | |
1038 | - * @return integer | |
1039 | - */ | |
1040 | -function cmp_ita($a, $b) | |
1041 | -{ | |
1042 | - if ($a->host != $b->host) { | |
1043 | - return strcmp($a->host, $b->host); | |
1044 | - } else { | |
1045 | - if ($a->itaj != $b->itaj) { | |
1046 | - return strcmp($a->itaj, $b->itaj); | |
1047 | - } else { | |
1048 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1049 | - } | |
1050 | - } | |
1051 | -} | |
1052 | - | |
1053 | -/** | |
1054 | - * お気に ソート | |
1055 | - * | |
1056 | - * @return integer | |
1057 | - */ | |
1058 | -function cmp_fav($a, $b) | |
1059 | -{ | |
1060 | - if ($a->fav == $b->fav) { | |
1061 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1062 | - } else { | |
1063 | - return strcmp($b->fav, $a->fav); | |
1064 | - } | |
1065 | -} | |
1066 | - | |
1067 | -/** | |
1068 | - * 勢いソート(新着レス優先) | |
1069 | - * | |
1070 | - * @return integer | |
1071 | - */ | |
1072 | -function cmp_dayres_midoku($a, $b) | |
1073 | -{ | |
1074 | - if ($a->new == $b->new) { | |
1075 | - if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) { | |
1076 | - return ($a->dayres < $b->dayres) ? 1 : -1; | |
1077 | - } else { | |
1078 | - return ($a->unum < $b->unum) ? 1 : -1; | |
1079 | - } | |
1080 | - } else { | |
1081 | - return ($a->new < $b->new) ? 1 : -1; | |
1082 | - } | |
1083 | -} | |
1084 | - | |
1085 | -/** | |
1086 | - * 勢いソート | |
1087 | - * | |
1088 | - * @return integer | |
1089 | - */ | |
1090 | -function cmp_dayres($a, $b) | |
1091 | -{ | |
1092 | - if ($a->new == $b->new) { | |
1093 | - return ($a->dayres < $b->dayres) ? 1 : -1; | |
1094 | - } else { | |
1095 | - return ($a->new < $b->new) ? 1 : -1; | |
1096 | - } | |
1097 | -} | |
1098 | - | |
1099 | -/** | |
1100 | - * key ソート | |
1101 | - * | |
1102 | - * @return integer | |
1103 | - */ | |
1104 | -function cmp_key($a, $b) | |
1105 | -{ | |
1106 | - return ($a->key < $b->key) ? 1 : -1; | |
1107 | -} | |
1108 | - | |
1109 | -/** | |
1110 | - * No. ソート | |
1111 | - * | |
1112 | - * @return integer | |
1113 | - */ | |
1114 | -function cmp_no($a, $b) | |
1115 | -{ | |
1116 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1117 | -} | |
1118 | - | |
1119 | -/** | |
1120 | - * 類似性ソート | |
1121 | - * | |
1122 | - * @return integer | |
1123 | - */ | |
1124 | -function cmp_similarity($a, $b) | |
1125 | -{ | |
1126 | - if ($a->similarity == $b->similarity) { | |
1127 | - return ($a->key < $b->key) ? 1 : -1; | |
1128 | - } else { | |
1129 | - return ($a->similarity < $b->similarity) ? 1 : -1; | |
1130 | - } | |
1131 | -} | |
1132 | - | |
1133 | 912 | /* |
1134 | 913 | * Local Variables: |
1135 | 914 | * mode: php |
@@ -1,8 +1,9 @@ | ||
1 | 1 | <?php |
2 | 2 | /* |
3 | - //p2 - スレッドサブジェクト表示スクリプト | |
4 | - //フレーム分割画面、右上部分 | |
3 | + (// p2 - スレッドサブジェクト表示スクリプト) | |
4 | + (// フレーム分割画面、右上部分) | |
5 | 5 | |
6 | + このスクリプトは変則的。includeで呼び出して利用している。一度の実行で複数回呼び出される。 | |
6 | 7 | 無理矢理だが、板メニューで新着数を知るために使用している // $shinchaku_num, $_newthre_num をセット |
7 | 8 | (変数のスコープは閉じたいところ) |
8 | 9 |
@@ -1,3 +1,14 @@ | ||
1 | +2014/04/26 | |
2 | + * rep2 version 1.8.100 | |
3 | + | |
4 | + [修正] PC表示で、スレ一覧の「新」マークが色付け表示されていなかったのを修正した。 | |
5 | + [新機能] スレ一覧を逆順ソート表示できるようにした。 | |
6 | + [更新] 2ch.scの「.net」付きのIDの抽出に対応した。 | |
7 | + [更新] 携帯、スマホから2ch内リンクを開く時は、プレビュー表示で開くようにした。 | |
8 | + [更新] 携帯、スマホ用表示でレスの名前を<b></b>で囲って表示するようにした。 | |
9 | + [更新] スマホ向け表示デザインを微調整した。 | |
10 | + [更新] 書き込み後の結果判別処理を更新した。 | |
11 | + | |
1 | 12 | 2014/04/12 |
2 | 13 | * rep2 version 1.8.99 |
3 | 14 |
@@ -253,7 +253,7 @@ | ||
253 | 253 | // NGID変換 |
254 | 254 | } elseif ($isNgId) { |
255 | 255 | $date_id = preg_replace( |
256 | - '|ID: ?([0-9A-Za-z/.+]{8,11}).*|', | |
256 | + '|ID: ?([0-9A-Za-z/.+]{8,15}).*|', | |
257 | 257 | "<s class=\"ngword\" onClick=\"showHide('ngn{$_ngaborns_head_hits}', 'ngword_cont');\"{$atTitle}>NG:\\0</s>", |
258 | 258 | $date_id |
259 | 259 | ); |
@@ -325,11 +325,11 @@ | ||
325 | 325 | |
326 | 326 | // IDフィルタ |
327 | 327 | if ($_conf['flex_idpopup'] == 1) { |
328 | - if (preg_match('|ID: ?([0-9A-Za-z/.+]{8,11})|', $date_id, $matches)) { | |
328 | + if (preg_match('|ID: ?([0-9A-Za-z/.+]{8,15})|', $date_id, $matches)) { | |
329 | 329 | $idkey = $matches[1]; |
330 | 330 | if ($this->thread->idcount[$idkey] > 1) { |
331 | 331 | $date_id = preg_replace_callback( |
332 | - '|ID: ?([0-9A-Za-z/.+]{8,11})|', | |
332 | + '|ID: ?([0-9A-Za-z/.+]{8,15})|', | |
333 | 333 | array($this, 'idfilter_callback'), $date_id |
334 | 334 | ); |
335 | 335 | } |
@@ -492,7 +492,7 @@ | ||
492 | 492 | // NGID変換 |
493 | 493 | } elseif ($isNgId) { |
494 | 494 | $date_id = preg_replace( |
495 | - '|ID: ?([0-9A-Za-z/.+]{8,11}).*|', | |
495 | + '|ID: ?([0-9A-Za-z/.+]{8,15}).*|', | |
496 | 496 | "<s class=\"ngword\" onClick=\"showHide('ngn{$_ngaborns_head_hits}', 'ngword_cont');\"{$atTitle}>NG:\\0</s>", |
497 | 497 | $date_id |
498 | 498 | ); |
@@ -518,11 +518,11 @@ | ||
518 | 518 | |
519 | 519 | // IDフィルタ |
520 | 520 | if ($_conf['flex_idpopup'] == 1) { |
521 | - if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) { | |
521 | + if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) { | |
522 | 522 | $idkey = $matches[1]; |
523 | 523 | if ($this->thread->idcount[$idkey] > 1) { |
524 | 524 | $date_id = preg_replace_callback( |
525 | - '|ID: ?([0-9A-Za-z/.+]{8,11})|', | |
525 | + '|ID: ?([0-9A-Za-z/.+]{8,15})|', | |
526 | 526 | array($this, 'idfilter_callback'), $date_id |
527 | 527 | ); |
528 | 528 | } |
@@ -1203,13 +1203,16 @@ | ||
1203 | 1203 | if (preg_match('{^http://(orz\.2ch\.io/p/-/)?(\\w+\\.(?:2ch\\.net|bbspink\\.com))/(test/read\\.cgi/)?([^/]+)/([1-9]\\d+)(?:/([^/]+)?)?$}', $url, $m)) { |
1204 | 1204 | |
1205 | 1205 | if ($m[1] != '' xor $m[3] != '') { |
1206 | - | |
1207 | 1206 | $ls = (!isset($m[6]) || $m[6] == 'i') ? '' : $m[6]; |
1208 | 1207 | $host = $m[2]; |
1209 | 1208 | $bbs = $m[4]; |
1210 | 1209 | $key = $m[5]; |
1211 | - $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}&ls={$ls}"; | |
1212 | - | |
1210 | + $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}"; | |
1211 | + if ($ls) { | |
1212 | + $read_url .= "&ls=$ls"; | |
1213 | + } else { | |
1214 | + //$read_url .= '&onlyone=1'; | |
1215 | + } | |
1213 | 1216 | if ($_conf['iframe_popup']) { |
1214 | 1217 | if (preg_match('/^[0-9\\-n]+$/', $ls)) { |
1215 | 1218 | $pop_url = $url; |
@@ -170,6 +170,7 @@ | ||
170 | 170 | $error_msg = $response->getMessage(); |
171 | 171 | } else { |
172 | 172 | $code = $req->getResponseCode(); |
173 | + // 302 Found (Redirection 転送) | |
173 | 174 | if ($code == 302) { |
174 | 175 | // ホストの移転を追跡 |
175 | 176 | require_once P2_LIB_DIR . '/BbsMap.php'; |
@@ -13,24 +13,7 @@ | ||
13 | 13 | |
14 | 14 | $mae_ht = _getMaeATag($aThreadList, $disp_navi, $word_qs); |
15 | 15 | |
16 | -$tugi_ht = ''; | |
17 | -if ($disp_navi['tugi_from'] <= $sb_disp_all_num) { | |
18 | - $qs = array( | |
19 | - 'host' => $aThreadList->host, | |
20 | - 'bbs' => $aThreadList->bbs, | |
21 | - 'spmode' => $aThreadList->spmode, | |
22 | - 'norefresh' => '1', | |
23 | - 'from' => $disp_navi['tugi_from'], | |
24 | - 'sb_view' => geti($_REQUEST['sb_view']), | |
25 | - UA::getQueryKey() => UA::getQueryValue() | |
26 | - ); | |
27 | - $qs = array_merge($word_qs, $qs); | |
28 | - $tugi_ht = P2View::tagA( | |
29 | - UriUtil::buildQueryUri($_conf['subject_php'], $qs), | |
30 | - hs("{$_conf['k_accesskey']['next']}.次"), | |
31 | - array($_conf['accesskey_for_k'] => $_conf['k_accesskey']['next']) | |
32 | - ); | |
33 | -} | |
16 | +$tugi_ht = _getTugiATag($aThreadList, $disp_navi, $word_qs); | |
34 | 17 | |
35 | 18 | if ($disp_navi['from'] == $disp_navi['end']) { |
36 | 19 | $sb_range_on = $disp_navi['from']; |
@@ -99,6 +82,7 @@ | ||
99 | 82 | $htm['change_sort'] .= "<option value=\"{$k}\"{$selected}>{$v}</option>"; |
100 | 83 | } |
101 | 84 | $htm['change_sort'] .= '</select>'; |
85 | +$htm['change_sort'] .= sprintf(' <label><input type="checkbox" name="rsort" value="1"%s>逆順</label> ', empty($_REQUEST['rsort']) ? '' : ' checked'); | |
102 | 86 | $htm['change_sort'] .= '<input type="submit" value="変更"></form>'; |
103 | 87 | |
104 | 88 | // }}} |
@@ -284,6 +268,7 @@ | ||
284 | 268 | 'norefresh' => '1', |
285 | 269 | 'from' => $disp_navi['mae_from'], |
286 | 270 | 'sb_view' => geti($_REQUEST['sb_view']), |
271 | + 'rsort' => geti($_REQUEST['rsort']), | |
287 | 272 | UA::getQueryKey() => UA::getQueryValue() |
288 | 273 | ); |
289 | 274 | $qs = array_merge($word_qs, $qs); |
@@ -297,6 +282,39 @@ | ||
297 | 282 | } |
298 | 283 | |
299 | 284 | /** |
285 | + * ナビ 次 | |
286 | + * | |
287 | + * @return string HTML | |
288 | + */ | |
289 | +function _getTugiATag($aThreadList, $disp_navi, $word_qs) | |
290 | +{ | |
291 | + global $_conf; | |
292 | + | |
293 | + $tugi_atag = ''; | |
294 | + | |
295 | + if ($disp_navi['tugi_from'] <= $sb_disp_all_num) { | |
296 | + $qs = array( | |
297 | + 'host' => $aThreadList->host, | |
298 | + 'bbs' => $aThreadList->bbs, | |
299 | + 'spmode' => $aThreadList->spmode, | |
300 | + 'norefresh' => '1', | |
301 | + 'from' => $disp_navi['tugi_from'], | |
302 | + 'sb_view' => geti($_REQUEST['sb_view']), | |
303 | + 'rsort' => geti($_REQUEST['rsort']), | |
304 | + UA::getQueryKey() => UA::getQueryValue() | |
305 | + ); | |
306 | + $qs = array_merge($word_qs, $qs); | |
307 | + $tugi_ht = P2View::tagA( | |
308 | + UriUtil::buildQueryUri($_conf['subject_php'], $qs), | |
309 | + hs("{$_conf['k_accesskey']['next']}.次"), | |
310 | + array($_conf['accesskey_for_k'] => $_conf['k_accesskey']['next']) | |
311 | + ); | |
312 | + } | |
313 | + | |
314 | + return $tugi_atag; | |
315 | +} | |
316 | + | |
317 | +/** | |
300 | 318 | * @return string <a> |
301 | 319 | */ |
302 | 320 | function _getDatSokoATag($aThreadList) |
@@ -181,7 +181,7 @@ | ||
181 | 181 | . '(ftp|h?ttps?|tps?)://([0-9A-Za-z][\\w!#%&+*,\\-./:;=?@\\[\\]^~]+)' // URL |
182 | 182 | . ')' |
183 | 183 | . '|' |
184 | - . '(?P<id>ID: ?([0-9A-Za-z/.+]{8,11})(?=[^0-9A-Za-z/.+]|$))' // ID(8,10桁 +PC/携帯識別フラグ) | |
184 | + . '(?P<id>ID: ?([0-9A-Za-z/.+]{8,15})(?=[^0-9A-Za-z/.+]|$))' // ID(8,10桁 +PC/携帯識別フラグ) | |
185 | 185 | . ')' |
186 | 186 | . '}'; |
187 | 187 | } |
@@ -222,7 +222,7 @@ | ||
222 | 222 | function parseDateId($date_id) |
223 | 223 | { |
224 | 224 | $id = null; |
225 | - if (preg_match('| (ID: ?[0-9a-zA-Z/.+]{8,11}.*)|', $date_id, $m)) { | |
225 | + if (preg_match('| (ID: ?[0-9a-zA-Z/.+]{8,15}.*)|', $date_id, $m)) { | |
226 | 226 | $id = $m[1]; |
227 | 227 | } |
228 | 228 | return $id; |
@@ -450,7 +450,7 @@ | ||
450 | 450 | } |
451 | 451 | foreach ($lines as $k => $line) { |
452 | 452 | $lar = explode('<>', $line); |
453 | - if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,10})|', $lar[2], $matches)) { | |
453 | + if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $lar[2], $matches)) { | |
454 | 454 | $id = $matches[1]; |
455 | 455 | if (isset($this->thread->idcount[$id])) { |
456 | 456 | $this->thread->idcount[$id]++; |
@@ -283,47 +283,46 @@ | ||
283 | 283 | |
284 | 284 | $csrfid = P2Util::getCsrfId(); |
285 | 285 | $hr = P2View::getHrHtmlK(); |
286 | + | |
287 | + $favitas = BrdCtl::readFavItas(); | |
286 | 288 | |
287 | - $show_flag = false; | |
288 | - | |
289 | - if (file_exists($_conf['favita_path']) and $lines = file($_conf['favita_path'])) { | |
289 | + if ($favitas) { | |
290 | 290 | echo 'お気に板 [<a href="editfavita.php?b=k">編集</a>]' . $hr; |
291 | 291 | $i = 0; |
292 | - foreach ($lines as $l) { | |
292 | + foreach ($favitas as $favita) { | |
293 | 293 | $i++; |
294 | - $l = rtrim($l); | |
295 | - if (preg_match("/^\t?(.+)\t(.+)\t(.+)$/", $l, $matches)) { | |
296 | - $itaj = rtrim($matches[3]); | |
297 | - $attr = array(); | |
298 | - $key_num_st = ''; | |
294 | + | |
295 | + extract($favita); // $host, $bbs, $itaj | |
296 | + | |
297 | + $attr = array(); | |
298 | + $key_num_st = ''; | |
299 | 299 | |
300 | - if ($i <= 9) { | |
301 | - $attr[$_conf['accesskey_for_k']] = $i; | |
302 | - $key_num_st = "$i."; | |
303 | - } | |
304 | - | |
305 | - $atag = P2View::tagA( | |
306 | - UriUtil::buildQueryUri($_conf['subject_php'], | |
307 | - array( | |
308 | - 'host' => $matches[1], | |
309 | - 'bbs' => $matches[2], | |
310 | - 'itaj_en' => base64_encode($itaj), | |
311 | - UA::getQueryKey() => UA::getQueryValue() | |
312 | - ) | |
313 | - ), | |
314 | - UA::isIPhoneGroup() ? hs($itaj) : hs("$key_num_st$itaj"), | |
315 | - $attr | |
316 | - ); | |
300 | + if ($i <= 9) { | |
301 | + $attr[$_conf['accesskey_for_k']] = $i; | |
302 | + $key_num_st = "$i."; | |
303 | + } | |
304 | + | |
305 | + $atag = P2View::tagA( | |
306 | + UriUtil::buildQueryUri($_conf['subject_php'], | |
307 | + array( | |
308 | + 'host' => $host, | |
309 | + 'bbs' => $bbs, | |
310 | + 'itaj_en' => base64_encode($itaj), | |
311 | + UA::getQueryKey() => UA::getQueryValue() | |
312 | + ) | |
313 | + ), | |
314 | + UA::isIPhoneGroup() ? hs($itaj) : hs("$key_num_st$itaj"), | |
315 | + $attr | |
316 | + ); | |
317 | 317 | |
318 | - if (UA::isIPhoneGroup()) { | |
319 | - echo '<li>' . $atag . '</li>'; | |
320 | - } else { | |
321 | - echo $atag . '<br>'; | |
322 | - } | |
318 | + if (UA::isIPhoneGroup()) { | |
319 | + echo '<li>' . $atag . '</li>'; | |
320 | + } else { | |
321 | + echo $atag . '<br>'; | |
322 | + } | |
323 | 323 | |
324 | - // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$matches[1]}&bbs={$matches[2]}&setfavita=0&csrfid={$csrfid}&view=favita{$_conf['k_at_a']}">削</a>] | |
325 | - $show_flag = true; | |
326 | - } | |
324 | + // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$host}&bbs={$bbs}&setfavita=0&csrfid={$csrfid}&view=favita{$_conf['k_at_a']}">削</a>] | |
325 | + | |
327 | 326 | } |
328 | 327 | if (UA::isIPhoneGroup()) { |
329 | 328 | ?></ul><?php |
@@ -330,7 +329,7 @@ | ||
330 | 329 | } |
331 | 330 | } |
332 | 331 | |
333 | - if (!$show_flag) { | |
332 | + if (!$favitas) { | |
334 | 333 | ?><p>お気に板はまだないようだ</p><?php |
335 | 334 | } |
336 | 335 | } |
@@ -82,20 +82,7 @@ | ||
82 | 82 | global $_conf, $matome_i, $STYLE; |
83 | 83 | |
84 | 84 | // favita読み込み |
85 | - $favitas = array(); | |
86 | - if (file_exists($_conf['favita_path'])) { | |
87 | - if ($lines = file($_conf['favita_path'])) { | |
88 | - foreach ($lines as $l) { | |
89 | - if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", trim($l), $matches)) { | |
90 | - $favitas[] = array( | |
91 | - 'host' => $matches[1], | |
92 | - 'bbs' => $matches[2], | |
93 | - 'itaj' => $matches[3], | |
94 | - ); | |
95 | - } | |
96 | - } | |
97 | - } | |
98 | - } | |
85 | + $favitas = BrdCtl::readFavItas(); | |
99 | 86 | |
100 | 87 | // 空っぽなら |
101 | 88 | if (!$favitas) { |
@@ -303,7 +303,7 @@ | ||
303 | 303 | if ($code == '200' || $code == '206') { |
304 | 304 | // OK。何もしない |
305 | 305 | |
306 | - // 302 Found (Redirection) | |
306 | + // 302 Found (Redirection 転送) | |
307 | 307 | } elseif ($code == '302') { |
308 | 308 | |
309 | 309 | // 板移転を自動追跡 |
@@ -268,4 +268,216 @@ | ||
268 | 268 | return $this->num; |
269 | 269 | } |
270 | 270 | |
271 | + /** | |
272 | + * スレ一覧(ThreadList->threads)をソートする | |
273 | + * | |
274 | + * @access public | |
275 | + * @return void | |
276 | + */ | |
277 | + function sortThreads($reverse = false) | |
278 | + { | |
279 | + global $_conf; // now_sort, wakati_words | |
280 | + | |
281 | + if (!$this->threads) { | |
282 | + return; | |
283 | + } | |
284 | + | |
285 | + $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort'); | |
286 | + | |
287 | + if (!empty($GLOBALS['wakati_words'])) { | |
288 | + $GLOBALS['now_sort'] = 'title'; | |
289 | + usort($this->threads, 'cmp_similarity'); | |
290 | + | |
291 | + } elseif ($GLOBALS['now_sort'] == 'midoku') { | |
292 | + if ($this->spmode == 'soko') { | |
293 | + usort($this->threads, 'cmp_key'); | |
294 | + } else { | |
295 | + usort($this->threads, 'cmp_midoku'); | |
296 | + } | |
297 | + | |
298 | + } elseif ($GLOBALS['now_sort'] == 'res') { | |
299 | + usort($this->threads, 'cmp_res'); | |
300 | + | |
301 | + } elseif ($GLOBALS['now_sort'] == 'title') { | |
302 | + usort($this->threads, 'cmp_title'); | |
303 | + | |
304 | + } elseif ($GLOBALS['now_sort'] == 'ita') { | |
305 | + usort($this->threads, 'cmp_ita'); | |
306 | + | |
307 | + } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') { | |
308 | + if ($_conf['cmp_dayres_midoku']) { | |
309 | + usort($this->threads, 'cmp_dayres_midoku'); | |
310 | + } else { | |
311 | + usort($this->threads, 'cmp_dayres'); | |
312 | + } | |
313 | + | |
314 | + } elseif ($GLOBALS['now_sort'] == 'bd') { | |
315 | + usort($this->threads, 'cmp_key'); | |
316 | + | |
317 | + } elseif ($GLOBALS['now_sort'] == 'fav') { | |
318 | + usort($this->threads, 'cmp_fav'); | |
319 | + | |
320 | + } if ($GLOBALS['now_sort'] == 'no') { | |
321 | + if ($this->spmode == 'soko') { | |
322 | + usort($this->threads, 'cmp_key'); | |
323 | + } else { | |
324 | + usort($this->threads, 'cmp_no'); | |
325 | + } | |
326 | + } | |
327 | + | |
328 | + if ($reverse) { | |
329 | + $this->threads = array_reverse($this->threads); | |
330 | + } | |
331 | + | |
332 | + $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort'); | |
333 | + } | |
271 | 334 | } |
335 | + | |
336 | + | |
337 | +//============================================================ | |
338 | +// ソート関数 (ThreadList->sortThreads()) | |
339 | +//============================================================ | |
340 | + | |
341 | +/** | |
342 | + * 新着ソート | |
343 | + * | |
344 | + * @return integer | |
345 | + */ | |
346 | +function cmp_midoku($a, $b) | |
347 | +{ | |
348 | + if ($a->new == $b->new) { | |
349 | + if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) { | |
350 | + return ($a->torder > $b->torder) ? 1 : -1; | |
351 | + } else { | |
352 | + return ($a->unum < $b->unum) ? 1 : -1; | |
353 | + } | |
354 | + } else { | |
355 | + return ($a->new < $b->new) ? 1 : -1; | |
356 | + } | |
357 | +} | |
358 | + | |
359 | +/** | |
360 | + * レス数 ソート | |
361 | + * | |
362 | + * @return integer | |
363 | + */ | |
364 | +function cmp_res($a, $b) | |
365 | +{ | |
366 | + if ($a->rescount == $b->rescount) { | |
367 | + return ($a->torder > $b->torder) ? 1 : -1; | |
368 | + } else { | |
369 | + return ($a->rescount < $b->rescount) ? 1 : -1; | |
370 | + } | |
371 | +} | |
372 | + | |
373 | +/** | |
374 | + * タイトル ソート | |
375 | + * | |
376 | + * @return integer | |
377 | + */ | |
378 | +function cmp_title($a, $b) | |
379 | +{ | |
380 | + if ($a->ttitle == $b->ttitle) { | |
381 | + return ($a->torder > $b->torder) ? 1 : -1; | |
382 | + } else { | |
383 | + return strcmp($a->ttitle, $b->ttitle); | |
384 | + } | |
385 | +} | |
386 | + | |
387 | +/** | |
388 | + * 板 ソート | |
389 | + * | |
390 | + * @return integer | |
391 | + */ | |
392 | +function cmp_ita($a, $b) | |
393 | +{ | |
394 | + if ($a->host != $b->host) { | |
395 | + return strcmp($a->host, $b->host); | |
396 | + } else { | |
397 | + if ($a->itaj != $b->itaj) { | |
398 | + return strcmp($a->itaj, $b->itaj); | |
399 | + } else { | |
400 | + return ($a->torder > $b->torder) ? 1 : -1; | |
401 | + } | |
402 | + } | |
403 | +} | |
404 | + | |
405 | +/** | |
406 | + * お気に ソート | |
407 | + * | |
408 | + * @return integer | |
409 | + */ | |
410 | +function cmp_fav($a, $b) | |
411 | +{ | |
412 | + if ($a->fav == $b->fav) { | |
413 | + return ($a->torder > $b->torder) ? 1 : -1; | |
414 | + } else { | |
415 | + return strcmp($b->fav, $a->fav); | |
416 | + } | |
417 | +} | |
418 | + | |
419 | +/** | |
420 | + * 勢いソート(新着レス優先) | |
421 | + * | |
422 | + * @return integer | |
423 | + */ | |
424 | +function cmp_dayres_midoku($a, $b) | |
425 | +{ | |
426 | + if ($a->new == $b->new) { | |
427 | + if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) { | |
428 | + return ($a->dayres < $b->dayres) ? 1 : -1; | |
429 | + } else { | |
430 | + return ($a->unum < $b->unum) ? 1 : -1; | |
431 | + } | |
432 | + } else { | |
433 | + return ($a->new < $b->new) ? 1 : -1; | |
434 | + } | |
435 | +} | |
436 | + | |
437 | +/** | |
438 | + * 勢いソート | |
439 | + * | |
440 | + * @return integer | |
441 | + */ | |
442 | +function cmp_dayres($a, $b) | |
443 | +{ | |
444 | + if ($a->new == $b->new) { | |
445 | + return ($a->dayres < $b->dayres) ? 1 : -1; | |
446 | + } else { | |
447 | + return ($a->new < $b->new) ? 1 : -1; | |
448 | + } | |
449 | +} | |
450 | + | |
451 | +/** | |
452 | + * key ソート | |
453 | + * | |
454 | + * @return integer | |
455 | + */ | |
456 | +function cmp_key($a, $b) | |
457 | +{ | |
458 | + return ($a->key < $b->key) ? 1 : -1; | |
459 | +} | |
460 | + | |
461 | +/** | |
462 | + * No. ソート | |
463 | + * | |
464 | + * @return integer | |
465 | + */ | |
466 | +function cmp_no($a, $b) | |
467 | +{ | |
468 | + return ($a->torder > $b->torder) ? 1 : -1; | |
469 | +} | |
470 | + | |
471 | +/** | |
472 | + * 類似性ソート | |
473 | + * | |
474 | + * @return integer | |
475 | + */ | |
476 | +function cmp_similarity($a, $b) | |
477 | +{ | |
478 | + if ($a->similarity == $b->similarity) { | |
479 | + return ($a->key < $b->key) ? 1 : -1; | |
480 | + } else { | |
481 | + return ($a->similarity < $b->similarity) ? 1 : -1; | |
482 | + } | |
483 | +} |
@@ -10,6 +10,35 @@ | ||
10 | 10 | class BrdCtl |
11 | 11 | { |
12 | 12 | /** |
13 | + * お気に入り板を読み込む | |
14 | + * | |
15 | + * @static | |
16 | + * @access public | |
17 | + * @return array | |
18 | + */ | |
19 | + function readFavItas() | |
20 | + { | |
21 | + global $_conf; | |
22 | + | |
23 | + // favita読み込み | |
24 | + $favitas = array(); | |
25 | + if (file_exists($_conf['favita_path'])) { | |
26 | + if ($lines = file($_conf['favita_path'])) { | |
27 | + foreach ($lines as $l) { | |
28 | + if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", trim($l), $matches)) { | |
29 | + $favitas[] = array( | |
30 | + 'host' => $matches[1], | |
31 | + 'bbs' => $matches[2], | |
32 | + 'itaj' => $matches[3], | |
33 | + ); | |
34 | + } | |
35 | + } | |
36 | + } | |
37 | + } | |
38 | + return $favitas; | |
39 | + } | |
40 | + | |
41 | + /** | |
13 | 42 | * boardを全て読み込む |
14 | 43 | * |
15 | 44 | * @static |
@@ -13,8 +13,8 @@ | ||
13 | 13 | <?php if (UA::isWindowsPhoneIEMobile()) { ?> |
14 | 14 | @import "./iui/iui_wpie.css"; |
15 | 15 | <?php } ?> |
16 | -@import "./iui/smartphone.css?20140114"; | |
17 | -@import "./iui/iui.css?20140114"; | |
16 | +@import "./iui/smartphone.css?20140423"; | |
17 | +@import "./iui/iui.css?20140423"; | |
18 | 18 | </style> |
19 | 19 | <?php |
20 | 20 | } |
@@ -286,7 +286,7 @@ | ||
286 | 286 | // NGID変換 |
287 | 287 | } elseif ($isNgId) { |
288 | 288 | $date_id = preg_replace( |
289 | - '|ID: ?([0-9A-Za-z/.+]{8,11}).*|', | |
289 | + '|ID: ?([0-9A-Za-z/.+]{8,15}).*|', | |
290 | 290 | "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", |
291 | 291 | $date_id |
292 | 292 | ); |
@@ -319,7 +319,9 @@ | ||
319 | 319 | |
320 | 320 | // 名前 |
321 | 321 | if (strlen($name)) { |
322 | - $tores .= $name; | |
322 | + // 2014/04/20 名前が「</b><b>」となっているケースを2ch.scで見かけた。 | |
323 | + // http://sweet.2ch.sc/test/read.cgi/patisserie/1397235092/699-701n | |
324 | + $tores .= '<b>' . $name . '</b>'; | |
323 | 325 | } |
324 | 326 | |
325 | 327 | // メール |
@@ -342,11 +344,11 @@ | ||
342 | 344 | // {{ IDフィルタ |
343 | 345 | |
344 | 346 | if ($_conf['flex_idpopup'] == 1) { |
345 | - if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) { | |
347 | + if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) { | |
346 | 348 | $idkey = $matches[1]; |
347 | 349 | if ($this->thread->idcount[$idkey] > 1) { |
348 | 350 | $date_id = preg_replace_callback( |
349 | - '|ID: ?([0-9A-Za-z/.+]{8,11})|', | |
351 | + '|ID: ?([0-9A-Za-z/.+]{8,15})|', | |
350 | 352 | array($this, 'idfilter_callback'), $date_id |
351 | 353 | ); |
352 | 354 | } else { |
@@ -882,12 +884,27 @@ | ||
882 | 884 | { |
883 | 885 | global $_conf; |
884 | 886 | |
885 | - if (preg_match('{^http://(\\w+\\.(?:2ch\\.net|bbspink\\.com))/test/read\\.cgi/([^/]+)/([0-9]+)(?:/([^/]+)?)?$}', $url, $m)) { | |
886 | - $ls = isset($m[4]) ? $m[4] : null; | |
887 | - $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&ls={$ls}"; | |
888 | - return sprintf('<a href="%s%s">%s</a>', | |
889 | - hs($read_url), $_conf['k_at_a'], $html | |
890 | - ); | |
887 | + // http://anchorage.2ch.net/test/read.cgi/occult/1238339367/ | |
888 | + // http://orz.2ch.io/p/-/tsushima.2ch.net/newsplus/1240991583/ | |
889 | + // http://c.2ch.net/test/-/occult/1229761545/i (未対応) | |
890 | + | |
891 | + if (preg_match('{^http://(orz\.2ch\.io/p/-/)?(\\w+\\.(?:2ch\\.net|bbspink\\.com))/(test/read\\.cgi/)?([^/]+)/([1-9]\\d+)(?:/([^/]+)?)?$}', $url, $m)) { | |
892 | + | |
893 | + if ($m[1] != '' xor $m[3] != '') { | |
894 | + $ls = (!isset($m[6]) || $m[6] == 'i') ? '' : $m[6]; | |
895 | + $host = $m[2]; | |
896 | + $bbs = $m[4]; | |
897 | + $key = $m[5]; | |
898 | + $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}"; | |
899 | + if ($ls) { | |
900 | + $read_url .= "&ls=$ls"; | |
901 | + } else { | |
902 | + $read_url .= '&onlyone=1'; | |
903 | + } | |
904 | + return sprintf('<a href="%s%s">%s</a>', | |
905 | + hs($read_url), $_conf['k_at_a'], $html | |
906 | + ); | |
907 | + } | |
891 | 908 | } |
892 | 909 | return false; |
893 | 910 | } |
@@ -60,11 +60,27 @@ | ||
60 | 60 | $class_sort_ikioi = ''; // 勢い |
61 | 61 | $class_sort_bd = ''; // スレ立て日 |
62 | 62 | $class_sort_fav = ''; // お気にスレ |
63 | - if ($GLOBALS['now_sort']) { | |
64 | - $nowsort_code = sprintf('$class_sort_%s = \' class="now_sort"\';', $GLOBALS['now_sort']); | |
65 | - eval($nowsort_code); | |
63 | + | |
64 | + if (empty($_REQUEST['rsort'])) { | |
65 | + ${'class_sort_' . $GLOBALS['now_sort']} = ' class="now_sort"'; | |
66 | + } else { | |
67 | + ${'class_sort_' . $GLOBALS['now_sort']} = ' class="now_sort rsort"'; | |
66 | 68 | } |
67 | 69 | |
70 | + // 逆順ソート用クエリ | |
71 | + $rsortq_midoku = ''; // 新着 | |
72 | + $rsortq_res = ''; // レス | |
73 | + $rsortq_no = ''; // No. | |
74 | + $rsortq_title = ''; // タイトル | |
75 | + $rsortq_ita = ''; // 板 | |
76 | + $rsortq_spd = ''; // すばやさ | |
77 | + $rsortq_ikioi = ''; // 勢い | |
78 | + $rsortq_bd = ''; // スレ立て日 | |
79 | + $rsortq_fav = ''; // お気に入り | |
80 | + if (empty($_REQUEST['rsort'])) { | |
81 | + ${'rsortq_' . $GLOBALS['now_sort']} = '&rsort=1'; | |
82 | + } | |
83 | + | |
68 | 84 | $sortq_spmode = ''; |
69 | 85 | $sortq_host = ''; |
70 | 86 | $sortq_ita = ''; |
@@ -78,7 +94,7 @@ | ||
78 | 94 | $sortq_ita = "&bbs={$aThreadList->bbs}"; |
79 | 95 | } |
80 | 96 | |
81 | - $midoku_sort_ht = "<td class=\"tu\" nowrap><a{$class_sort_midoku} href=\"{$_conf['subject_php']}?sort=midoku{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" style=\"white-space:nowrap;\"><nobr>新着</nobr></a></td>"; | |
97 | + $midoku_sort_ht = "<td class=\"tu\" nowrap><a{$class_sort_midoku} href=\"{$_conf['subject_php']}?sort=midoku{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_midoku}{$norefresh_q}\" target=\"_self\" style=\"white-space:nowrap;\"><nobr>新着</nobr></a></td>"; | |
82 | 98 | |
83 | 99 | //===================================================== |
84 | 100 | // テーブルヘッダHTML表示 |
@@ -93,7 +109,7 @@ | ||
93 | 109 | |
94 | 110 | // レス数 |
95 | 111 | if ($sb_view != "edit") { |
96 | - echo "<td class=\"tn\" nowrap><a{$class_sort_res} href=\"{$_conf['subject_php']}?sort=res{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">レス</a></td>"; | |
112 | + echo "<td class=\"tn\" nowrap><a{$class_sort_res} href=\"{$_conf['subject_php']}?sort=res{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_res}{$norefresh_q}\" target=\"_self\">レス</a></td>"; | |
97 | 113 | } |
98 | 114 | |
99 | 115 | // >>1 |
@@ -108,32 +124,32 @@ | ||
108 | 124 | |
109 | 125 | // No. |
110 | 126 | $title = empty($aThreadList->spmode) ? " title=\"2ch標準の並び順番号\"" : ''; |
111 | - echo "<td class=\"to\"><a{$class_sort_no} href=\"{$_conf['subject_php']}?sort=no{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\"{$title}>No.</a></td>"; | |
127 | + echo "<td class=\"to\"><a{$class_sort_no} href=\"{$_conf['subject_php']}?sort=no{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_no}{$norefresh_q}\" target=\"_self\"{$title}>No.</a></td>"; | |
112 | 128 | |
113 | 129 | // タイトル |
114 | - echo "<td class=\"tl\"><a{$class_sort_title} href=\"{$_conf['subject_php']}?sort=title{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">タイトル</a></td>"; | |
130 | + echo "<td class=\"tl\"><a{$class_sort_title} href=\"{$_conf['subject_php']}?sort=title{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_title}{$norefresh_q}\" target=\"_self\">タイトル</a></td>"; | |
115 | 131 | |
116 | 132 | // 板 |
117 | 133 | if ($ita_name_bool) { |
118 | - echo "<td class=\"t\"><a{$class_sort_ita} href=\"{$_conf['subject_php']}?sort=ita{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">板</a></td>"; | |
134 | + echo "<td class=\"t\"><a{$class_sort_ita} href=\"{$_conf['subject_php']}?sort=ita{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_ita}{$norefresh_q}\" target=\"_self\">板</a></td>"; | |
119 | 135 | } |
120 | 136 | |
121 | 137 | // すばやさ |
122 | 138 | if ($_conf['sb_show_spd']) { |
123 | - echo "<td class=\"ts\"><a{$class_sort_spd} href=\"{$_conf['subject_php']}?sort=spd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">すばやさ</a></td>"; | |
139 | + echo "<td class=\"ts\"><a{$class_sort_spd} href=\"{$_conf['subject_php']}?sort=spd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_spd}{$norefresh_q}\" target=\"_self\">すばやさ</a></td>"; | |
124 | 140 | } |
125 | 141 | |
126 | 142 | // 勢い |
127 | 143 | if ($_conf['sb_show_ikioi']) { |
128 | - echo "<td class=\"ti\"><a{$class_sort_ikioi} href=\"{$_conf['subject_php']}?sort=ikioi{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" title=\"一日あたりのレス数\">勢い</a></td>"; | |
144 | + echo "<td class=\"ti\"><a{$class_sort_ikioi} href=\"{$_conf['subject_php']}?sort=ikioi{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_ikioi}{$norefresh_q}\" target=\"_self\" title=\"一日あたりのレス数\">勢い</a></td>"; | |
129 | 145 | } |
130 | 146 | |
131 | 147 | // スレ立て日 |
132 | - echo "<td class=\"t\"><a{$class_sort_bd} href=\"{$_conf['subject_php']}?sort=bd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">スレ立て日</a></td>"; | |
148 | + echo "<td class=\"t\"><a{$class_sort_bd} href=\"{$_conf['subject_php']}?sort=bd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_bd}{$norefresh_q}\" target=\"_self\">スレ立て日</a></td>"; | |
133 | 149 | |
134 | 150 | // お気に入り |
135 | 151 | if ($_conf['sb_show_fav'] and $aThreadList->spmode != "taborn") { |
136 | - echo "<td class=\"t\"><a{$class_sort_fav} href=\"{$_conf['subject_php']}?sort=fav{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" title=\"お気にスレ\">☆</a></td>"; | |
152 | + echo "<td class=\"t\"><a{$class_sort_fav} href=\"{$_conf['subject_php']}?sort=fav{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_fav}{$norefresh_q}\" target=\"_self\" title=\"お気にスレ\">☆</a></td>"; | |
137 | 153 | } |
138 | 154 | |
139 | 155 | echo "\n</tr>\n"; |
@@ -53,7 +53,7 @@ | ||
53 | 53 | |
54 | 54 | $_conf['last_post_time_file'] = $_conf['pref_dir'] . '/last_post_time.txt'; |
55 | 55 | if (P2Util::isHost2chs($host)) { |
56 | - $server_id = preg_replace('{\.2ch\.net$}', '', $host); | |
56 | + $server_id = preg_replace('{\\.2ch\\.net$}', '', $host); | |
57 | 57 | $_conf['last_post_time_file'] = P2Util::idxDirOfHost($host, true) . rawurlencode($server_id) . '_' . 'last_post_time.txt'; |
58 | 58 | } |
59 | 59 |
@@ -136,7 +136,7 @@ | ||
136 | 136 | $submit = '書き込む'; |
137 | 137 | |
138 | 138 | if (!empty($_POST['newthread'])) { |
139 | - $post = array( | |
139 | + $post_to_bbs = array( | |
140 | 140 | $subject_k => $subject, |
141 | 141 | $FROM_k => $FROM, $mail_k => $mail, $MESSAGE_k => $MESSAGE, |
142 | 142 | $bbs_k => $bbs, |
@@ -144,7 +144,7 @@ | ||
144 | 144 | $time_k => $time |
145 | 145 | ); |
146 | 146 | if (P2Util::isHostJbbsShitaraba($host)) { |
147 | - $post[$dir_k] = $dir; | |
147 | + $post_to_bbs[$dir_k] = $dir; | |
148 | 148 | } |
149 | 149 | $qs_sid = $qs = array( |
150 | 150 | 'host' => $host, |
@@ -159,7 +159,7 @@ | ||
159 | 159 | $location_sid_url = UriUtil::buildQueryUri($_conf['subject_php'], $qs_sid); |
160 | 160 | |
161 | 161 | } else { |
162 | - $post = array( | |
162 | + $post_to_bbs = array( | |
163 | 163 | $FROM_k => $FROM, $mail_k => $mail, $MESSAGE_k => $MESSAGE, |
164 | 164 | $bbs_k => $bbs, |
165 | 165 | $key_k => $key, |
@@ -167,7 +167,7 @@ | ||
167 | 167 | $time_k => $time |
168 | 168 | ); |
169 | 169 | if (P2Util::isHostJbbsShitaraba($host)) { |
170 | - $post[$dir_k] = $dir; | |
170 | + $post_to_bbs[$dir_k] = $dir; | |
171 | 171 | } |
172 | 172 | $qs_sid = $qs = array( |
173 | 173 | 'host' => $host, |
@@ -205,7 +205,7 @@ | ||
205 | 205 | } |
206 | 206 | |
207 | 207 | if ($r = _getSID2ch()) { |
208 | - $post['sid'] = $r; | |
208 | + $post_to_bbs['sid'] = $r; | |
209 | 209 | } |
210 | 210 | } |
211 | 211 |
@@ -213,8 +213,8 @@ | ||
213 | 213 | |
214 | 214 | // for hana mogera。クッキー確認画面ではpost、その後はcookieという仕様らしい。 |
215 | 215 | foreach ($_POST as $k => $v) { |
216 | - if (!isset($post[$k]) and !in_array($k, $post_keys)) { | |
217 | - $post[$k] = $_POST[$k]; | |
216 | + if (!isset($post_to_bbs[$k]) and !in_array($k, $post_keys)) { | |
217 | + $post_to_bbs[$k] = $_POST[$k]; | |
218 | 218 | } |
219 | 219 | } |
220 | 220 |
@@ -230,7 +230,7 @@ | ||
230 | 230 | //================================================================ |
231 | 231 | |
232 | 232 | // ポスト実行 |
233 | -$posted = _postIt($host, $bbs, $key, $post, $bbs_cgi); // @return boolean|string | |
233 | +$posted = _postIt($host, $bbs, $key, $post_to_bbs, $bbs_cgi); // @return boolean|string | |
234 | 234 | |
235 | 235 | // 最終投稿時間を記録する 確認処理 |
236 | 236 | if ($posted === true) { |
@@ -562,7 +562,7 @@ | ||
562 | 562 | /** |
563 | 563 | * @return array array($request, $send_host, $send_port) |
564 | 564 | */ |
565 | -function _buildRequestForPost($host, $bbs, $key, $post, $bbs_cgi) | |
565 | +function _buildRequestForPost($host, $bbs, $key, $post_to_bbs, $bbs_cgi) | |
566 | 566 | { |
567 | 567 | global $_conf, $_login; |
568 | 568 |
@@ -662,7 +662,7 @@ | ||
662 | 662 | |
663 | 663 | if (strtoupper($method) == 'POST') { |
664 | 664 | $post_enc = array(); |
665 | - while (list($name, $value) = each($post)) { | |
665 | + while (list($name, $value) = each($post_to_bbs)) { | |
666 | 666 | |
667 | 667 | if (!isset($value)) { |
668 | 668 | continue; |
@@ -696,11 +696,11 @@ | ||
696 | 696 | * |
697 | 697 | * @return boolean|string 書き込み成功なら true、失敗なら false または失敗理由文字列 |
698 | 698 | */ |
699 | -function _postIt($host, $bbs, $key, $post, $bbs_cgi) | |
699 | +function _postIt($host, $bbs, $key, $post_to_bbs, $bbs_cgi) | |
700 | 700 | { |
701 | 701 | global $_conf, $popup, $rescount, $ttitle_en, $STYLE, $post_cache; |
702 | 702 | |
703 | - list($request, $send_host, $send_port) = _buildRequestForPost($host, $bbs, $key, $post, $bbs_cgi); | |
703 | + list($request, $send_host, $send_port) = _buildRequestForPost($host, $bbs, $key, $post_to_bbs, $bbs_cgi); | |
704 | 704 | |
705 | 705 | $maru_kakiko = empty($_POST['maru_kakiko']) ? 0 : 1; |
706 | 706 | P2Util::setConfUser('maru_kakiko', $maru_kakiko); |
@@ -751,14 +751,19 @@ | ||
751 | 751 | } |
752 | 752 | } |
753 | 753 | |
754 | - // 転送は書き込み成功と判断 | |
755 | - } elseif ( | |
756 | - preg_match('/^Location: /', $l, $matches) | |
754 | + // 転送 | |
755 | + } elseif (preg_match('/^Location: /', $l, $matches)) { | |
757 | 756 | // 板移転後だとこうなるみたい → http://www2.2ch.net/live.html(もうずっと人大杉) |
758 | 757 | // (このエラー詳細を表示するようにした方が親切だが) |
759 | - and !preg_match('{\\.2ch\\.net/live\\.html}', $l, $matches) | |
760 | - ) { | |
761 | - $post_seikou = true; | |
758 | + if (!preg_match('{\\.2ch\\.(?:sc|net)/live\\.html}', $l, $matches)) { | |
759 | + // 失敗 | |
760 | + // キャプチャ? | |
761 | + } elseif (preg_match('/\\.2ch\\.sc/test/jail\\.cgi/', $l)) { | |
762 | + // 失敗 | |
763 | + // それ以外の転送は書き込み成功と判断 | |
764 | + } else { | |
765 | + $post_seikou = true; | |
766 | + } | |
762 | 767 | } |
763 | 768 | if ($l == "\r\n") { |
764 | 769 | break; |
@@ -784,16 +789,17 @@ | ||
784 | 789 | $response = preg_replace("{(<head>.*<META http-equiv=\"Content-Type\" content=\"text/html; charset=)EUC-JP(\">.*</head>)}is", "$1Shift_JIS$2", $response); |
785 | 790 | } |
786 | 791 | |
787 | - $kakikonda_match = '/<title>.*(書きこみました|書き込みました|書き込み終了 - SubAll BBS).*<\/title>/is'; | |
792 | + // 書き込み結果判定 | |
793 | + $kakikonda_match = '/<!-- 2ch_X:true -->|<title>[^<]*(?:書きこみました|書き込みました|書き込み終了 - SubAll BBS)[^<]*<\/title>/is'; | |
788 | 794 | // 2ch.sc「<li>Cookieをきちんと受け取る設定になっていますか?</li>」 |
789 | - $cookie_kakunin_match = '/<!-- 2ch_X:cookie -->|<title>■ 書き込み確認 ■<\/title>|>書き込み確認。<|><li>Cookieをきちんと/'; | |
795 | + $cookie_kakunin_match = '/<!-- 2ch_X:cookie -->|<title>[^<]*書き込み確認[^<]*<\/title>|><li>Cookieをきちんと/i'; | |
790 | 796 | |
791 | 797 | if (eregi("(<.+>)", $response, $matches)) { |
792 | 798 | $response = $matches[1]; |
793 | 799 | } |
794 | 800 | |
795 | - // カキコミ成功 | |
796 | - if (preg_match($kakikonda_match, $response, $matches) or $post_seikou) { | |
801 | + // 書き込み成功なら | |
802 | + if (preg_match($kakikonda_match, $response) or $post_seikou) { | |
797 | 803 | |
798 | 804 | // クッキーの書き込み自動保存を消去する |
799 | 805 | if (isset($_COOKIE['post_msg'])) { |
@@ -815,8 +821,8 @@ | ||
815 | 821 | //$response_ht = hs($response); |
816 | 822 | //echo "<pre>{$response_ht}</pre>"; |
817 | 823 | |
818 | - // ■cookie確認表示(post再チャレンジしてね) | |
819 | - } elseif (preg_match($cookie_kakunin_match, $response, $matches)) { | |
824 | + // cookie確認表示(post再チャレンジしてね) | |
825 | + } elseif (preg_match($cookie_kakunin_match, $response)) { | |
820 | 826 | |
821 | 827 | $htm['more_hidden_post'] = ''; |
822 | 828 | // p2用の追加キー |
@@ -879,9 +885,14 @@ | ||
879 | 885 | //return false; |
880 | 886 | return 'COOKIE'; |
881 | 887 | |
882 | - // その他はレスポンスをそのまま表示(結果はエラーとしてfalseを返す) | |
888 | + // 結果を判別できなかった場合はレスポンスをそのまま表示する(戻り値はエラーとしてfalseを返す) | |
883 | 889 | } else { |
884 | - $response = mb_ereg_replace('こちらでリロードしてください。<a href="\.\./[a-z]+/index\.html"> GO! </a><br>', "", $response); | |
890 | + // p2メッセージを挿入 | |
891 | + $response = mb_eregi_replace('<body[^>]*>', '\\0<div style="border:solid 4px #ccc; padding:4px; background-color:#fff">p2 info: 書き込み結果ページを判別できませんでした。</div>', $response); | |
892 | + | |
893 | + // 2ch用調整 | |
894 | + $response = mb_ereg_replace('こちらでリロードしてください。<a href="\.\./[a-z]+/index\.html"> GO! </a><br>', '', $response); | |
895 | + | |
885 | 896 | echo $response; |
886 | 897 | return false; |
887 | 898 | } |
@@ -79,8 +79,8 @@ | ||
79 | 79 | <?php |
80 | 80 | P2View::printExtraHeadersHtml(); |
81 | 81 | ?> |
82 | - <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114"> | |
83 | - <link rel="stylesheet" type="text/css" href="./iui/read.css?20140114"> | |
82 | + <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423"> | |
83 | + <link rel="stylesheet" type="text/css" href="./iui/read.css?20140423"> | |
84 | 84 | <title>スレ内検索</title> |
85 | 85 | </head> |
86 | 86 | <body<?php echo $body_at; ?>> |
@@ -54,10 +54,10 @@ | ||
54 | 54 | //iPhone 表示用フッタ 080725 |
55 | 55 | // 前、次、新着 無い時は黒 |
56 | 56 | if ($read_navi_latest_btm_ht) { // 最新N件 |
57 | - $new_btm_ht = "<span class=\"new\">{$read_navi_latest_btm_ht}</span>"; | |
57 | + $new_btm_ht = "<span id=\"newButton\" ontouchstart=\"startTap(this)\" ontouchmove=\"resetTap()\" ontouchend=\"if(detectTap(this)){ this.style.backgroundPositionY = '-50px' }\">{$read_navi_latest_btm_ht}</span>"; | |
58 | 58 | } |
59 | 59 | if ($read_footer_navi_new_btm_ht) { // 新着を表示 |
60 | - $new_btm_ht = "<span class=\"new\">{$read_footer_navi_new_btm_ht}</span>"; | |
60 | + $new_btm_ht = "<span id=\"newButton\" ontouchstart=\"startTap(this)\" ontouchmove=\"resetTap()\" ontouchend=\"if(detectTap(this)){ this.style.backgroundPositionY = '-50px' }\">{$read_footer_navi_new_btm_ht}</span>"; | |
61 | 61 | } |
62 | 62 | if ($read_navi_previous_btm_ht) { |
63 | 63 | $read_navi_previous_tab_ht = "<span class=\"prev\">{$read_navi_previous_btm_ht} </span>"; |
@@ -97,7 +97,7 @@ | ||
97 | 97 | <span class="home"><a href="<?php eh($index_uri); ?>">TOP</a></span> |
98 | 98 | <?php echo $read_navi_previous_tab_ht; ?> |
99 | 99 | <?php echo $new_btm_ht; ?> |
100 | - <span class="res" id="writeButton" title="off"><a onclick="popUpFootbarFormIPhone(1);">書き込み</a></span> | |
100 | + <span id="writeButton" title="off"><a onclick="popUpFootbarFormIPhone(1);">書き込み</a></span> | |
101 | 101 | |
102 | 102 | <?php if (!empty($_GET['onlyone']) && !file_exists($aThread->keyidx)) { |
103 | 103 | ?><span class="delelog_disabled"></span><?php |
@@ -105,7 +105,7 @@ | ||
105 | 105 | ?><span class="delelog" id="readi_delelog"><?php echo _getToolDeleATag($thread_qs, $ttitle_en, $dele_st); ?></span><?php |
106 | 106 | } |
107 | 107 | |
108 | - ?><span class="other" id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
108 | + ?><span id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
109 | 109 | <?php //echo $read_navi_next_btm_tab_ht; ?> |
110 | 110 | |
111 | 111 | </div> |
@@ -139,7 +139,7 @@ | ||
139 | 139 | P2View::printStyleTagImportIuiCss(); ?> |
140 | 140 | <script type="text/javascript" src="iphone/js/setfavjs.iphone.js?v=20061206"></script> |
141 | 141 | <script type="text/javascript" src="js/basic.js?2012"></script> |
142 | - <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script> | |
142 | + <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script> | |
143 | 143 | <script type="text/javascript" src="iphone/js/smartpopup.iPhone.js"></script> |
144 | 144 | <script type="text/javascript"> |
145 | 145 | <!-- |
@@ -308,7 +308,7 @@ | ||
308 | 308 | // NGID変換 |
309 | 309 | } elseif ($isNgId) { |
310 | 310 | $date_id = preg_replace( |
311 | - '|ID: ?([0-9A-Za-z/.+]{8,11}).*|', | |
311 | + '|ID: ?([0-9A-Za-z/.+]{8,15}).*|', | |
312 | 312 | "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", |
313 | 313 | $date_id |
314 | 314 | ); |
@@ -363,7 +363,7 @@ | ||
363 | 363 | |
364 | 364 | // 名前 |
365 | 365 | if (strlen($name)) { |
366 | - $tores .= '<span class="tname">' . $name . '</span>'; | |
366 | + $tores .= '<span class="tname"><b>' . $name . '</b></span>'; | |
367 | 367 | } |
368 | 368 | |
369 | 369 | // メール |
@@ -386,11 +386,11 @@ | ||
386 | 386 | // {{ IDフィルタ |
387 | 387 | |
388 | 388 | if ($_conf['flex_idpopup'] == 1) { |
389 | - if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) { | |
389 | + if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) { | |
390 | 390 | $idkey = $matches[1]; |
391 | 391 | if ($this->thread->idcount[$idkey] > 1) { |
392 | 392 | $date_id = preg_replace_callback( |
393 | - '|ID: ?([0-9A-Za-z/.+]{8,11})|', | |
393 | + '|ID: ?([0-9A-Za-z/.+]{8,15})|', | |
394 | 394 | array($this, 'idfilter_callback'), $date_id |
395 | 395 | ); |
396 | 396 | } else { |
@@ -593,7 +593,7 @@ | ||
593 | 593 | |
594 | 594 | // NGID変換 |
595 | 595 | } elseif ($isNgId) { |
596 | - $date_id = preg_replace('|ID: ?([0-9A-Za-z/.+]{8,11}).*|', "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", $date_id); | |
596 | + $date_id = preg_replace('|ID: ?([0-9A-Za-z/.+]{8,15}).*|', "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", $date_id); | |
597 | 597 | // $date_id = sprintf('<s><font color="%s">%s</font></s>', $STYLE['read_ngword'], $date_id); |
598 | 598 | $msg = $kakunin_msg_ht; |
599 | 599 | } |
@@ -602,10 +602,10 @@ | ||
602 | 602 | |
603 | 603 | // IDフィルタ |
604 | 604 | if ($_conf['flex_idpopup'] == 1) { |
605 | - if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) { | |
605 | + if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) { | |
606 | 606 | $idkey = $matches[1]; |
607 | 607 | if ($this->thread->idcount[$idkey] > 1) { |
608 | - $date_id = preg_replace_callback('|ID: ?([0-9A-Za-z/.+]{8,11})|', array($this, 'idfilter_callback'), $date_id); | |
608 | + $date_id = preg_replace_callback('|ID: ?([0-9A-Za-z/.+]{8,15})|', array($this, 'idfilter_callback'), $date_id); | |
609 | 609 | } else { |
610 | 610 | if ($_conf['k_clip_unique_id']) { |
611 | 611 | $date_id = $this->clipId($date_id, $matches[0]); |
@@ -1152,8 +1152,12 @@ | ||
1152 | 1152 | $host = $m[2]; |
1153 | 1153 | $bbs = $m[4]; |
1154 | 1154 | $key = $m[5]; |
1155 | - $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}&ls={$ls}"; | |
1156 | - | |
1155 | + $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}"; | |
1156 | + if ($ls) { | |
1157 | + $read_url .= "&ls=$ls"; | |
1158 | + } else { | |
1159 | + $read_url .= '&onlyone=1'; | |
1160 | + } | |
1157 | 1161 | return sprintf('<a href="%s%s">%s</a>', |
1158 | 1162 | hs($read_url), $_conf['k_at_a'], $html |
1159 | 1163 | ); |
@@ -13,24 +13,7 @@ | ||
13 | 13 | |
14 | 14 | $mae_ht = _getMaeATag($aThreadList, $disp_navi, $word_qs); |
15 | 15 | |
16 | -$tugi_ht = ''; | |
17 | -if ($disp_navi['tugi_from'] <= $sb_disp_all_num) { | |
18 | - $qs = array( | |
19 | - 'host' => $aThreadList->host, | |
20 | - 'bbs' => $aThreadList->bbs, | |
21 | - 'spmode' => $aThreadList->spmode, | |
22 | - 'norefresh' => '1', | |
23 | - 'from' => $disp_navi['tugi_from'], | |
24 | - 'sb_view' => geti($_REQUEST['sb_view']), | |
25 | - UA::getQueryKey() => UA::getQueryValue() | |
26 | - ); | |
27 | - $qs = array_merge($word_qs, $qs); | |
28 | - $tugi_ht = P2View::tagA( | |
29 | - UriUtil::buildQueryUri($_conf['subject_php'], $qs), | |
30 | - hs('次') // {$_conf['k_accesskey']['next']}.次 | |
31 | - //,array($_conf['accesskey_for_k'] => $_conf['k_accesskey']['next']) | |
32 | - ); | |
33 | -} | |
16 | +$tugi_ht = _getTugiATag($aThreadList, $disp_navi, $word_qs); | |
34 | 17 | |
35 | 18 | if ($disp_navi['from'] == $disp_navi['end']) { |
36 | 19 | $sb_range_on = $disp_navi['from']; |
@@ -99,6 +82,7 @@ | ||
99 | 82 | $htm['change_sort'] .= "<option value=\"{$k}\"{$selected}>{$v}</option>"; |
100 | 83 | } |
101 | 84 | $htm['change_sort'] .= '</select>'; |
85 | +$htm['change_sort'] .= sprintf(' <label><input type="checkbox" name="rsort" value="1"%s>逆順</label> ', empty($_REQUEST['rsort']) ? '' : ' checked'); | |
102 | 86 | $htm['change_sort'] .= '<input type="submit" value="変更"></form>'; |
103 | 87 | |
104 | 88 | // }}} |
@@ -148,7 +132,7 @@ | ||
148 | 132 | $sb_footer_tool_ht .= '<span class="next_disabled"></span>'; |
149 | 133 | } |
150 | 134 | if ($matome_ht = getShinchakuMatomeATag($aThreadList, $shinchaku_num, true)) { |
151 | - $sb_footer_tool_ht .= sprintf('<span class="matome">%s</span>', $matome_ht); | |
135 | + $sb_footer_tool_ht .= sprintf('<span class="matomeButton" ontouchstart="startTap(this)" ontouchmove="resetTap()" ontouchend="if(detectTap(this)){ this.style.backgroundPositionY = \'-50px\' }">%s</span>', $matome_ht); | |
152 | 136 | } |
153 | 137 | |
154 | 138 | // その他 |
@@ -170,7 +154,7 @@ | ||
170 | 154 | <div id="footToolbar" class="footbar"> |
171 | 155 | <span class="home"><a href="<?php eh($index_uri); ?>">TOP</a></span> |
172 | 156 | <?php if ($toolbar_etc_ht) { ?> |
173 | - <span class="other" id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
157 | + <span id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span> | |
174 | 158 | <?php } ?> |
175 | 159 | <?php echo $sb_footer_tool_ht; ?> |
176 | 160 | </div> |
@@ -337,6 +321,7 @@ | ||
337 | 321 | 'norefresh' => '1', |
338 | 322 | 'from' => $disp_navi['mae_from'], |
339 | 323 | 'sb_view' => geti($_REQUEST['sb_view']), |
324 | + 'rsort' => geti($_REQUEST['rsort']), | |
340 | 325 | UA::getQueryKey() => UA::getQueryValue() |
341 | 326 | ); |
342 | 327 | $qs = array_merge($word_qs, $qs); |
@@ -350,6 +335,39 @@ | ||
350 | 335 | } |
351 | 336 | |
352 | 337 | /** |
338 | + * ナビ 次 | |
339 | + * | |
340 | + * @return string HTML | |
341 | + */ | |
342 | +function _getTugiATag($aThreadList, $disp_navi, $word_qs) | |
343 | +{ | |
344 | + global $_conf; | |
345 | + | |
346 | + $tugi_atag = ''; | |
347 | + | |
348 | + if ($disp_navi['tugi_from'] <= $sb_disp_all_num) { | |
349 | + $qs = array( | |
350 | + 'host' => $aThreadList->host, | |
351 | + 'bbs' => $aThreadList->bbs, | |
352 | + 'spmode' => $aThreadList->spmode, | |
353 | + 'norefresh' => '1', | |
354 | + 'from' => $disp_navi['tugi_from'], | |
355 | + 'sb_view' => geti($_REQUEST['sb_view']), | |
356 | + 'rsort' => geti($_REQUEST['rsort']), | |
357 | + UA::getQueryKey() => UA::getQueryValue() | |
358 | + ); | |
359 | + $qs = array_merge($word_qs, $qs); | |
360 | + $tugi_ht = P2View::tagA( | |
361 | + UriUtil::buildQueryUri($_conf['subject_php'], $qs), | |
362 | + hs('次') // {$_conf['k_accesskey']['next']}.次 | |
363 | + //,array($_conf['accesskey_for_k'] => $_conf['k_accesskey']['next']) | |
364 | + ); | |
365 | + } | |
366 | + | |
367 | + return $tugi_atag; | |
368 | +} | |
369 | + | |
370 | +/** | |
353 | 371 | * @return string <a> |
354 | 372 | */ |
355 | 373 | function _getDatSokoATag($aThreadList) |
@@ -246,7 +246,7 @@ | ||
246 | 246 | <script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script> |
247 | 247 | <script type="text/javascript" src="js/post_form.js?v=20130624"></script> |
248 | 248 | <script type="text/javascript" src="js/delelog.js?v=20130611"></script> |
249 | - <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script> | |
249 | + <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script> | |
250 | 250 | <script type="text/javascript"> |
251 | 251 | <!-- |
252 | 252 | window.onload = function() { |
@@ -284,8 +284,8 @@ | ||
284 | 284 | // --> |
285 | 285 | </script> |
286 | 286 | |
287 | - <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114"> | |
288 | - <link rel="stylesheet" type="text/css" href="./iui/read.css?20140114"> | |
287 | + <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423"> | |
288 | + <link rel="stylesheet" type="text/css" href="./iui/read.css?20140423"> | |
289 | 289 | <title><?php echo $ptitle_ht; ?></title> |
290 | 290 | <?php |
291 | 291 |
@@ -1,3 +1,17 @@ | ||
1 | +var gTapObj = null; | |
2 | +function startTap(obj) | |
3 | +{ | |
4 | + gTapObj = obj; | |
5 | +} | |
6 | +function resetTap() | |
7 | +{ | |
8 | + gTapObj = null; | |
9 | +} | |
10 | +function detectTap(obj) | |
11 | +{ | |
12 | + return (gTapObj == obj); | |
13 | +} | |
14 | + | |
1 | 15 | /* read 次ボタンの横幅を拡張する(body oload後に実行) */ |
2 | 16 | function expandLargeNextButton() |
3 | 17 | { |
@@ -216,20 +230,20 @@ | ||
216 | 230 | buttonElements[0] = document.getElementById('searchRes'); |
217 | 231 | buttonElements[1] = document.getElementById('writeButton'); |
218 | 232 | buttonElements[2] = document.getElementById('etcButoon'); |
219 | - | |
233 | + | |
220 | 234 | for (var i = 0; i <= 2; i++) { |
221 | 235 | if (i != arrayIdx) { |
222 | 236 | if (buttonElements[i]) { |
223 | - buttonElements[i].setAttribute('title', 'off'); // titleは条件ステータスの保持っぽい | |
224 | - } | |
237 | + buttonElements[i].setAttribute('title', 'off'); // titleは条件ステータスの保持に利用している | |
238 | + } | |
225 | 239 | } |
226 | 240 | // 一旦全てを非表示にしている |
227 | - if (buttonElements[i]) { | |
228 | - buttonElements[i].style.backgroundPositionY = '0'; // 通常状態(光っていない) | |
229 | - } | |
230 | - if (popElements[i]) { | |
231 | - popElements[i].style.display = 'none'; | |
232 | - } | |
241 | + if (buttonElements[i]) { | |
242 | + buttonElements[i].style.backgroundPositionY = '0'; // 通常状態(光っていない) | |
243 | + } | |
244 | + if (popElements[i]) { | |
245 | + popElements[i].style.display = 'none'; | |
246 | + } | |
233 | 247 | } |
234 | 248 | |
235 | 249 | // 強制オン指定でなく、オフトグルまたはリセット(off)指定ならそのまま終了 |
@@ -281,7 +281,7 @@ | ||
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
284 | - * お気に板をHTML表示する for 携帯 | |
284 | + * お気に板をHTML表示する for iPhone | |
285 | 285 | * |
286 | 286 | * @access public |
287 | 287 | * @return void |
@@ -293,48 +293,47 @@ | ||
293 | 293 | $csrfid = P2Util::getCsrfId(); |
294 | 294 | $hr = P2View::getHrHtmlK(); |
295 | 295 | |
296 | - $show_flag = false; | |
296 | + $favitas = BrdCtl::readFavItas(); | |
297 | 297 | |
298 | - if (file_exists($_conf['favita_path']) and $lines = file($_conf['favita_path'])) { | |
298 | + if ($favitas) { | |
299 | 299 | echo '<ul id="home"><li class="group">お気に入り一覧</li>'; |
300 | 300 | echo '<a class="tbutton" href="editfavita_i.php">編集</a>'; |
301 | 301 | // echo '<ul><li><a href="editfavita.php?b=k">編集</a></li><li class="group">お気に入り一覧</li>'; |
302 | 302 | $i = 0; |
303 | - foreach ($lines as $l) { | |
303 | + foreach ($favitas as $favita) { | |
304 | 304 | $i++; |
305 | - $l = rtrim($l); | |
306 | - if (preg_match("/^\t?(.+)\t(.+)\t(.+)$/", $l, $matches)) { | |
307 | - $itaj = rtrim($matches[3]); | |
308 | - $attr = array(); | |
309 | - $key_num_st = ''; | |
310 | 305 | |
311 | - if ($i <= 9) { | |
312 | - $attr[$_conf['accesskey_for_k']] = $i; | |
313 | - $key_num_st = "$i."; | |
314 | - } | |
306 | + extract($favita); // $host, $bbs, $itaj | |
307 | + | |
308 | + $attr = array(); | |
309 | + $key_num_st = ''; | |
315 | 310 | |
316 | - $atag = P2View::tagA( | |
317 | - UriUtil::buildQueryUri($_conf['subject_php'], | |
318 | - array( | |
319 | - 'host' => $matches[1], | |
320 | - 'bbs' => $matches[2], | |
321 | - 'itaj_en' => base64_encode($itaj), | |
322 | - UA::getQueryKey() => UA::getQueryValue() | |
323 | - ) | |
324 | - ), | |
325 | - hs($itaj), | |
326 | - $attr | |
327 | - ); | |
328 | - | |
329 | - if (UA::isIPhoneGroup()) { | |
330 | - echo '<li>' . $atag . '</li>'; | |
331 | - } else { | |
332 | - echo $atag . '<br>'; | |
333 | - } | |
334 | - | |
335 | - // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$matches[1]}&bbs={$matches[2]}&setfavita=0&csrfid={$csrfid}&view=favita{$_conf['k_at_a']}">削</a>] | |
336 | - $show_flag = true; | |
311 | + if ($i <= 9) { | |
312 | + $attr[$_conf['accesskey_for_k']] = $i; | |
313 | + $key_num_st = "$i."; | |
337 | 314 | } |
315 | + | |
316 | + $atag = P2View::tagA( | |
317 | + UriUtil::buildQueryUri($_conf['subject_php'], | |
318 | + array( | |
319 | + 'host' => $host, | |
320 | + 'bbs' => $bbs, | |
321 | + 'itaj_en' => base64_encode($itaj), | |
322 | + UA::getQueryKey() => UA::getQueryValue() | |
323 | + ) | |
324 | + ), | |
325 | + hs($itaj), | |
326 | + $attr | |
327 | + ); | |
328 | + | |
329 | + if (UA::isIPhoneGroup()) { | |
330 | + echo '<li>' . $atag . '</li>'; | |
331 | + } else { | |
332 | + echo $atag . '<br>'; | |
333 | + } | |
334 | + | |
335 | + // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$host}&bbs={$bbs}&setfavita=0&csrfid={$csrfid}&view=favita{$_conf['k_at_a']}">削</a>] | |
336 | + | |
338 | 337 | } |
339 | 338 | if (UA::isIPhoneGroup()) { |
340 | 339 | ?></ul><?php |
@@ -341,7 +340,7 @@ | ||
341 | 340 | } |
342 | 341 | } |
343 | 342 | |
344 | - if (!$show_flag) { | |
343 | + if (!$favitas) { | |
345 | 344 | ?><p>お気に板はまだないようだ</p><?php |
346 | 345 | } |
347 | 346 | } |
@@ -246,7 +246,7 @@ | ||
246 | 246 | if (!$aThreadList->spmode || $aThreadList->spmode == "news" and (strlen($GLOBALS['word_fm']) > 0)) { |
247 | 247 | |
248 | 248 | $aThread->setThreadPathInfo($aThread->host, $aThread->bbs, $aThread->key); |
249 | - | |
249 | + | |
250 | 250 | // マッチしなければスキップ |
251 | 251 | if (!_matchSbFilter($aThread)) { |
252 | 252 | unset($aThread); |
@@ -360,6 +360,7 @@ | ||
360 | 360 | // 倉庫はオンラインを含まない |
361 | 361 | if ($aThreadList->spmode == 'soko') { |
362 | 362 | unset($aThread); |
363 | + $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('subthre_check'); | |
363 | 364 | continue; |
364 | 365 | |
365 | 366 | } elseif ($aThreadList->spmode == 'taborn') { |
@@ -470,8 +471,7 @@ | ||
470 | 471 | } |
471 | 472 | } |
472 | 473 | |
473 | - // {{{ 新着ソートの便宜上 (未取得スレッドの)unum をセット調整 | |
474 | - | |
474 | + // 新着ソートの便宜上 (未取得スレッドの)unum をセット調整 | |
475 | 475 | if (!isset($aThread->unum)) { |
476 | 476 | if (in_array($aThreadList->spmode, array('recent', 'res_hist', 'taborn'))) { |
477 | 477 | $aThread->unum = -0.1; |
@@ -480,8 +480,6 @@ | ||
480 | 480 | } |
481 | 481 | } |
482 | 482 | |
483 | - // }}} | |
484 | - | |
485 | 483 | // 勢いのセット |
486 | 484 | $aThread->setDayRes(); |
487 | 485 |
@@ -512,7 +510,7 @@ | ||
512 | 510 | } |
513 | 511 | |
514 | 512 | // ソート |
515 | -_sortThreads($aThreadList); | |
513 | +$aThreadList->sortThreads(!empty($_REQUEST['rsort'])); | |
516 | 514 | |
517 | 515 | //=============================================================== |
518 | 516 | // HTMLプリント |
@@ -529,10 +527,8 @@ | ||
529 | 527 | foreach ($aThreadList->threads as $at) { |
530 | 528 | $at->torder = $soko_torder++; |
531 | 529 | $newthreads[] = $at; |
532 | - unset($at); | |
533 | 530 | } |
534 | - $aThreadList->threads =& $newthreads; | |
535 | - unset($newthreads); | |
531 | + $aThreadList->threads = $newthreads; | |
536 | 532 | } |
537 | 533 | } |
538 | 534 |
@@ -547,11 +543,11 @@ | ||
547 | 543 | $newthreads = array(); |
548 | 544 | for ($i = $disp_navi['from']; $i <= $disp_navi['end']; $i++) { |
549 | 545 | if ($aThreadList->threads[$i-1]) { |
550 | - $newthreads[] =& $aThreadList->threads[$i-1]; | |
546 | + $newthreads[] = $aThreadList->threads[$i-1]; | |
551 | 547 | } |
552 | 548 | } |
553 | - $aThreadList->threads =& $newthreads; | |
554 | - unset($newthreads); | |
549 | + $aThreadList->threads = $newthreads; | |
550 | + | |
555 | 551 | $aThreadList->num = sizeof($aThreadList->threads); |
556 | 552 | |
557 | 553 | // }}} |
@@ -641,74 +637,6 @@ | ||
641 | 637 | } |
642 | 638 | |
643 | 639 | /** |
644 | - * スレ一覧($aThreadList->threads)をソートする | |
645 | - * | |
646 | - * @return void | |
647 | - */ | |
648 | -function _sortThreads(&$aThreadList) | |
649 | -{ | |
650 | - global $_conf; | |
651 | - | |
652 | - $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort'); | |
653 | - | |
654 | - if ($aThreadList->threads) { | |
655 | - if (!empty($GLOBALS['wakati_words'])) { | |
656 | - $GLOBALS['now_sort'] = 'title'; | |
657 | - usort($aThreadList->threads, 'cmp_similarity'); | |
658 | - | |
659 | - } elseif ($GLOBALS['now_sort'] == 'midoku') { | |
660 | - if ($aThreadList->spmode == 'soko') { | |
661 | - usort($aThreadList->threads, 'cmp_key'); | |
662 | - } else { | |
663 | - usort($aThreadList->threads, 'cmp_midoku'); | |
664 | - } | |
665 | - | |
666 | - } elseif ($GLOBALS['now_sort'] == 'res') { | |
667 | - usort($aThreadList->threads, 'cmp_res'); | |
668 | - | |
669 | - } elseif ($GLOBALS['now_sort'] == 'title') { | |
670 | - usort($aThreadList->threads, 'cmp_title'); | |
671 | - | |
672 | - } elseif ($GLOBALS['now_sort'] == 'ita') { | |
673 | - usort($aThreadList->threads, 'cmp_ita'); | |
674 | - | |
675 | - } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') { | |
676 | - if ($_conf['cmp_dayres_midoku']) { | |
677 | - usort($aThreadList->threads, 'cmp_dayres_midoku'); | |
678 | - } else { | |
679 | - usort($aThreadList->threads, 'cmp_dayres'); | |
680 | - } | |
681 | - | |
682 | - } elseif ($GLOBALS['now_sort'] == 'bd') { | |
683 | - usort($aThreadList->threads, 'cmp_key'); | |
684 | - | |
685 | - } elseif ($GLOBALS['now_sort'] == 'fav') { | |
686 | - usort($aThreadList->threads, 'cmp_fav'); | |
687 | - | |
688 | - } if ($GLOBALS['now_sort'] == 'no') { | |
689 | - if ($aThreadList->spmode == 'soko') { | |
690 | - usort($aThreadList->threads, 'cmp_key'); | |
691 | - } else { | |
692 | - usort($aThreadList->threads, 'cmp_no'); | |
693 | - } | |
694 | - } | |
695 | - } | |
696 | - | |
697 | - // ニュースチェック | |
698 | - if ($aThreadList->spmode == 'news') { | |
699 | - for ($i = 0; $i < $threads_num ; $i++) { | |
700 | - if ($aThreadList->threads) { | |
701 | - $newthreads[] = array_shift($aThreadList->threads); | |
702 | - } | |
703 | - } | |
704 | - $aThreadList->threads = $newthreads; | |
705 | - $aThreadList->num = sizeof($aThreadList->threads); | |
706 | - } | |
707 | - | |
708 | - $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort'); | |
709 | -} | |
710 | - | |
711 | -/** | |
712 | 640 | * p2_setting 記録する |
713 | 641 | * |
714 | 642 | * @return boolean |
@@ -1019,154 +947,6 @@ | ||
1019 | 947 | return false; |
1020 | 948 | } |
1021 | 949 | |
1022 | -//============================================================ | |
1023 | -// ソート関数 | |
1024 | -//============================================================ | |
1025 | - | |
1026 | -/** | |
1027 | - * 新着ソート | |
1028 | - * | |
1029 | - * @return integer | |
1030 | - */ | |
1031 | -function cmp_midoku($a, $b) | |
1032 | -{ | |
1033 | - if ($a->new == $b->new) { | |
1034 | - if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) { | |
1035 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1036 | - } else { | |
1037 | - return ($a->unum < $b->unum) ? 1 : -1; | |
1038 | - } | |
1039 | - } else { | |
1040 | - return ($a->new < $b->new) ? 1 : -1; | |
1041 | - } | |
1042 | -} | |
1043 | - | |
1044 | -/** | |
1045 | - * レス数 ソート | |
1046 | - * | |
1047 | - * @return integer | |
1048 | - */ | |
1049 | -function cmp_res($a, $b) | |
1050 | -{ | |
1051 | - if ($a->rescount == $b->rescount) { | |
1052 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1053 | - } else { | |
1054 | - return ($a->rescount < $b->rescount) ? 1 : -1; | |
1055 | - } | |
1056 | -} | |
1057 | - | |
1058 | -/** | |
1059 | - * タイトル ソート | |
1060 | - * | |
1061 | - * @return integer | |
1062 | - */ | |
1063 | -function cmp_title($a, $b) | |
1064 | -{ | |
1065 | - if ($a->ttitle == $b->ttitle) { | |
1066 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1067 | - } else { | |
1068 | - return strcmp($a->ttitle, $b->ttitle); | |
1069 | - } | |
1070 | -} | |
1071 | - | |
1072 | -/** | |
1073 | - * 板 ソート | |
1074 | - * | |
1075 | - * @return integer | |
1076 | - */ | |
1077 | -function cmp_ita($a, $b) | |
1078 | -{ | |
1079 | - if ($a->host != $b->host) { | |
1080 | - return strcmp($a->host, $b->host); | |
1081 | - } else { | |
1082 | - if ($a->itaj != $b->itaj) { | |
1083 | - return strcmp($a->itaj, $b->itaj); | |
1084 | - } else { | |
1085 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1086 | - } | |
1087 | - } | |
1088 | -} | |
1089 | - | |
1090 | -/** | |
1091 | - * お気に ソート | |
1092 | - * | |
1093 | - * @return integer | |
1094 | - */ | |
1095 | -function cmp_fav($a, $b) | |
1096 | -{ | |
1097 | - if ($a->fav == $b->fav) { | |
1098 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1099 | - } else { | |
1100 | - return strcmp($b->fav, $a->fav); | |
1101 | - } | |
1102 | -} | |
1103 | - | |
1104 | -/** | |
1105 | - * 勢いソート(新着レス優先) | |
1106 | - * | |
1107 | - * @return integer | |
1108 | - */ | |
1109 | -function cmp_dayres_midoku($a, $b) | |
1110 | -{ | |
1111 | - if ($a->new == $b->new) { | |
1112 | - if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) { | |
1113 | - return ($a->dayres < $b->dayres) ? 1 : -1; | |
1114 | - } else { | |
1115 | - return ($a->unum < $b->unum) ? 1 : -1; | |
1116 | - } | |
1117 | - } else { | |
1118 | - return ($a->new < $b->new) ? 1 : -1; | |
1119 | - } | |
1120 | -} | |
1121 | - | |
1122 | -/** | |
1123 | - * 勢いソート | |
1124 | - * | |
1125 | - * @return integer | |
1126 | - */ | |
1127 | -function cmp_dayres($a, $b) | |
1128 | -{ | |
1129 | - if ($a->new == $b->new) { | |
1130 | - return ($a->dayres < $b->dayres) ? 1 : -1; | |
1131 | - } else { | |
1132 | - return ($a->new < $b->new) ? 1 : -1; | |
1133 | - } | |
1134 | -} | |
1135 | - | |
1136 | -/** | |
1137 | - * key ソート | |
1138 | - * | |
1139 | - * @return integer | |
1140 | - */ | |
1141 | -function cmp_key($a, $b) | |
1142 | -{ | |
1143 | - return ($a->key < $b->key) ? 1 : -1; | |
1144 | -} | |
1145 | - | |
1146 | -/** | |
1147 | - * No. ソート | |
1148 | - * | |
1149 | - * @return integer | |
1150 | - */ | |
1151 | -function cmp_no($a, $b) | |
1152 | -{ | |
1153 | - return ($a->torder > $b->torder) ? 1 : -1; | |
1154 | -} | |
1155 | - | |
1156 | -/** | |
1157 | - * 類似性ソート | |
1158 | - * | |
1159 | - * @return integer | |
1160 | - */ | |
1161 | -function cmp_similarity($a, $b) | |
1162 | -{ | |
1163 | - if ($a->similarity == $b->similarity) { | |
1164 | - return ($a->key < $b->key) ? 1 : -1; | |
1165 | - } else { | |
1166 | - return ($a->similarity < $b->similarity) ? 1 : -1; | |
1167 | - } | |
1168 | -} | |
1169 | - | |
1170 | 950 | /* |
1171 | 951 | * Local Variables: |
1172 | 952 | * mode: php |
@@ -74,11 +74,11 @@ | ||
74 | 74 | -moz-box-sizing:border-box; |
75 | 75 | -webkit-box-sizing:border-box; |
76 | 76 | border-bottom:1px solid #2d3642; |
77 | - border-top:1px solid #333333;/*#6d84a2*/ | |
77 | + border-top:1px solid #333;/*#6d84a2*/ | |
78 | 78 | padding: 6px; |
79 | 79 | height:45px; |
80 | 80 | margin: 0; |
81 | - background: #222; /* url(toolbar.png) #6d84a2 repeat-x; */ | |
81 | + background: #333; /* url(toolbar.png) #6d84a2 repeat-x; */ | |
82 | 82 | } |
83 | 83 | |
84 | 84 | /* ツールバーの真ん中の文字 read_new_i */ |
@@ -19,7 +19,7 @@ | ||
19 | 19 | text-overflow: ellipsis; |
20 | 20 | text-decoration: none; |
21 | 21 | white-space: nowrap; |
22 | - background: #333; border-radius: 5px; | |
22 | + background: #444; border-radius: 5px; | |
23 | 23 | /* background: none; |
24 | 24 | -webkit-border-image: url(toolButton.png) 0 5 0 5; */ |
25 | 25 | display:block; |
@@ -33,7 +33,7 @@ | ||
33 | 33 | font-family: Helvetica; |
34 | 34 | border-width: 0 8px 0 14px; |
35 | 35 | /* background: #333; border-radius: 5px; min-width:46px; text-align:center */ |
36 | - background: none; | |
36 | + background: none; | |
37 | 37 | -webkit-border-image: url(backButton.png?14011419) 0 8 0 14; |
38 | 38 | } |
39 | 39 |
@@ -62,7 +62,8 @@ | ||
62 | 62 | width: auto; max-width: 88px; |
63 | 63 | /* font-family: Helvetica; */ |
64 | 64 | border-width:0 8px 0 14px; |
65 | - background: #333; border-radius: 5px; min-width:46px; text-align:center; left: 59px; padding-right: 4px; padding-left: 4px; | |
65 | + /* background: #555; */ | |
66 | + border-radius: 5px; min-width:46px; text-align:center; left: 59px; padding-right: 4px; padding-left: 4px; | |
66 | 67 | /* -webkit-border-image:url(backButton.png) 0 8 0 14; */ |
67 | 68 | } |
68 | 69 |
@@ -165,8 +166,8 @@ | ||
165 | 166 | |
166 | 167 | #footToolbar { |
167 | 168 | /* background-image: url(footback.png); */ |
168 | - background-color:#111; | |
169 | - opacity:0.8; | |
169 | + background-color:#333; | |
170 | + /* opacity:0.8; */ | |
170 | 171 | width:100%; |
171 | 172 | padding: 0; |
172 | 173 | margin:0; |
@@ -213,16 +214,16 @@ | ||
213 | 214 | background-position: -54px 0; |
214 | 215 | opacity:0.2; |
215 | 216 | } |
216 | -.footbar > span.new {background-position: -107px 0;} | |
217 | -.footbar > span.new:hover {background-position: -107px -50px;} | |
218 | -.footbar > span.new_disabled { | |
217 | +.footbar > span#newButton {background-position: -107px 0;} | |
218 | +/* .footbar > span#newButton:hover {background-position: -107px -50px;} */ | |
219 | +.footbar > span.newButton_disabled { | |
219 | 220 | background-position: -107px 0; |
220 | 221 | opacity:0.2; |
221 | 222 | } |
222 | -.footbar > span.res {background-position: -160px 0;} | |
223 | -.footbar > span.res:hover {background-position: -160px -50px;} | |
224 | -.footbar > span.other {background-position: -212px 0;} | |
225 | -.footbar > span.other:hover {background-position: -212px -50px;} | |
223 | +.footbar > span#writeButton {background-position: -160px 0;} | |
224 | +.footbar > span#writeButton:hover {background-position: -160px -50px;} | |
225 | +.footbar > span#etcButoon {background-position: -212px 0;} | |
226 | +.footbar > span#etcButoon:hover {background-position: -212px -50px;} | |
226 | 227 | .footbar > span.next {background-position: -264px 0;} |
227 | 228 | .footbar > span.next:hover {background-position: -264px -50px;} |
228 | 229 | .footbar > span.next_disabled { |
@@ -241,8 +242,8 @@ | ||
241 | 242 | .footbar > span.build:hover {background-position: -422px -50px;} |
242 | 243 | |
243 | 244 | /* 新着まとめ読み */ |
244 | -.footbar > span.matome {background-position: -475px 0;} | |
245 | -.footbar > span.matome:hover {background-position: -475px -50px;} | |
245 | +.footbar > span.matomeButton {background-position: -475px 0;} | |
246 | +/* .footbar > span.matomeButton:hover {background-position: -475px -50px;} */ | |
246 | 247 | |
247 | 248 | /* フッタツール その他のメニューポップアップ */ |
248 | 249 | #footbarEtc { |
@@ -63,10 +63,10 @@ | ||
63 | 63 | -moz-box-sizing: border-box; |
64 | 64 | -webkit-box-sizing: border-box; |
65 | 65 | border-bottom: 1px solid #2d3642; |
66 | - border-top: 1px solid #000000; /* 初期値 #6d84a2 */ | |
66 | + border-top: 1px solid #333; /* 初期値 #6d84a2 */ | |
67 | 67 | padding: 6px; |
68 | 68 | height: 45px; |
69 | - background: #222; /* url(toolbar.png) #6d84a2 repeat-x; */ | |
69 | + background: #333; /* url(toolbar.png) #6d84a2 repeat-x; */ | |
70 | 70 | } |
71 | 71 | |
72 | 72 |