{"id":898,"date":"2006-06-12T05:06:34","date_gmt":"2006-06-11T20:06:34","guid":{"rendered":"http:\/\/a-tak.com\/xoops2\/modules\/wordpress\/2006\/06\/12\/898"},"modified":"2012-08-05T15:21:07","modified_gmt":"2012-08-05T06:21:07","slug":"popular-entry","status":"publish","type":"post","link":"https:\/\/a-tak.com\/blog\/2006\/06\/popular-entry\/","title":{"rendered":"\u30d6\u30ed\u30b0\u306e\u4eba\u6c17\u30a8\u30f3\u30c8\u30ea\u30fc\u306e\u8868\u793a"},"content":{"rendered":"<div id=\"advads-4273471621\" class=\"advads-before-content-placement advads-entity-placement\" style=\"margin-left: auto;margin-right: auto;text-align: center;\"><div class=\"advads-adlabel\">\u5e83\u544a<\/div><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-7585646298782746\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:300px;height:250px;\" \ndata-ad-client=\"ca-pub-7585646298782746\" \ndata-ad-slot=\"6112122906\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><p>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" height=\"255\" alt=\"popularity-entry.png\" src=\"https:\/\/i0.wp.com\/a-tak.com\/blog\/wp-content\/uploads\/attach\/W_Upload\/popularity-entry.png?resize=197%2C255&#038;ssl=1\" width=\"197\" style=\"border:none;\" \/>\n<\/p>\n<p>\n\u3053\u306e\u30d6\u30ed\u30b0\u306e\u4eba\u6c17\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u307e\u305f\u3082\u3084\u3001\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\n<\/p>\n<p><!--more--><\/p>\n<p>\n\u81ea\u5206\u304c\u4f7f\u3063\u3066\u3044\u308b\u306e\u306fXOOPS\u7248\u306eWordPress\u3067\u3059\u3002<br \/>\n\u30ea\u30f3\u30af\u5148\u306e\u6539\u9020\u3067\u3001WordPress\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u8a18\u8ff0\u3059\u308c\u3070\u3001\u4e00\u5fdc\u4eba\u6c17\u8a18\u4e8b\u306f\u51fa\u305b\u305f\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u305b\u306a\u3089\u53f3\u30b5\u30a4\u30c9\u3068\u304b\u306e\u30d6\u30ed\u30c3\u30af\u306b\u8868\u793a\u3057\u305f\u3044\u3002<br \/>\n\u3068\u3053\u308d\u304c\u3001XOOPS\u306e\u30d6\u30ed\u30c3\u30af\u304b\u3089my-hacks.php\u306b\u306f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3055\u305d\u3046(\u305f\u3076\u3093\u3002\u307e\u3060\u3001PHP\u3068\u304bXOOPS\u306e\u4ed5\u7d44\u307f\u304c\u3088\u304f\u308f\u304b\u3063\u3066\u307e\u305b\u3093)\u3002<br \/>\n\u305d\u308c\u3067\u3001\u30a2\u30af\u30bb\u30b9\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u90e8\u5206\u306f\u305d\u306e\u307e\u307e\u4f7f\u3044\u3001\u8868\u793a\u306e\u90e8\u5206\u306f\u72ec\u81ea\u306b\u4f5c\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3061\u306a\u307f\u306b\u30a2\u30af\u30bb\u30b9\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u90e8\u5206\u306fcomments-template.php\u306e\u982d\u306b\u300c&lt;?php add_count($post-&gt;ID); ?&gt;\u300d\u3092\u5165\u308c\u307e\u3057\u305f\u3002\n<\/p>\n<p>\n\u3067\u3001\u8868\u793a\u90e8\u5206\u304c\u3053\u308c\u2193\n<\/p>\n<blockquote>\n<p>\n$conn = mysql_connect(&#8220;localhost&#8221;,&#8221;user&#8221;,&#8221;password&#8221;);<br \/>\nmysql_select_db(&#8220;xoops&#8221;);<br \/>\n$sql = &#8216;select m.postnumber, m.cntaccess ,p.post_title FROM xoops_wp_mostAccessed m INNER JOIN zopps_wp_posts p ON m.postnumber = p.ID ORDER BY m.cntaccess DESC LIMIT 10&#8217;;<br \/>\n$res = mysql_query($sql);\n<\/p>\n<p>\n$rank=0;<br \/>\nwhile ($value = mysql_fetch_assoc($res)) {<br \/>\n&nbsp;$rank = $rank + 1;<br \/>\n&nbsp;echo $rank.&#8221;.&lt;a href=&#8221;https:\/\/a-tak.com\/xoops\/modules\/wordpress\/index.php?p=&#8221;.$value[&#8220;postnumber&#8221;].&#8221;&amp;more=1&amp;c=1&#8243;&gt;&#8221;.$value[&#8220;post_title&#8221;].&#8221;(&#8220;.$value[&#8220;cntaccess&#8221;].&#8221; Hit)&lt;\/a&gt;&lt;br\/&gt;&#8221;;<br \/>\n}\n<\/p>\n<\/blockquote>\n<p>\n\u3053\u308c\u3092\u3001XOOPS\u306e\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af\u306b\u5165\u308c\u3066\u8868\u793a\u3055\u305b\u3066\u307e\u3059\u3002<br \/>\n\u672c\u5f53\u306fXOOPS\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u4ed5\u7d44\u307f\u3092\u4f7f\u3044\u305f\u304b\u3063\u305f\u3051\u3069\u3001\u6b63\u76f4\u3088\u304f\u308f\u304b\u3089\u3093\u304b\u3063\u305f\u306e\u3067\u3001\u72ec\u81ea\u306bSQL\u306b\u30a2\u30af\u30bb\u30b9\u3055\u305b\u3066\u307e\u3059\u3002\n<\/p>\n<p>\n\u3067\u3082\u3001\u305b\u3063\u304b\u304f\u3060\u304b\u3089XOOPS\u306e\u6d41\u5100\u306b\u5f93\u304a\u3046\u3068\u601d\u3063\u3066\u30b0\u30b0\u3063\u305f\u3089\u3001<span class=\"removed_link\" title=\"http:\/\/www.web-learner.com\/modules\/xoops\/index.php\/index.html\">\u3053\u3093\u306a\u30b5\u30a4\u30c8<\/span>\u898b\u3064\u3051\u307e\u3057\u305f\u3002<br \/>\n\u305d\u308c\u3092\u53c2\u8003\u306b\u4f5c\u308a\u76f4\u3057\u305f\u306e\u304c\u3053\u308c\u3002\n<\/p>\n<blockquote>\n<p>\nglobal $xoopsUser,$xoopsDB;<br \/>\n$sql = &#8220;select m.postnumber, m.cntaccess ,p.post_title FROM &#8220;.$xoopsDB-&gt;prefix(&#8216;wp_mostAccessed&#8217;).&#8221; m INNER JOIN &#8220;.$xoopsDB-&gt;prefix(&#8216;wp_posts&#8217;).&#8221; p ON m.postnumber = p.ID ORDER BY m.cntaccess DESC LIMIT 10&#8243;;<br \/>\n$res = $xoopsDB-&gt;query($sql);<br \/>\n$rank=0;<br \/>\nwhile($value = $xoopsDB-&gt;fetchArray($res)){<br \/>\n&nbsp;$rank = $rank + 1;<br \/>\n&nbsp;echo $rank.&#8221;.&lt;a href=&#8221;https:\/\/a-tak.com\/xoops\/modules\/wordpress\/index.php?p=&#8221;.$value[&#8220;postnumber&#8221;].&#8221;&amp;more=1&amp;c=1&#8243;&gt;&#8221;.$value[&#8220;post_title&#8221;].&#8221;(&#8220;.$value[&#8220;cntaccess&#8221;].&#8221; Hit)&lt;\/a&gt;&lt;br\/&gt;&#8221;;<br \/>\n}\n<\/p>\n<\/blockquote>\n<p>\n\u6700\u521d\u3001\u3044\u304f\u3089\u3084\u3063\u3066\u3082\u771f\u3063\u767d\u306a\u30da\u30fc\u30b8\u3057\u304b\u51fa\u306a\u304f\u3066\u3001\u884c\u304d\u8a70\u307e\u308a\u304b\u3051\u3066\u307e\u3057\u305f\u304c\u3001\u300cglobal $xoopsUser,$xoopsDB;\u300d\u306e\u4e00\u884c\u304c\u629c\u3051\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u307e\u3060\u3001\u3088\u304f\u308f\u304b\u3063\u3066\u307e\u305b\u3093\u304c\u3001\u304a\u307e\u3058\u306a\u3044\u7684\u306b\u5165\u308c\u3066\u304a\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u4eca\u306e\u3068\u3053\u308d\u3061\u3083\u3093\u3068\u52d5\u3044\u3066\u308b\u307f\u305f\u3044\u306a\u3093\u3067\u3001\u3088\u3057\u3068\u3057\u3066\u304a\u304d\u307e\u3059\u3002\n<\/p><div id=\"advads-666261402\" class=\"advads-content-placement-after-3rd-paragraph advads-entity-placement\" style=\"margin-left: auto;margin-right: auto;text-align: center;\"><div class=\"advads-adlabel\">\u5e83\u544a<\/div><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-7585646298782746\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:300px;height:250px;\" \ndata-ad-client=\"ca-pub-7585646298782746\" \ndata-ad-slot=\"6112122906\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<p><!--xoops wordpress php--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30d6\u30ed\u30b0\u306e\u4eba\u6c17\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u307e\u305f\u3082\u3084\u3001\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[479],"tags":[9,44],"class_list":["post-898","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-xoops","tag-wordpress","tag-xoops"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/a-tak.com\/blog\/wp-content\/uploads\/2012\/06\/popularity-entry1.png?fit=197%2C255&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/posts\/898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/comments?post=898"}],"version-history":[{"count":0,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/posts\/898\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/media\/5246"}],"wp:attachment":[{"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/media?parent=898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/categories?post=898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a-tak.com\/blog\/wp-json\/wp\/v2\/tags?post=898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}