Revisión | 3b1e44b44d2e1507ea96d2a29077cd383befaf95 (tree) |
---|---|
Tiempo | 2005-02-13 12:12:47 |
Autor | henoheno <henoheno> |
Commiter | henoheno |
Cleanup HTTP header related, etc
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?php |
2 | 2 | // PukiWiki - Yet another WikiWikiWeb clone. |
3 | -// $Id: keitai.skin.php,v 1.7 2005/02/13 03:06:02 henoheno Exp $ | |
3 | +// $Id: keitai.skin.php,v 1.8 2005/02/13 03:12:47 henoheno Exp $ | |
4 | 4 | // |
5 | 5 | // Skin for Embedded devices |
6 | 6 |
@@ -14,7 +14,7 @@ $rw = ! PKWK_READONLY; | ||
14 | 14 | |
15 | 15 | // Output HTTP headers |
16 | 16 | pkwk_headers_sent(); |
17 | -if(LANG == 'ja') { | |
17 | +if(TRUE) { | |
18 | 18 | // Force Shift JIS encode for Japanese embedded browsers and devices |
19 | 19 | header('Content-Type: text/html; charset=Shift_JIS'); |
20 | 20 | $title = mb_convert_encoding($title, 'SJIS', SOURCE_ENCODING); |
@@ -26,7 +26,7 @@ if(LANG == 'ja') { | ||
26 | 26 | // Make 1KByte spare (for header, etc) |
27 | 27 | $max_size = --$max_size * 1024; |
28 | 28 | |
29 | -// IMG タグ(画像)を文字列に置換 | |
29 | +// Replace IMG tags (= images) with character strings | |
30 | 30 | // With ALT option |
31 | 31 | $body = preg_replace('#(<div[^>]+>)?(<a[^>]+>)?<img[^>]*alt="([^"]+)"[^>]*>(?(2)</a>)(?(1)</div>)#i', '[$3]', $body); |
32 | 32 | // Without ALT option |
@@ -54,16 +54,16 @@ if ($rw) { | ||
54 | 54 | $navi[] = '<a href="' . $script . '?' . $menubar . '" ' . $accesskey . '="4">4.Menu</a>'; |
55 | 55 | $navi[] = '<a href="' . $link['recent'] . '" ' . $accesskey . '="5">5.Recent</a>'; |
56 | 56 | |
57 | -// 前/次のブロック | |
57 | +// Previous / Next block | |
58 | 58 | if ($pagecount > 1) { |
59 | 59 | $prev = $pageno - 1; |
60 | 60 | $next = $pageno + 1; |
61 | 61 | if ($pageno > 0) { |
62 | - $navi[] = "<a href=\"$script?cmd=read&page=$r_page&p=$prev\" $accesskey=\"7\">7.Prev</a>"; | |
62 | + $navi[] = '<a href="' . $script . '?cmd=read&page=' . $r_page . '&p=' . $prev . '" ' . $accesskey . '="7">7.Prev</a>'; | |
63 | 63 | } |
64 | - $navi[] = "$next/$pagecount "; | |
64 | + $navi[] = $next . '/' . $pagecount . ' '; | |
65 | 65 | if ($pageno < $lastpage) { |
66 | - $navi[] = "<a href=\"$script?cmd=read&page=$r_page&p=$next\" $accesskey=\"8\">8.Next</a>"; | |
66 | + $navi[] = '<a href="' . $script . '?cmd=read&page=' . $r_page . '&p=' . $next . '" ' . $accesskey . '="8">8.Next</a>'; | |
67 | 67 | } |
68 | 68 | } |
69 | 69 |