GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge branch 'p2ex-hacks' · unpush/p2-php@4153c39

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • conf
    • conf.inc.php
  • css
    • iphone.css
  • js
    • iphone.js
  • lib
    • ResHist.php
    • read_footer_i.inc.php
    • read_header_i.inc.php
    • sb_print_k.inc.php
    • toolbar_i.inc.php
  • post.php
  • read_new_k.php
  • spm_k.php
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎conf/conf.inc.php‎

Copy file name to clipboardExpand all lines: conf/conf.inc.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// バージョン情報
88
$_conf = array(
99
'p2version' => '1.7.29+1.8.x', // rep2のバージョン
10-
'p2expack' => '100817.0000', // 拡張パックのバージョン
10+
'p2expack' => '100817.2020', // 拡張パックのバージョン
1111
'p2name' => 'expack', // rep2の名前
1212
'p2custom' => 'e53c9d7', // カスタムバージョン
1313
);
Collapse file

‎css/iphone.css‎

Copy file name to clipboardExpand all lines: css/iphone.css
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,15 @@ div.respop {
298298
top: 0;
299299
left: 0;
300300
margin: 0;
301-
padding: 12px 6px 0 14px;
301+
padding: 12px 0 0 14px;
302302
}
303303

304304
div.respop > div.res {
305305
margin: 0 0 8px 0 !important;
306306
background-color: rgba(255, 255, 250, 0.95) !important;
307307
border: rgba(108, 108, 108, 0.8) solid 1px !important;
308-
-webkit-border-radius: 8px;
309-
border-radius: 8px;
308+
-webkit-border-bottom-left-radius: 8px;
309+
border-bottom-left-radius: 8px;
310310
-webkit-box-shadow: rgba(0, 0, 0, 0.7) 0 2px 5px;
311311
box-shadow: rgba(0, 0, 0, 0.7) 0 2px 5px;
312312
}
Collapse file

‎js/iphone.js‎

Copy file name to clipboardExpand all lines: js/iphone.js
+40-70Lines changed: 40 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -255,71 +255,6 @@ iutil.setLabelAction = function(contextNode) {
255255
}
256256
};
257257

