diff -urN p2ex-050119-0217.orig/p2/conf/conf_user_ex.php p2ex-050119-0217.status/p2/conf/conf_user_ex.php
--- p2ex-050119-0217.orig/p2/conf/conf_user_ex.php 2005-01-19 02:17:50.000000000 +0900
+++ p2ex-050119-0217.status/p2/conf/conf_user_ex.php 2005-01-19 15:57:44.000000000 +0900
@@ -461,6 +461,29 @@
// }}}
/* ---------------------------------------------------------------------- */
+// {{{ status
+
+/**
+ * ステータス表示
+ * 各所にステータス表示を追加する。
+ */
+
+// スレを表示する際に、処理時間を表示する(する:1, しない:0)
+$_exconf['status']['processtime'] = 1; // (1)
+
+// スレを表示する際に、datのサイズを表示する(する:1, しない:0)
+$_exconf['status']['datsize'] = 1; // (1)
+
+// スレを単独表示する際に、datに加えてdatdirのサイズを表示する(する:1, しない:0)
+$_exconf['status']['datdirsize'] = 0; // (0)
+
+// スレッド一覧でBirthdayの代わりにdatサイズを表示 (する:1, しない:0)
+$_exconf['status']['sb_show_datsize'] = 1; // (0)
+
+// }}}
+/*
+----------------------------------------------------------------------
+*/
// {{{ etc.
/**
diff -urN p2ex-050119-0217.orig/p2/lib/expack/status/datdirsize.inc.php p2ex-050119-0217.status/p2/lib/expack/status/datdirsize.inc.php
--- p2ex-050119-0217.orig/p2/lib/expack/status/datdirsize.inc.php 1970-01-01 09:00:00.000000000 +0900
+++ p2ex-050119-0217.status/p2/lib/expack/status/datdirsize.inc.php 2005-01-19 16:00:37.000000000 +0900
@@ -0,0 +1,48 @@
+
diff -urN p2ex-050119-0217.orig/p2/lib/expack/status/datsize.inc.php p2ex-050119-0217.status/p2/lib/expack/status/datsize.inc.php
--- p2ex-050119-0217.orig/p2/lib/expack/status/datsize.inc.php 1970-01-01 09:00:00.000000000 +0900
+++ p2ex-050119-0217.status/p2/lib/expack/status/datsize.inc.php 2005-01-19 15:57:44.000000000 +0900
@@ -0,0 +1,22 @@
+
diff -urN p2ex-050119-0217.orig/p2/lib/expack/status/process_time.inc.php p2ex-050119-0217.status/p2/lib/expack/status/process_time.inc.php
--- p2ex-050119-0217.orig/p2/lib/expack/status/process_time.inc.php 1970-01-01 09:00:00.000000000 +0900
+++ p2ex-050119-0217.status/p2/lib/expack/status/process_time.inc.php 2005-01-19 15:57:44.000000000 +0900
@@ -0,0 +1,22 @@
+
diff -urN p2ex-050119-0217.orig/p2/lib/read_footer.inc.php p2ex-050119-0217.status/p2/lib/read_footer.inc.php
--- p2ex-050119-0217.orig/p2/lib/read_footer.inc.php 2005-01-19 02:17:51.000000000 +0900
+++ p2ex-050119-0217.status/p2/lib/read_footer.inc.php 2005-01-19 16:02:06.000000000 +0900
@@ -126,6 +126,28 @@
GOTO;
+ if($_exconf['status']['processtime'] || $_exconf['status']['datsize']){
+ $status_ht="
\n\t";
+ if($_exconf['status']['datsize']){
+ // 現在読んでいるスレの.dat容量
+ require_once(P2EX_LIBRARY_DIR . '/status/datsize.inc.php');
+ $status_ht .= "dat: ".getthread_dir($host, $bbs, $key)."KB";
+ if($_exconf['status']['datdirsize']){
+ // dataディレクトリの総容量
+ require_once(P2EX_LIBRARY_DIR . '/status/datdirsize.inc.php');
+ $status_ht .= " / ".getdirfile($datdir)."MB";
+ }
+ }
+ if($_exconf['status']['processtime']){
+ // プロセスタイム(完了までに要した時間)
+ if($_exconf['status']['datsize']){
+ $status_ht .=" | ";
+ }
+ require_once(P2EX_LIBRARY_DIR . '/status/process_time.inc.php');
+ $status_ht .= "CPU : " . getprocess_time( $CPU_start ) . " sec";
+ }
+ $status_ht.="\n
\n";
+ }
// ■プリント
echo <<
-{$res_form_ht_pb}
+{$status_ht}{$res_form_ht_pb}
EOP;
if ($diedat_msg) {
echo "
";
diff -urN p2ex-050119-0217.orig/p2/lib/sb_print.inc.php p2ex-050119-0217.status/p2/lib/sb_print.inc.php
--- p2ex-050119-0217.orig/p2/lib/sb_print.inc.php 2005-01-19 02:17:51.000000000 +0900
+++ p2ex-050119-0217.status/p2/lib/sb_print.inc.php 2005-01-19 15:57:44.000000000 +0900
@@ -10,7 +10,7 @@
*/
function sb_print($aThreadList)
{
- global $_conf, $browser, $subject_php, $sb_view, $p2_setting, $STYLE;
+ global $_conf, $_exconf, $browser, $subject_php, $sb_view, $p2_setting, $STYLE;
if (!$aThreadList->threads) {
print " 該当サブジェクトはなかったぽ |
";
@@ -109,7 +109,11 @@
echo "勢い | ";
}
// Birthday
- echo "Birthday | ";
+ if ($_exconf['status']['sb_show_datsize']) {
+ echo "KB | ";
+ }else{
+ echo "Birthday | ";
+ }
//お気に入り
if ($_conf['sb_show_fav'] && $aThreadList->spmode != "taborn") {
echo "☆ | ";
@@ -335,9 +339,16 @@
$ikioi_ht = "".$dayres_st." | ";
}
- // Birthday
- $birthday = date("y/m/d", $aThread->key); // (y/m/d H:i)
- $birth_ht = "{$birthday} | ";
+ if($_exconf['status']['sb_show_datsize']){
+ //スレサイズ
+ require_once(P2EX_LIBRARY_DIR . '/status/datsize.inc.php');
+ $thread_size = getthread_dir( $aThread->host, $aThread->bbs, $aThread->key);
+ $thread_size_ht = "{$thread_size} | ";
+ }else{
+ // Birthday
+ $birthday = date("y/m/d", $aThread->key); // (y/m/d H:i)
+ $birth_ht = "{$birthday} | ";
+ }
//====================================================================================
// スレッド一覧 table ボディ HTMLプリント
@@ -356,6 +367,7 @@
$spd_ht
$ikioi_ht
$birth_ht
+ $thread_size_ht
$fav_ht
\n\n";
diff -urN p2ex-050119-0217.orig/p2/read.php p2ex-050119-0217.status/p2/read.php
--- p2ex-050119-0217.orig/p2/read.php 2005-01-19 02:17:53.000000000 +0900
+++ p2ex-050119-0217.status/p2/read.php 2005-01-19 15:57:44.000000000 +0900
@@ -5,6 +5,9 @@
/* vim: set fileencoding=sjis autoindent noexpandtab ts=4 sw=4 sts=0: */
/* mi: charset=Shift_JIS */
+//プロセス開始時間記録
+$CPU_start=microtime();
+
require_once 'conf/conf.php'; //基本設定読込
require_once(P2_LIBRARY_DIR . '/thread.class.php'); //スレッドクラス読込
require_once(P2_LIBRARY_DIR . '/threadread.class.php'); //スレッドリードクラス読込
diff -urN p2ex-050119-0217.orig/p2/read_new.php p2ex-050119-0217.status/p2/read_new.php
--- p2ex-050119-0217.orig/p2/read_new.php 2005-01-19 02:17:53.000000000 +0900
+++ p2ex-050119-0217.status/p2/read_new.php 2005-01-19 15:57:44.000000000 +0900
@@ -5,6 +5,9 @@
/* vim: set fileencoding=sjis autoindent noexpandtab ts=4 sw=4 sts=0: */
/* mi: charset=Shift_JIS */
+//プロセス開始時間記録
+$CPU_start=microtime();
+
require_once 'conf/conf.php'; // 設定
require_once(P2_LIBRARY_DIR . '/p2util.class.php'); // p2用のユーティリティクラス
require_once(P2_LIBRARY_DIR . '/threadlist.class.php'); // スレッドリスト クラス
@@ -397,6 +400,16 @@
元スレ
EOTOOLBAR;
+ if($_exconf['status']['datsize'] ){
+ // 現在読んでいるスレの.dat容量を取得する
+ require_once(P2EX_LIBRARY_DIR . '/status/datsize.inc.php');
+ $thread_size = getthread_dir( $aThread->host, $aThread->bbs, $aThread->key) ." KB";
+ $thread_size_ht = <<
+ dat : {$thread_size}
+ \n
+EOT;
+ }
// レスのすばやさ
$spd_ht = "";
if ($spd_st = $aThread->getTimePerRes() and $spd_st != "-") {
@@ -417,7 +430,7 @@
▲
-
+ {$thread_size_ht}
EOP;
@@ -460,8 +473,19 @@
$newthre_num++;
if (!$aThreadList->num) {
- echo "新着レスはないぽ";
- echo "
";
+ echo "新着レスはないぽ\n
\n";
+}
+
+if( $_exconf['status']['processtime'] ){
+ // プロセスタイム完了までに要した時間を取得する
+ require_once(P2EX_LIBRARY_DIR . '/status/process_time.inc.php');
+ $process_time = getprocess_time( $CPU_start ) ." sec";
+ echo <<
+ CPU : {$process_time}
+\n
+EOP;
}
echo <<