[P2-php-svn] [740] expack:

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 12月 20日 (日) 02:38:58 JST


Revision: 740
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=740
Author:   rsk
Date:     2009-12-20 02:38:58 +0900 (Sun, 20 Dec 2009)

Log Message:
-----------
expack:
- 書き込みライブプレビューのsageボタンが効かなくなる
  ことがある問題を修正。
- 縦3ペインモードでツールバーのブロックを
  インラインブロックとして表示するように変更。
- 常にセッションを使うように変更。
- GoogleのURLゲートウェイに対応。
- ImageCache2 ダウンローダにポップアップウインドウを
  自動で閉じるURLパラメータを追加。

Modified Paths:
--------------
    p2ex/trunk/conf/conf.inc.php
    p2ex/trunk/conf/conf_admin.inc.php
    p2ex/trunk/conf/conf_user_def.inc.php
    p2ex/trunk/ic2_getter.php
    p2ex/trunk/index.php
    p2ex/trunk/iv2.php
    p2ex/trunk/js/dpreview.js
    p2ex/trunk/lib/Login.php
    p2ex/trunk/lib/P2Util.php
    p2ex/trunk/lib/expack/ic2/templates/ic2g.tpl.html
    p2ex/trunk/lib/login_first.inc.php
    p2ex/trunk/lib/post_options_loader.inc.php
    p2ex/trunk/lib/read_footer.inc.php
    p2ex/trunk/lib/read_header.inc.php
    p2ex/trunk/lib/sb_header.inc.php
    p2ex/trunk/read_new.php
    p2ex/trunk/style/read_css.inc

Added Paths:
-----------
    p2ex/trunk/style/narrow_toolbar_css.inc


-------------- next part --------------
Modified: p2ex/trunk/conf/conf.inc.php
===================================================================
--- p2ex/trunk/conf/conf.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/conf/conf.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -15,6 +15,18 @@
 
 define('P2_VERSION_ID', sprintf('%u', crc32($_conf['p2ua'])));
 
+/*
+ * ’ʏí‚̓ZƒbƒVƒ‡ƒ“ƒtƒ@ƒCƒ‹‚̃ƒbƒN‘Ò‚¿‚ð‹É—Í’Z‚­‚·‚邽‚ß
+ * ƒ†[ƒU[”FØŒã‚·‚®‚ɃZƒbƒVƒ‡ƒ“•Ï”‚̕ύX‚ðƒRƒ~ƒbƒg‚·‚éB
+ * ”FØŒã‚àƒZƒbƒVƒ‡ƒ“•Ï”‚ð•ÏX‚·‚éƒXƒNƒŠƒvƒg‚Å‚Í
+ * ‚±‚̃tƒ@ƒCƒ‹‚ð“ǂݍž‚Þ‘O‚É
+ *  define('P2_SESSION_CLOSE_AFTER_AUTHENTICATION', 0);
+ * ‚Æ‚·‚éB
+ */
+if (!defined('P2_SESSION_CLOSE_AFTER_AUTHENTICATION')) {
+    define('P2_SESSION_CLOSE_AFTER_AUTHENTICATION', 1);
+}
+
 // {{{ ƒOƒ[ƒoƒ‹•Ï”‚ð‰Šú‰»
 
 $_info_msg_ht = ''; // ƒ†[ƒU’Ê’m—p î•ñƒƒbƒZ[ƒWHTML
@@ -897,44 +909,34 @@
 // –¼‘O‚́AƒZƒbƒVƒ‡ƒ“ƒNƒbƒL[‚ð”jŠü‚·‚é‚Æ‚«‚Ì‚½‚߂ɁAƒZƒbƒVƒ‡ƒ“—˜—p‚Ì—L–³‚ÉŠÖ‚í‚炸Ý’è‚·‚é
 session_name('PS');
 
-if (defined('P2_FORCE_USE_SESSION') || $_conf['expack.misc.multi_favs']) {
-    $_conf['use_session'] = 1;
-}
-
 $_conf['sid_at_a'] = '';
 
