Révision | 47a91f7becd0c6c44b20f3b73a69e2669e11fbd3 (tree) |
---|---|
l'heure | 2014-12-30 21:03:15 |
Auteur | Kana Koda <kodakana@user...> |
Commiter | Kana Koda |
はてブ投稿機能を廃止/トビラにキーワード一覧を戻す/スパム対策の調整/リリースの準備。
@@ -2,7 +2,7 @@ This document is written in Japanese(UTF-8). | ||
2 | 2 | |
3 | 3 | #YANMAH2:Yet ANother Mobile Accelerated HatenaHaiku |
4 | 4 | |
5 | - (c)2012 YANMAH2 project: http://yanmah2.sourceforge.jp/ | |
5 | + (c)2014 YANMAH2 project: http://yanmah2.sourceforge.jp/ | |
6 | 6 | |
7 | 7 | ##これは何か |
8 | 8 |
@@ -68,7 +68,6 @@ $login_notice = <<<EOL | ||
68 | 68 | <dl> |
69 | 69 | <dt>read_public</dt><dd>タイムラインの読み込みに使用します。</dd> |
70 | 70 | <dt>write_public</dt><dd>投稿と星を付けるために使用します。</dd> |
71 | - <dt>write_private</dt><dd>はてなブックマークがプライベートに設定されている場合、{$product_name_abbr} からの追加機能を使うときに必要です。</dd> | |
72 | 71 | </dl> |
73 | 72 | </li> |
74 | 73 | <li>セッション Cookie / サーバ側セッションデータの有効期間は {$session_cookie_expire} / {$session_file_lifetime} 秒に設定されています。</li> |
@@ -425,34 +425,34 @@ if ($entries_mode == 'keyword_timeline' || $entries_mode == 'keyword_users'){ | ||
425 | 425 | } |
426 | 426 | // var_dump($status_0); |
427 | 427 | if (preg_match("/^{$http_url_regexp}$/u", $object_key)){ |
428 | - if (preg_match("/&/u", $object_key)){ | |
429 | - $echo = $echo . '<p>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> を<a href="mailto:b@hatena.ne.jp?body='.rawurlencode(rawurldecode($object_key)).'">メールではてなブックマークに追加する。</a></p>'; | |
430 | - } else { | |
431 | - $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
432 | - $echo = $echo . '<label>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> をはてなブックマークに追加する。</label><br />'; | |
433 | - $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
434 | - $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
435 | - $echo = $echo . '<input type="hidden" name="url" value="'.$get_keyword.'" />'; | |
436 | - $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
437 | - $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
438 | - $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="URL をはてなブックマークに追加する。" />'; | |
439 | - $echo = $echo . '</form>'; | |
428 | +// if (preg_match("/&/u", $object_key)){ | |
429 | +// $echo = $echo . '<p>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> を<a href="mailto:b@hatena.ne.jp?body='.rawurlencode(rawurldecode($object_key)).'">メールではてなブックマークに追加する。</a></p>'; | |
430 | +// } else { | |
431 | +// $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
432 | +// $echo = $echo . '<label>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> をはてなブックマークに追加する。</label><br />'; | |
433 | +// $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
434 | +// $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
435 | +// $echo = $echo . '<input type="hidden" name="url" value="'.$get_keyword.'" />'; | |
436 | +// $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
437 | +// $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
438 | +// $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="URL をはてなブックマークに追加する。" />'; | |
439 | +// $echo = $echo . '</form>'; | |
440 | 440 | // echo "..."; |
441 | - } | |
441 | +// } | |
442 | 442 | } elseif (preg_match("/^(asin:)([[:alnum:]])+$/u", $object_key)){ |
443 | 443 | $asin = preg_replace("/^(asin:)([[:alnum:]]+)$/u", "\${2}", $object_key); |
444 | 444 | $echo = $echo . '<p class="to-amazon"><a href="'.'http://www.amazon.co.jp/gp/aw/d.html/?a='.$asin.'" class="external-link">'.$object_title.' を Amazon.co.jp で見る。</a></p>'; |
445 | 445 | } elseif (preg_match("/^id:[a-zA-Z1234567890]{1}[-_a-zA-Z1234567890@]{1,30}[a-zA-Z1234567890]{1} *$/u", $object_key)){ |
446 | 446 | } else { |
447 | - $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
448 | - $echo = $echo . '<label>このハイクキーワードをはてなブックマークに追加する。</label><br />'; | |
449 | - $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
450 | - $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
451 | - $echo = $echo . '<input type="hidden" name="url" value="http://'.$haiku_host.'/keyword/'.htmlspecialchars($get_keyword, ENT_QUOTES).'" />'; | |
452 | - $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
453 | - $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
454 | - $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="このハイクキーワードをはてなブックマークに追加する。" />'; | |
455 | - $echo = $echo . '</form>'; | |
447 | +// $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
448 | +// $echo = $echo . '<label>このハイクキーワードをはてなブックマークに追加する。</label><br />'; | |
449 | +// $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
450 | +// $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
451 | +// $echo = $echo . '<input type="hidden" name="url" value="http://'.$haiku_host.'/keyword/'.htmlspecialchars($get_keyword, ENT_QUOTES).'" />'; | |
452 | +// $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
453 | +// $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
454 | +// $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="このハイクキーワードをはてなブックマークに追加する。" />'; | |
455 | +// $echo = $echo . '</form>'; | |
456 | 456 | } |
457 | 457 | } |
458 | 458 | } |
@@ -256,19 +256,19 @@ EOL; | ||
256 | 256 | $echo = $echo . '</dd>'; |
257 | 257 | } |
258 | 258 | $echo = $echo . "</div>\n"; |
259 | -if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE){ | |
260 | - if (isset($get_entry) && isset($get_user)){ | |
261 | - $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
262 | - $echo = $echo . '<label for="bcomment">このエントリをはてなブックマークに追加する。</label><br />'; | |
263 | - $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
264 | - $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
265 | - $echo = $echo . '<input type="hidden" name="url" value="http://'.$haiku_host.'/'.$get_user.'/'.$get_entry.'" />'; | |
266 | - $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
267 | - $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
268 | - $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="このエントリをはてなブックマークに追加する。" />'; | |
269 | - $echo = $echo . '</form>'; | |
270 | - } | |
271 | -} | |
259 | +// if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE){ | |
260 | +// if (isset($get_entry) && isset($get_user)){ | |
261 | +// $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n"; | |
262 | +// $echo = $echo . '<label for="bcomment">このエントリをはてなブックマークに追加する。</label><br />'; | |
263 | +// $echo = $echo . '<label for="bcomment">コメント:</label>'; | |
264 | +// $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />'; | |
265 | +// $echo = $echo . '<input type="hidden" name="url" value="http://'.$haiku_host.'/'.$get_user.'/'.$get_entry.'" />'; | |
266 | +// $echo = $echo . '<input type="hidden" name="posting" value="hateb" />'; | |
267 | +// $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />'; | |
268 | +// $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="このエントリをはてなブックマークに追加する。" />'; | |
269 | +// $echo = $echo . '</form>'; | |
270 | +// } | |
271 | +// } | |
272 | 272 | ?> |
273 | 273 | <?php |
274 | 274 | $navi_paging = FALSE; |
@@ -36,8 +36,8 @@ if ((isset($entry_processor_mode) && ($entry_processor_mode == 'users' || $entry | ||
36 | 36 | } |
37 | 37 | $dict[] = array("{$val->user->id}" => "{$entry_body}"); |
38 | 38 | } |
39 | - if (($entries_mode == 'default' || $entries_mode == 'album') && | |
40 | - preg_match("/(^{$http_url_regexp}$)/u", "{$val->keyword}")){ $spam = $spam + 1; return; } | |
39 | +// if (($entries_mode == 'default' || $entries_mode == 'album') && | |
40 | +// preg_match("/(^{$http_url_regexp}$)/u", "{$val->keyword}")){ $spam = $spam + 1; return; } | |
41 | 41 | if (preg_match("/^(id:{1})([[:alpha:]]{1}[-_a-zA-Z1234567890]{1,30}[[:alnum:]]{1})$/u", $val->keyword)) { |
42 | 42 | $keyword_title = $val->keyword; |
43 | 43 | } else { |
@@ -83,7 +83,7 @@ EOL; | ||
83 | 83 | $echo = $echo . "<li><a href=\"./entries.php?user={$_SESSION['hatenaid']}"; |
84 | 84 | $echo = $echo . "\" class=\"user\">{$_SESSION['hatenaid']} のエントリー</a></li>\n"; |
85 | 85 | $echo = $echo . "<li><a href=\"./entries.php?favours={$_SESSION['hatenaid']}"; |
86 | - $echo = $echo . "\" class=\"user\">{$_SESSION['hatenaid']} のお気に入り</a></li>\n"; | |
86 | + $echo = $echo . "\" class=\"user\">{$_SESSION['hatenaid']} の一覧</a></li>\n"; | |
87 | 87 | $echo = $echo . "<li><a href=\"{$relogin}\" class=\"user\">再認証</a></li>"; |
88 | 88 | $echo = $echo . "</ul>\n</div>\n"; |
89 | 89 | $echo = $echo . <<<EOL |
@@ -107,10 +107,12 @@ EOL; | ||
107 | 107 | <input type="submit" value="検索" /> |
108 | 108 | EOL; |
109 | 109 | $echo = $echo . '</form></li>'; |
110 | - $echo = $echo . '<li><a href="./keywords.php?user=' . $_SESSION['hatenaid']; | |
111 | - $echo = $echo . '" class="keyword">' . $_SESSION['hatenaid'] . ' のお気に入りキーワード</a></li>' . "\n"; | |
110 | + $echo = $echo . '<li><a href="./keywords.php?user=' . $_SESSION['hatenaid']; | |
111 | + $echo = $echo . '" class="keyword">' . $_SESSION['hatenaid'] . ' のお気に入りキーワード</a></li>' . "\n"; | |
112 | + $request_url = "{$api_base_url}keywords/hot.xml".'?without_related_keywords=1'; | |
113 | + require_once 'keywords_processor.php'; | |
112 | 114 | $echo = $echo . '<li><a href="./keywords.php'; |
113 | - $echo = $echo . '" class="keyword">キーワード一覧</a></li>'; | |
115 | + $echo = $echo . '" class="keyword">キーワード一覧</a></li>'."\n"; | |
114 | 116 | $echo = $echo . "</ul>\n</div>\n"; |
115 | 117 | } else { |
116 | 118 | $echo = $echo . "<div class=\"index-content\">\n<ul>"; |
@@ -12,7 +12,7 @@ if (isset($_GET['with'])){ | ||
12 | 12 | } elseif ($_GET['with'] == 'haiku') { |
13 | 13 | $authorize = 'http://www.hatena.ne.jp/mobile/oauth/authorize'; |
14 | 14 | // $myjson = 'http://n.hatena.com/applications/my.json'; |
15 | - $reqtoken = getRequest('https://www.hatena.com/oauth/initiate', $callback, 'read_public,write_public,write_private', $conkey, $conkey_sec); | |
15 | + $reqtoken = getRequest('https://www.hatena.com/oauth/initiate', $callback, 'read_public,write_public', $conkey, $conkey_sec); | |
16 | 16 | // var_dump($reqtoken); |
17 | 17 | if (isset($reqtoken['stat']) && $reqtoken['stat'] !== TRUE){ |
18 | 18 | $error = "<p>ログインの初期処理に失敗しました。</p>\n<blockquote>{$reqtoken['error']}</blockquote>"; |
@@ -5,9 +5,9 @@ | ||
5 | 5 | ?> |
6 | 6 | <?php defined("HELLO") or exit(); ?> |
7 | 7 | <?php |
8 | -$product_name_abbr = "YANMAH2 〜season 2〜"; | |
8 | +$product_name_abbr = "YANMAH2"; | |
9 | 9 | $product_name_full = "Yet ANother Mobile Accelerated Hatena-Haiku"; |
10 | -$product_version = "1.9906-beta"; | |
10 | +$product_version = "season2 2.0"; | |
11 | 11 | $project_name = "YANMAH2 project"; |
12 | 12 | $project_url = "http://yanmah2.sourceforge.jp/"; |
13 | 13 | $user_agent = $product_name_abbr . '/' . $product_version . ' ' . $_SERVER['SERVER_NAME']; |