258-
// }}}
259-
// {{{ setHashScrool()
260-
261-
/**
262-
* ページ内リンクのクリックをスクロールにする
263-
*
264-
* あまり動きがよくなかったので封印。
265-
*
266-
* @param {Node|String} contextNode
267-
* @return void
268-
*/
269-
iutil.setHashScrool = function(contextNode) {
270-
var anchors, anchor, targetId, targetElement, i, l, expr;
271-
272-
switch (typeof contextNode) {
273-
case 'string':
274-
contextNode = document.getElementById(contextNode);
275-
break;
276-
case 'undefined':
277-
contextNode = document.body;
278-
break;
279-
}
280-
if (!contextNode) {
281-
return;
282-
}
283-
284-
expr = './/a[starts-with(@href, "#") and ('
285-
+ '@href = "#header" or @href = "#footer" or @href = "#top" or @href = "#bottom"'
286-
+ ' or contains(concat(" ", @class, " "), " button ")'
287-
+ ')]';
288-
anchors = document.evaluate(expr,
289-
contextNode, null,
290-
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
291-
l = anchors.snapshotLength;
292-
293-
for (i = 0; i < l; i++) {
294-
anchor = anchors.snapshotItem(i);
295-
targetId = anchor.getAttribute('href').substring(1);
296-
targetElement = document.getElementById(targetId);
297-
if (!targetElement) {
298-
continue;
299-
}
300-
301-
anchor.onclick = (function (element) {
302-
return function (event) {
303-
var from, to, d, e, f, g;
304-
305-
from = iutil.getPageY(event || window.event);
306-
to = element.offsetTop;
307-
d = to - from;
308-
e = 30;
309-
f = 30;
310-
311-
for (g = 1; g < f; g++) {
312-
window.setTimeout(window.scrollTo, e * g,
313-
0, from + Math.floor(d * Math.sqrt(g / f)));
314-
}
315-
window.setTimeout(window.scrollTo, e * g, 0, to);
316-
317-
return false;
318-
};
319-
})(targetElement);
320-
}
321-
};
322-
323258
// }}}
324259
// {{{ setAccessKeys()
325260

@@ -767,6 +702,42 @@ iutil.setHoverable = function(contextNode) {
767702
};
768703

769704
// ]}}
705+
// {{{ toolbarScrollTo()
706+
707+
/**
708+
* ツールバーボタンでオブジェクトの位置を取得し、そこまでスクロールする
709+
*
710+
* @param {Element} element
711+
* @param {Event} event
712+
* @return {Boolean}
713+
*/
714+
iutil.toolbarScrollTo = function(element, event) {
715+
var url, offset, id, target;
716+
717+
url = element.href;
718+
offset = url.indexOf('#');
719+
if (offset === -1) {
720+
return true;
721+
}
722+
723+
iutil.stopEvent(event);
724+
725+
id = url.slice(offset + 1);
726+
target = document.getElementById(id);
727+
if (target) {
728+
offset = target.offsetTop;
729+
// 1つだけ外側の要素も考慮する
730+
if (target.offsetParent) {
731+
offset += target.offsetParent.offsetTop;
732+
}
733+
// +1 はボーダー幅
734+
window.scrollTo(0, offset + 1);
735+
}
736+
737+
return false;
738+
};
739+
740+
// }}}
770741
// {{{ toolbarShowHide()
771742

772743
/**
@@ -784,7 +755,7 @@ iutil.toolbarShowHide = function(element, event) {
784755
url = element.href;
785756
offset = url.indexOf('#');
786757
if (offset !== -1) {
787-
id = url.substring(offset + 1, url.length);
758+
id = url.slice(offset + 1);
788759
target = document.getElementById(id);
789760
if (target) {
790761
if (target.style.display === 'block') {
@@ -1414,13 +1385,12 @@ document.addEventListener('DOMContentLoaded', function(event) {
14141385
document.removeEventListener(event.type, arguments.callee, false);
14151386

14161387
if (typeof window.iphone_js_no_modification === 'undefined' || !window.iphone_js_no_modification) {
1417-
// リンクにイベントハンドラを登録する
1388+
// 外部リンクにイベントハンドラを登録する
14181389
iutil.modifyExternalLink(document.body);
14191390

1420-
// labelにイベントハンドラを登録する
1391+
// ラベルやボタンにイベントハンドラを登録する
14211392
if (iutil.iphone) {
14221393
iutil.setLabelAction(document.body);
1423-
//iutil.setHashScrool(document.body);
14241394
iutil.setHoverable(document.body);
14251395
}
14261396

@@ -1440,7 +1410,7 @@ document.addEventListener('DOMContentLoaded', function(event) {
14401410
// ロケーションバーを隠す
14411411
if (typeof window.iui !== 'undefined') {
14421412
window.scrollTo(0, 1);
1443-
} else if (!window.location.hash.length && iutil.getScrollX() < 1) {
1413+
} else if (!window.location.hash.length && iutil.getScrollY() < 1) {
14441414
window.scrollTo(0, 1);
14451415
}
14461416
}, false);
Collapse file

‎lib/ResHist.php‎

Copy file name to clipboardExpand all lines: lib/ResHist.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,11 @@ public function showArticlesK()
271271
$ls_q = "&amp;ls={$lf}-";
272272
$footer_q = "#r{$lf}";
273273
}
274+
if ($_conf['iphone']) {
275+
$footer_q = '';
276+
}
274277
$time = time();
275-
$href_ht = $_conf['read_php'] . "?host=" . $a_res->host . "&amp;bbs=" . $a_res->bbs . "&amp;key=" . $a_res->key . $ls_q . "{$_conf['k_at_a']}&amp;nt={$time}={$footer_q}";
278+
$href_ht = $_conf['read_php'] . "?host=" . $a_res->host . "&amp;bbs=" . $a_res->bbs . "&amp;key=" . $a_res->key . $ls_q . "{$_conf['k_at_a']}&amp;nt={$time}{$footer_q}";
276279
}
277280

278281
// 大きさ制限
Collapse file

‎lib/read_footer_i.inc.php‎

Copy file name to clipboardExpand all lines: lib/read_footer_i.inc.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
// 新着
6464
echo '<td>';
6565
if (!$aThread->diedat) {
66-
$escaped_url = "{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls={$aThread->rescount}-n&amp;nt={$newtime}{$_conf['k_at_a']}#r{$aThread->rescount}";
66+
$escaped_url = "{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls={$aThread->rescount}-n&amp;nt={$newtime}{$_conf['k_at_a']}";
6767
echo toolbar_i_standard_button('img/glyphish/icons2/01-refresh.png', '新着', $escaped_url);
6868
} else {
6969
echo toolbar_i_disabled_button('img/glyphish/icons2/01-refresh.png', '新着');
Collapse file

‎lib/read_header_i.inc.php‎

Copy file name to clipboardExpand all lines: lib/read_header_i.inc.php
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
$read_navi_previous_url = '';
4040
} else {
4141
$read_navi_previous_url = "{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls={$before_rnum}-{$aThread->resrange['start']}n{$offline_q}{$_conf['k_at_a']}";
42-
/*if ($before_rnum != 1) {
43-
$read_navi_previous_url .= "#r{$before_rnum}";
44-
}*/
4542
}
4643