-if ($_conf['use_session'] == 1 or ($_conf['use_session'] == 2 && !$_COOKIE['cid'])) {
-    require_once $P2_LIB_DIR_S . 'Session.php';
+require_once $P2_LIB_DIR_S . 'Session.php';
 
-    // {{{ ƒZƒbƒVƒ‡ƒ“ƒf[ƒ^•Û‘¶ƒfƒBƒŒƒNƒgƒŠ‚ðƒ`ƒFƒbƒN
+// {{{ ƒZƒbƒVƒ‡ƒ“ƒf[ƒ^•Û‘¶ƒfƒBƒŒƒNƒgƒŠ‚ðƒ`ƒFƒbƒN
 
-    if ($_conf['session_save'] == 'p2' and session_module_name() == 'files') {
-        if (!is_dir($_conf['session_dir'])) {
-            FileCtl::mkdir_for($_conf['session_dir'] . '/dummy_filename');
-        } elseif (!is_writable($_conf['session_dir'])) {
-            p2die("ƒZƒbƒVƒ‡ƒ“ƒf[ƒ^•Û‘¶ƒfƒBƒŒƒNƒgƒŠ ({$_conf['session_dir']}) ‚ɏ‘‚«ž‚ÝŒ ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB");
-        }
+if ($_conf['session_save'] == 'p2' and session_module_name() == 'files') {
+    if (!is_dir($_conf['session_dir'])) {
+        FileCtl::mkdir_for($_conf['session_dir'] . '/dummy_filename');
+    } elseif (!is_writable($_conf['session_dir'])) {
+        p2die("ƒZƒbƒVƒ‡ƒ“ƒf[ƒ^•Û‘¶ƒfƒBƒŒƒNƒgƒŠ ({$_conf['session_dir']}) ‚ɏ‘‚«ž‚ÝŒ ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB");
+    }
 
-        session_save_path($_conf['session_dir']);
+    session_save_path($_conf['session_dir']);
+}
 
-        // session.save_path ‚̃pƒX‚̐[‚³‚ª2‚æ‚è‘å‚«‚¢‚ƃK[ƒxƒbƒWƒRƒŒƒNƒVƒ‡ƒ“‚ªs‚í‚ê‚È‚¢‚Ì‚Å
-        // Ž©‘O‚ŃK[ƒxƒbƒWƒRƒŒƒNƒVƒ‡ƒ“‚·‚é
-        P2Util::session_gc();
-    }
+// }}}
 
-    // }}}
+$_p2session = new Session();
 
-    $_p2session = new Session();
-
-    if (!$support_cookies) {
-        if (ini_get('session.use_only_cookies')) {
-            p2die('Session unavailable', 'php.ini ‚Å session.use_only_cookies ‚ª On ‚É‚È‚Á‚Ä‚¢‚Ü‚·B');
-        }
-        if (!ini_get('session.use_trans_sid')) {
-            output_add_rewrite_var(session_name(), session_id());
-            $_conf['sid_at_a'] = '&' . rawurldecode(session_name()) . '=' . rawurldecode(session_id());
-        }
+if (!$support_cookies) {
+    if (ini_get('session.use_only_cookies')) {
+        p2die('Session unavailable', 'php.ini ‚Å session.use_only_cookies ‚ª On ‚É‚È‚Á‚Ä‚¢‚Ü‚·B');
     }
+    if (!ini_get('session.use_trans_sid')) {
+        output_add_rewrite_var(session_name(), session_id());
+        $_conf['sid_at_a'] = '&' . rawurldecode(session_name()) . '=' . rawurldecode(session_id());
+    }
 }
 
 // }}}

Modified: p2ex/trunk/conf/conf_admin.inc.php
===================================================================
--- p2ex/trunk/conf/conf_admin.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/conf/conf_admin.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -60,9 +60,6 @@
 // ----------------------------------------------------------------------
 // {{{ ŠeŽíÝ’è
 
-// ƒZƒbƒVƒ‡ƒ“‚ð—˜—pi‚·‚é:1, ‚µ‚È‚¢:0, cookie”FØ‚ª—˜—p‚³‚ê‚Ä‚¢‚È‚¢Žž‚Ì‚Ý‚·‚é:2j
-$_conf['use_session'] = 2;          // (2)
-
 // sessionƒf[ƒ^‚Ì•Û‘¶ŠÇ— (PHPƒfƒtƒHƒ‹ƒg:'', p2‚Ńtƒ@ƒCƒ‹ŠÇ—:'p2')
 $_conf['session_save'] = 'p2';      // ('p2')
 

Modified: p2ex/trunk/conf/conf_user_def.inc.php
===================================================================
--- p2ex/trunk/conf/conf_user_def.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/conf/conf_user_def.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -312,10 +312,17 @@
 // ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒQ[ƒgB
 // i’¼Ú:"", p2 ime(Ž©“®“]‘—):"p2", p2 ime(Žè“®“]‘—):"p2m", p2 ime(p‚Ì‚ÝŽè“®“]‘—):"p2pm",
 //   r.p(Ž©“®“]‘—1•b):"ex", r.p(Ž©“®“]‘—0•b):"exq", r.p(Žè“®“]‘—):"exm", r.p(p‚Ì‚ÝŽè“®“]‘—):"expm"j
-$conf_user_def['through_ime'] = "expm"; // ("expm") 
+$conf_user_def['through_ime'] = "google"; // ("google") 
 $conf_user_sel['through_ime'] = array(
-    '' => '’¼Ú', 'p2' => 'p2 ime(Ž©“®“]‘—)', 'p2m' => 'p2 ime(Žè“®“]‘—)', 'p2pm' => 'p2 ime(p‚Ì‚ÝŽè“®“]‘—)',
-    'ex' => 'r.p(Ž©“®“]‘—1•b)', 'exq' => 'r.p(Ž©“®“]‘—0•b)', 'exm' => 'r.p(Žè“®“]‘—)', 'expm' => 'r.p(p‚Ì‚ÝŽè“®“]‘—)'
+    ''       => '’¼Ú',
+    'p2'     => 'p2 ime(Ž©“®“]‘—)',
+    'p2m'    => 'p2 ime(Žè“®“]‘—)',
+    'p2pm'   => 'p2 ime(p‚Ì‚ÝŽè“®“]‘—)',
+    'ex'     => 'r.p(Ž©“®“]‘—1•b)',
+    'exq'    => 'r.p(Ž©“®“]‘—0•b)',
+    'exm'    => 'r.p(Žè“®“]‘—)',
+    'expm'   => 'r.p(p‚Ì‚ÝŽè“®“]‘—)',
+    'google' => 'Google',
 );
 
 // ƒQ[ƒg‚ÅŽ©“®“]‘—‚µ‚È‚¢Šg’£ŽqiƒJƒ“ƒ}‹æØ‚è‚ŁAŠg’£Žq‚Ì‘O‚̃sƒŠƒIƒh‚Í•s—vj

Modified: p2ex/trunk/ic2_getter.php
===================================================================
--- p2ex/trunk/ic2_getter.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/ic2_getter.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -36,9 +36,26 @@
 require_once P2EX_LIB_DIR . '/ic2/Thumbnailer.php';
 
 // ƒ|ƒbƒvƒAƒbƒvƒEƒCƒ“ƒhƒEH
-$isPopUp = empty($_GET['popup']) ? 0 : 1;
+if (empty($_GET['popup'])) {
+    $isPopUp = 0;
+    $autoClose = -1;
+} else {
+    $isPopUp = 1;
+    if (array_key_exists('close', $_GET) && is_numeric($_GET['close'])) {
+        $autoClose = (float)$_GET['close'] * 1000.0;
+        if ($autoClose > 0.0) {
+            $autoClose = (int)$autoClose;
+            if ($autoClose == 0) {
+                $autoClose = 1;
+            }
+        } else {
+            $autoClose = -1;
+        }
+    } else {
+        $autoClose = -1;
+    }
+}
 
-
 // }}}
 // {{{ config
 
@@ -55,6 +72,7 @@
     'to'    => 'to',
     'padding' => '',
     'popup'   => $isPopUp,
+    'close'   => $autoClose,
 );
 
 // ƒtƒH[ƒ€‚̌Œè’l
@@ -103,6 +121,7 @@
 // ‰B‚µ—v‘f
 $qfe['detect_hint'] = $qf->addElement('hidden', '_hint');
 $qfe['popup'] = $qf->addElement('hidden', 'popup');
+$qfe['close'] = $qf->addElement('hidden', 'close');
 
 // URL‚ƘA”Ԑݒè
 $qfe['uri']     = $qf->addElement('text', 'uri', 'URL', $_attr_uri);
@@ -371,10 +390,28 @@
 $qf->accept($r);
 $qfObj = $r->toObject();
 
+// “®“IJavaScript
+$js = $qf->getValidationScript();
+$js .= <<<EOS
+<script type="text/javascript">
+// <![CDATA[
+function ic2g_onload()
+{
+\tsetWinTitle();\n
+EOS;
+if ($execDL && $autoClose > 0) {
+    $js .= "\twindow.setTimeout('window.close();', $autoClose);\n";
+}
+$js .= <<<EOS
+}
+// ]]>
+</script>
+EOS;
+
 // •Ï”‚ðAssign
 $flexy->setData('info_msg', $_info_msg_ht);
 $flexy->setData('STYLE', $STYLE);
-$flexy->setData('js', $qf->getValidationScript());
+$flexy->setData('js', $js);
 $flexy->setData('get', $qfObj);
 
 // ƒy[ƒW‚ð•\Ž¦

Modified: p2ex/trunk/index.php
===================================================================
--- p2ex/trunk/index.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/index.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -3,6 +3,8 @@
  * rep2 - ƒCƒ“ƒfƒbƒNƒXƒy[ƒW
  */
 
+define('P2_SESSION_CLOSE_AFTER_AUTHENTICATION', 0);
+
 require_once './conf/conf.inc.php';
 
 $_login->authorize(); //ƒ†[ƒU”FØ
@@ -55,8 +57,17 @@
     }
 
     $sidebar = !empty($_GET['sidebar']);
-    $v3pane  = !empty($_GET['v3pane']);
 
+    if (empty($_GET['v3pane'])) {
+        $v3pane = false;
+        $direction = 'rows';
+        $_SESSION['use_narrow_toolbars'] = false;
+    } else {
+        $v3pane = true;
+        $direction = 'cols';
+        $_SESSION['use_narrow_toolbars'] = true;
+    }
+
     $ptitle = "rep2";
     //======================================================
     // PC—p HTMLƒvƒŠƒ“ƒg

Modified: p2ex/trunk/iv2.php
===================================================================
--- p2ex/trunk/iv2.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/iv2.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -5,8 +5,7 @@
 
 // {{{ p2Šî–{Ý’è“ǂݍž‚Ý&”FØ
 
-define('P2_FORCE_USE_SESSION', 1);
-define('P2_SESSION_NO_CLOSE', 1);
+define('P2_SESSION_CLOSE_AFTER_AUTHENTICATION', 0);
 define('P2_OUTPUT_XHTML', 1);
 define('P2_USE_PEAR_HACK', 1);
 

Modified: p2ex/trunk/js/dpreview.js
===================================================================
--- p2ex/trunk/js/dpreview.js	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/js/dpreview.js	2009-12-19 17:38:58 UTC (rev 740)
@@ -59,7 +59,7 @@
 	f_mail.onkeyup = DPSetMail;
 	f_mail.onchange = DPSetMail;
 	// sageƒ`ƒFƒbƒNƒ{ƒbƒNƒX‚̍XVƒCƒxƒ“ƒgƒnƒ“ƒhƒ‰‚ðÝ’è
-	f_sage.onclick = DPSetMail;
+	f_sage.onclick = DPSetSage;
 	// ƒƒbƒZ[ƒW—“‚̍XVƒCƒxƒ“ƒgƒnƒ“ƒhƒ‰‚ðÝ’è
 	//f_msg.onkeyup = DPSetMsg;
 	f_msg.onchange = DPSetMsg;
@@ -83,9 +83,9 @@
 	}
 	if (boolOnOff) {
 		dpreview_on = true;
-		DPSetName(f_name.value);
-		DPSetMail(f_mail.value);
-		DPSetMsg(f_msg.value);
+		DPSetName();
+		DPSetMail();
+		DPSetMsg();
 		DPSetDate();
 		if (dp_mona) {
 			dp_mona.disabled = false;
@@ -147,6 +147,7 @@
 // ƒ[ƒ‹—“‚ðXV‚·‚é
 function DPSetMail()
 {
+	checkSage();
 	if (!dpreview_on) {
 		return;
 	}
@@ -155,6 +156,17 @@
 }
 
 
+// sageƒ`ƒFƒbƒN
+function DPSetSage()
+{
+	mailSage();
+	if (!dpreview_on) {
+		return;
+	}
+	DPReplaceInnerText('dp_mail', f_mail.value);
+	DPSetDate();
+}
+
 // –{•¶‚ðXV‚·‚é
 function DPSetMsg()
 {

Modified: p2ex/trunk/lib/Login.php
===================================================================
--- p2ex/trunk/lib/Login.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/Login.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -194,8 +194,8 @@
 
         // }}}
 
-        // ”FØŒã‚̓ZƒbƒVƒ‡ƒ“‚ð•Â‚¶‚é
-        if (!defined('P2_SESSION_NO_CLOSE')) {
+        // ƒZƒbƒVƒ‡ƒ“‚ð”FØˆÈŠO‚ÉŽg‚í‚È‚¢ê‡‚͕‚¶‚é
+        if (P2_SESSION_CLOSE_AFTER_AUTHENTICATION) {
             session_write_close();
         }
 

Modified: p2ex/trunk/lib/P2Util.php
===================================================================
--- p2ex/trunk/lib/P2Util.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/P2Util.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -568,6 +568,15 @@
         case 'exm':
             $url_r = $_conf['expack.ime_url'].'?u='.$url_en.'&amp;d=-1';
             break;
+        case 'google':
+            $url_r = 'http://www.google.co.jp/';
+            if ($_conf['ktai'] && !$_conf['iphone']) {
+                $url_r .= 'gwt/x?u=';
+            } else {
+                $url_r .= 'url?q=';
+            }
+            $url_r .= $url_en;
+            break;
         default:
             $url_r = $url;
         }

Modified: p2ex/trunk/lib/expack/ic2/templates/ic2g.tpl.html
===================================================================
--- p2ex/trunk/lib/expack/ic2/templates/ic2g.tpl.html	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/expack/ic2/templates/ic2g.tpl.html	2009-12-19 17:38:58 UTC (rev 740)
@@ -56,7 +56,7 @@
 	<script type="text/javascript" src="js/ic2g.js?{p2vid:h}"></script>
 	{js:h}
 </head>
-<body onload="setWinTitle()">
+<body onload="ic2g_onload()">
 
 <h3 class="thread_title"><a href="{php_self}?popup={isPopUp}">ImageCache2 - ƒ_ƒEƒ“ƒ[ƒ_</a></h3>
 {info_msg:h}

Modified: p2ex/trunk/lib/login_first.inc.php
===================================================================
--- p2ex/trunk/lib/login_first.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/login_first.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -179,27 +179,22 @@
         $hd['form_login_pass'] = '';
     }
 
-    // docomo‚̌ŗL’[––”FØiƒZƒbƒVƒ‡ƒ“—˜—pŽž‚Ì‚Ý—LŒøj
+    // docomo‚̌ŗL’[––”FØ
     $docomo_auth_ht = '';
 
-    //if ($_conf['use_session'] && $_login->user_u && $mobile->isDoCoMo()) {
     if ($mobile->isDoCoMo()) {
-        if ($_conf['use_session']) {
-            if (file_exists($_conf['auth_imodeid_file']) && empty($_SERVER['HTTPS'])) {
-                $docomo_auth_ht .= sprintf('<p><a href="%s?auth_type=imodeid&amp;user=%s&amp;guid=ON">iƒ‚[ƒhID”FØ</a></p>',
-                                           $myname,
-                                           rawurldecode($_login->user_u)
-                                           );
-            }
-            if (file_exists($_conf['auth_docomo_file'])) {
-                $docomo_auth_ht .= sprintf('<p><a href="%s?auth_type=utn&amp;user=%s" utn>’[––ID”FØ</a></p>',
-                                           $myname,
-                                           rawurldecode($_login->user_u)
-                                           );
-            }
-        } else {
-            $docomo_auth_ht = '<p>conf/conf_admin.inc.php ‚ž¯¼®Ý‚ð—˜—p‚·‚é‚悤‚ɐݒè•ÏX‚µ‚Ä‚­‚¾‚³‚¢¡</p>';
+        if (file_exists($_conf['auth_imodeid_file']) && empty($_SERVER['HTTPS'])) {
+            $docomo_auth_ht .= sprintf('<p><a href="%s?auth_type=imodeid&amp;user=%s&amp;guid=ON">iƒ‚[ƒhID”FØ</a></p>',
+                                       $myname,
+                                       rawurldecode($_login->user_u)
+                                       );
         }
+        if (file_exists($_conf['auth_docomo_file'])) {
+            $docomo_auth_ht .= sprintf('<p><a href="%s?auth_type=utn&amp;user=%s" utn>’[––ID”FØ</a></p>',
+                                       $myname,
+                                       rawurldecode($_login->user_u)
+                                       );
+        }
     }
 
     // docomo‚È‚çpassword‚É‚µ‚È‚¢

Modified: p2ex/trunk/lib/post_options_loader.inc.php
===================================================================
--- p2ex/trunk/lib/post_options_loader.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/post_options_loader.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -138,10 +138,12 @@
 
 // PC—p sage checkbox
 if (!$_conf['ktai']) {
-    $on_check_sage = 'onChange="checkSage();"';
+    $on_check_sage = ' onchange="checkSage();"';
     $htm['sage_cb'] = <<<EOP
 <input id="sage" type="checkbox" onclick="mailSage()"><label for="sage">sage</label>
 EOP;
+} else {
+    $on_check_sage = '';
 }
 
 // {{{ 2chœ‘‚«ž‚Ý

Modified: p2ex/trunk/lib/read_footer.inc.php
===================================================================
--- p2ex/trunk/lib/read_footer.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/read_footer.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -116,9 +116,9 @@
     // ¡ƒvƒŠƒ“ƒg
     echo <<<EOP
 <hr>
-<table id="footer" width="100%" style="padding:0px 10px 0px 0px;">
+<table id="footer" class="toolbar">
     <tr>
-        <td align="left">
+        <td class="lblock">
             {$q_ichi}
             <a href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls=all">{$all_st}</a>
             {$read_navi_previous}
@@ -130,13 +130,8 @@
             {$htm['dsize']}
             {$htm['spd']}
         </td>
-        <td align="right">
-            {$htm['p2frame']}
-            {$toolbar_right_ht}
-        </td>
-        <td align="right">
-            <a href="#header">£</a>
-        </td>
+        <td class="rblock">{$htm['p2frame']} {$toolbar_right_ht}</td>
+        <td class="rblock"><a href="#header">£</a></td>
     </tr>
 </table>
 {$res_form_ht_pb}

Modified: p2ex/trunk/lib/read_header.inc.php
===================================================================
--- p2ex/trunk/lib/read_header.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/read_header.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -263,6 +263,12 @@
     </script>\n
 EOHEADER;
 
+if (!empty($_SESSION['use_narrow_toolbars'])) {
+    echo <<<EOP
+    <link rel="stylesheet" type="text/css" href="css.php?css=narrow_toolbar&amp;skin={$skin_en}">\n
+EOP;
+}
+
 echo <<<EOP
 </head>
 <body><div id="popUpContainer"></div>\n
@@ -298,14 +304,10 @@
     // Šù“¾ƒŒƒX‚ª‚È‚¯‚ê‚΃c[ƒ‹ƒo[•\Ž¦
     if (!$aThread->rescount) {
         echo <<<EOP
-<table width="100%" style="padding:0px 0px 10px 0px;">
+<table class="toolbar">
     <tr>
-        <td align="left">
-            &nbsp;
-        </td>
-        <td align="right">
-            {$toolbar_right_ht}
-        </td>
+        <td class="lblock">&nbsp;</td>
+        <td class="rblock">{$toolbar_right_ht}</td>
     </tr>
 </table>
 EOP;
@@ -390,19 +392,14 @@
     echo <<<EOP
 <table{$id_header} width="100%" style="padding:0px 0px 10px 0px;">
     <tr>
-        <td align="left">
+        <td class="lblock">
             <a href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls=all">{$all_st}</a>
             {$read_navi_range}
             {$read_navi_previous_header}
             <a href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls=l{$latest_show_res_num}">{$latest_st}{$latest_show_res_num}</a> {$htm['goto']}
         </td>
-        <td align="right">
-            {$htm['p2frame']}
-            {$toolbar_right_ht}
-        </td>
-        <td align="right">
-            <a href="#footer">¥</a>
-        </td>
+        <td class="rblock">{$htm['p2frame']} {$toolbar_right_ht}</td>
+        <td class="rblock"><a href="#footer">¥</a></td>
     </tr>
 </table>\n
 EOP;

Modified: p2ex/trunk/lib/sb_header.inc.php
===================================================================
--- p2ex/trunk/lib/sb_header.inc.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/lib/sb_header.inc.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -315,6 +315,11 @@
 EOJS;
 }
 
+if (!empty($_SESSION['use_narrow_toolbars'])) {
+    echo <<<EOP
+    <link rel="stylesheet" type="text/css" href="css.php?css=narrow_toolbar&amp;skin={$skin_en}">\n
+EOP;
+}
 
 echo <<<EOP
 </head>

Modified: p2ex/trunk/read_new.php
===================================================================
--- p2ex/trunk/read_new.php	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/read_new.php	2009-12-19 17:38:58 UTC (rev 740)
@@ -216,6 +216,12 @@
     </script>\n
 EOHEADER;
 
+if (!empty($_SESSION['use_narrow_toolbars'])) {
+    echo <<<EOP
+    <link rel="stylesheet" type="text/css" href="css.php?css=narrow_toolbar&amp;skin={$skin_en}">\n
+EOP;
+}
+
 echo <<<EOP
 </head>
 <body><div id="popUpContainer"></div>\n
@@ -485,10 +491,10 @@
 
     // ƒwƒbƒ_•”•ªHTML
     $read_header_ht = <<<EOP
-<table id="ntt{$newthre_num}" width="100%" style="padding:0px 10px 0px 0px;">
+<table id="ntt{$newthre_num}" class="toolbar">
     <tr>
-        <td align="left"><h3 class="thread_title">{$aThread->ttitle_hd}</h3></td>
-        <td align="right">{$prev_thre_ht} {$next_thre_ht}</td>
+        <td class="lblock"><h3 class="thread_title">{$aThread->ttitle_hd}</h3></td>
+        <td class="rblock">{$prev_thre_ht} {$next_thre_ht}</td>
     </tr>
 </table>\n
 EOP;
@@ -597,19 +603,13 @@
 
     // ƒtƒbƒ^•”•ªHTML
     $read_footer_ht = <<<EOP
-        <table width="100%" style="padding:0px 10px 0px 0px;">
-            <tr>
-                <td align="left">
-                    {$res1['body']} | <a href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;offline=1&amp;rescount={$aThread->rescount}#r{$aThread->rescount}">{$aThread->ttitle_hd}</a> | {$dores_ht} {$dsize_ht} {$spd_ht}
-                </td>
-                <td align="right">
-                    {$toolbar_right_ht}
-                </td>
-                <td align="right">
-                    <a href="#ntt{$newthre_num}">£</a>
-                </td>
-            </tr>
-        </table>\n
+<table class="toolbar">
+    <tr>
+        <td class="lblock">{$res1['body']} | <a href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;offline=1&amp;rescount={$aThread->rescount}#r{$aThread->rescount}">{$aThread->ttitle_hd}</a> | {$dores_ht} {$dsize_ht} {$spd_ht}</td>
+        <td class="rblock">{$toolbar_right_ht}</td>
+        <td class="rblock"><a href="#ntt{$newthre_num}">£</a></td>
+    </tr>
+</table>\n
 EOP;
 
     // “§–¾‚ ‚ځ[‚ñ‚Å•\Ž¦‚ª‚È‚¢ê‡‚̓XƒLƒbƒv

Added: p2ex/trunk/style/narrow_toolbar_css.inc
===================================================================
--- p2ex/trunk/style/narrow_toolbar_css.inc	                        (rev 0)
+++ p2ex/trunk/style/narrow_toolbar_css.inc	2009-12-19 17:38:58 UTC (rev 740)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * rep2 - ƒXƒ^ƒCƒ‹Ý’è
+ * for ƒiƒ[Eƒc[ƒ‹ƒo[
+ */
+
+echo <<<EOSTYLE
+
+table.toolbar {
+	display: block;
+	height: auto !important;
+}
+
+table.toolbar > tbody,
+table.toolbar > tbody > tr,
+table.toolbar > tr {
+	display: block;
+}
+
+table.toolbar > tbody > tr > th, table.toolbar > tr > th,
+table.toolbar > tbody > tr > td, table.toolbar > tr > td {
+	display: inline-block;
+}
+
+EOSTYLE;
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: cp932
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
+// vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker:

Modified: p2ex/trunk/style/read_css.inc
===================================================================
--- p2ex/trunk/style/read_css.inc	2009-12-14 12:38:29 UTC (rev 739)
+++ p2ex/trunk/style/read_css.inc	2009-12-19 17:38:58 UTC (rev 740)
@@ -287,6 +287,25 @@
 	cursor: pointer;
 }
 
+/* ƒc[ƒ‹ƒo[ */
+table.toolbar {
+	width: 100%;
+	margin: 0;
+	padding: 0 10px 0 0;
+}
+
+table.toolbar td.lblock {
+	text-align: left;
+} 
+
+table.toolbar td.cblock {
+	text-align: center;
+} 
+
+table.toolbar td.rblock {
+	text-align: right;
+} 
+
 EOSTYLE;
 
 /*



P2-php-svn メーリングリストの案内
Back to archive index