4744
// }}}
@@ -62,9 +59,6 @@
6259
$read_navi_next_url = '';
6360
} else {
6461
$read_navi_next_url = "{$_conf['read_php']}?{$host_bbs_key_q}&amp;ls={$aThread->resrange['to']}-{$after_rnum}n{$offline_q}&amp;nt={$newtime}{$_conf['k_at_a']}";
65-
if ($aThread->resrange['to'] == $aThread->rescount) {
66-
$read_navi_next_url .= "#r{$aThread->rescount}";
67-
}
6862
}
6963

7064
// }}}
Collapse file

‎lib/sb_print_k.inc.php‎

Copy file name to clipboardExpand all lines: lib/sb_print_k.inc.php
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,26 +94,26 @@ function sb_print_k($aThreadList)
9494
$i = 0;
9595
foreach ($aThreadList->threads as $aThread) {
9696
$i++;
97-
$midoku_ari = "";
98-
$anum_ht = ""; //#r1
97+
$midoku_ari = '';
98+
$anum_ht = ''; //#r1
9999
$htm = array('ita' => '', 'rnum' => '', 'unum' => '', 'sim' => '');
100100

101101
$bbs_q = '&amp;bbs=' . $aThread->bbs;
102102
$key_q = '&amp;key=' . $aThread->key;
103103
$host_bbs_key_q = 'host=' . $aThread->host . $bbs_q . $key_q;
104104
$offline_q = '';
105105

106-
if ($aThreadList->spmode!="taborn") {
107-
if (!$aThread->torder) {$aThread->torder=$i;}
106+
if ($aThreadList->spmode!='taborn') {
107+
if (!$aThread->torder) {
108+
$aThread->torder = $i;
109+
}
108110
}
109111

110112
// 新着レス数 =============================================
111113
// 既得済み
112114
if ($show_unum && $aThread->isKitoku()) {
113115
$htm['unum'] = "{$aThread->unum}";
114116

115-
$anum_ht = sprintf('#r%d', min($aThread->rescount, $aThread->rescount - $aThread->nunum + 1 - $_conf['respointer']));
116-
117117
// iPhone用
118118
if ($_conf['iphone']) {
119119
$classunum = 'num unread';
@@ -132,6 +132,8 @@ function sb_print_k($aThreadList)
132132

133133
$htm['unum'] = "<span class=\"{$classunum}\">{$htm['unum']}</span>";
134134
} else {
135+
$anum_ht = sprintf('#r%d', min($aThread->rescount, $aThread->rescount - $aThread->nunum + 1 - $_conf['respointer']));
136+
135137
// 新着あり
136138
if ($aThread->unum >= 1) {
137139
$midoku_ari = true;
Collapse file

‎lib/toolbar_i.inc.php‎

Copy file name to clipboardExpand all lines: lib/toolbar_i.inc.php
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function _toolbar_i_button($icon, $label, $uri, $attrs = '')
1818
{
1919
global $_conf;
2020

21-
if (strncmp($attrs, ' ', 1) === 0) {
21+
if (strlen($attrs) && strncmp($attrs, ' ', 1) !== 0) {
2222
$attrs = ' ' . $attrs;
2323
}
2424

@@ -52,7 +52,12 @@ function _toolbar_i_button($icon, $label, $uri, $attrs = '')
5252
*/
5353
function toolbar_i_standard_button($icon, $label, $uri)
5454
{
55-
return _toolbar_i_button($icon, $label, $uri);
55+
if (strlen($uri) > 1 && strncmp($uri, '#', 1) === 0) {
56+
$attrs = ' onclick="return iutil.toolbarScrollTo(this, event);"';
57+
} else {
58+
$attrs = '';
59+
}
60+
return _toolbar_i_button($icon, $label, $uri, $attrs);
5661
}
5762

5863
// }}}
Collapse file

‎post.php‎

Copy file name to clipboardExpand all lines: post.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@
123123
$location_ht = "{$_conf['subject_php']}?host={$host}&amp;bbs={$bbs}{$_conf['k_at_a']}";
124124
} else {
125125
unset($post[$subject_k]);
126-
$location_ht = "{$_conf['read_php']}?host={$host}&amp;bbs={$bbs}&amp;key={$key}&amp;ls={$rescount}-&amp;refresh=1&amp;nt={$newtime}{$_conf['k_at_a']}#r{$rescount}";
126+
$location_ht = "{$_conf['read_php']}?host={$host}&amp;bbs={$bbs}&amp;key={$key}&amp;ls={$rescount}-&amp;refresh=1&amp;nt={$newtime}{$_conf['k_at_a']}";
127+
if (!$_conf['iphone']) {
128+
$location_ht .= "#r{$rescount}";
129+
}
127130
}
128131

129132
if ($_POST['savedraft']) {
Collapse file

‎read_new_k.php‎

Copy file name to clipboardExpand all lines: read_new_k.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ function readNew($aThread)
461461
<h2 class="ttitle">{$aThread->ttitle_hd} {$read_header_itaj_ht}</h2>
462462
EOP;
463463
$read_header_ht .= '<div class="mover">';
464-
$read_header_ht .= toolbar_i_standard_button('img/gp2-down.png', '', "#ntt_bt{$newthre_num}");
464+
$read_header_ht .= toolbar_i_standard_button('img/gp2-down.png', '', sprintf('#ntt%d', $newthre_num + 1));
465465
$read_header_ht .= '</div>';
466466

467467
$info_ht = P2Util::getInfoHtml();
@@ -519,25 +519,25 @@ function readNew($aThread)
519519
}
520520

521521
$read_footer_ht = <<<EOP
522-
<div class="ntoolbar mtoolbar mtoolbar_bottom" id="ntt_bt{$newthre_num}">
522+
<div class="ntoolbar mtoolbar mtoolbar_bottom" id="ntt_btm{$newthre_num}">
523523
<table><tbody><tr>
524524
EOP;
525-
// ツール
525+
// 情報
526526
$read_footer_ht .= '<td>';
527-
$escaped_url = "spm_k.php?{$host_bbs_key_q}&amp;ls={$aThread->ls}&amp;spm_default={$aThread->resrange['to']}&amp;from_read_new=1{$_conf['k_at_a']}";
528-
$read_footer_ht .= toolbar_i_opentab_button('img/glyphish/icons2/20-gear2.png', '', $escaped_url);
527+
$escaped_url = "info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}";
528+
$read_footer_ht .= toolbar_i_opentab_button('img/gp5-info.png', '', $escaped_url);
529529
$read_footer_ht .= '</td>';
530530
// 表示範囲
531531
$read_footer_ht .= "<td colspan=\"3\"><span class=\"large\">{$read_range_ht}</span></td>";
532-
// 情報
532+
// ツール
533533
$read_footer_ht .= '<td>';
534-
$escaped_url = "info.php?{$host_bbs_key_q}{$ttitle_en_q}{$_conf['k_at_a']}";
535-
$read_footer_ht .= toolbar_i_opentab_button('img/gp5-info.png', '', $escaped_url);
534+
$escaped_url = "spm_k.php?{$host_bbs_key_q}&amp;ls={$aThread->ls}&amp;spm_default={$aThread->resrange['to']}{$_conf['k_at_a']}";
535+
$read_footer_ht .= toolbar_i_opentab_button('img/glyphish/icons2/20-gear2.png', '', $escaped_url);
536536
$read_footer_ht .= '</td>';
537537
// タイトル等
538538
$read_footer_ht .= <<<EOP
539539
</tr></tbody></table>
540-
<div class="ttitle"><a href="{$_conf['read_php']}?{$host_bbs_key_q}&amp;offline=1&amp;rescount={$aThread->rescount}{$_conf['k_at_a']}#r{$aThread->rescount}" target="_blank">{$aThread->ttitle_hd}</a> {$toolbar_itaj_ht}</div>
540+
<div class="ttitle"><a href="{$_conf['read_php']}?{$host_bbs_key_q}&amp;offline=1&amp;rescount={$aThread->rescount}{$_conf['k_at_a']}" target="_blank">{$aThread->ttitle_hd}</a> {$toolbar_itaj_ht}</div>
541541
<div class="mover">
542542
EOP;
543543
$read_footer_ht .= toolbar_i_standard_button('img/gp1-up.png', '', "#ntt{$newthre_num}");
@@ -616,7 +616,7 @@ function readNew($aThread)
616616
echo '<p class="empty">新着レスはないぽ</p>';
617617
}
618618

619-
echo '<div class="ntoolbar" id="footer"><table><tbody><tr>';
619+
echo "<div class=\"ntoolbar\" id=\"footer\"><table id=\"ntt{$newthre_num}\"><tbody><tr>";
620620

621621
// トップに戻る
622622
echo '<td>';

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.