{"id":993,"date":"2009-02-21T14:35:53","date_gmt":"2009-02-21T05:35:53","guid":{"rendered":"http:\/\/bton.papalabs.net\/?p=993"},"modified":"2009-02-24T15:14:45","modified_gmt":"2009-02-24T06:14:45","slug":"j-bton-s-recent-posts-mu-plugin-for-wordpress-mu%e3%80%80ver2","status":"publish","type":"post","link":"https:\/\/bton.papalabs.net\/?p=993","title":{"rendered":"J. BTON &#8216;s  Recent Posts mu-plugin for WordPress MU\u3000ver.2"},"content":{"rendered":"<p>[<a href=\"http:\/\/bton.papalabs.net\/?p=990\">JAPANESE<\/a>]<\/p>\n<p>Download the code, and FTP-upload the file to \/wp-ontent\/mu-plugin\/. It will work as soon as file uploaded.<\/p>\n<p><em>**FEATURE**<\/em><\/p>\n<blockquote><p>Parameter explanations<br \/>\n$how_many: how many recent posts are being displayed<br \/>\n$how_long: time frame to choose recent posts from (in days)<br \/>\n$cate: category ID to be selected<br \/>\n$limit: how many posts should be displayed from each category<br \/>\n$titleOnly: true (only title of post is displayed) OR false (title of post and name of blog are displayed)<br \/>\n$begin_wrap: customise the start html code to adapt to different themes<br \/>\n$optmask: bitmask for various display options (default: 255)<br \/>\n\u00a0DISPLAY OPTIONS BITMASK<br \/>\n\u00a01;\u00a0 \/\/ gravatar<br \/>\n\u00a02;\u00a0 \/\/ date<br \/>\n\u00a04;\u00a0 \/\/ author name<br \/>\n\u00a08;\u00a0 \/\/ comment count<br \/>\n\u00a016; \/\/ blog name<br \/>\n\u00a032; \/\/ post name<br \/>\n\u00a064; \/\/ post excerpt<br \/>\n\u00a0128; \/\/ excerpt capitalization<br \/>\n$exc_size: size of excerpt in words (default: 30)<br \/>\n$end_wrap: customise the end html code to adapt to different themes<\/p>\n<p>Sample call:<br \/>\n1)You can edit the palameter in this plugin code L76,<br \/>\n\u00a0\u00a0\u00a0function ahp_recent_posts($how_many=9, $how_long=30, $cate=5, $limit=3, $titleOnly=false, $optmask=255, $exc_size=30, $begin_wrap='&lt;li class=&#8221;pageposts_list&#8221;&gt;&#8217;, $end_wrap='&lt;\/li&gt;&#8217;) {<br \/>\nand call the function in your template file like this&#8230;<br \/>\n\u00a0\u00a0\u00a0&lt;ul&gt;&lt;?php bton_recent_posts(); ?&gt;&lt;\/ul&gt;<br \/>\n2)If you want to call the parameter in your each code of the template,<br \/>\nchange L75 &#8211;&gt; delate &#8216;\/\/&#8217; from this code.<br \/>\n\u00a0\u00a0\u00a0function ahp_recent_posts($how_many, $how_long, $cate, $limit, $titleOnly, $optmask, $exc_size, $begin_wrap, $end_wrap) {<br \/>\nand coment out L76.<br \/>\n\u00a0\u00a0\u00a0\/\/function ahp_recent_posts($how_many=9, $how_long=30, $cate=5, $limit=3, $titleOnly=false, $optmask=255, $exc_size=30, $begin_wrap='&lt;li class=&#8221;pageposts_list&#8221;&gt;&#8217;, $end_wrap='&lt;\/li&gt;&#8217;) {<br \/>\nSo, you can set each parameter in your template<br \/>\nbton_recent_posts(9, 30, 5, 3, true, 255, 30, &#8216;&lt;li class=&#8221;pageposts_list&#8221;&gt;&#8217;, &#8216;&lt;\/li&gt;&#8217;); &gt;&gt; total 9 most recent entries over the past 30 days, from cateID 5, 3 entries from each blog, displaying titles only<br \/>\n\u00a0write code in template like this&#8230;<br \/>\n\u00a0\u00a0\u00a0&lt;ul&gt;&lt;?php bton_recent_posts(9, 30, 5, 3, true, 255, 30, &#8216;&lt;li class=&#8221;pageposts_list&#8221;&gt;&#8217;, &#8216;&lt;\/li&gt;&#8217;); ?&gt;&lt;\/ul&gt;<br \/>\nAnd you can also add style in your css files like this.<br \/>\nli.pageposts_list {list-mark-style:none;}<br \/>\nspan.pageposts_cont{font-size:small; color:#333;}<br \/>\nspan.pageposts_date {font-size:x-small; color:#ccc;}<br \/>\nspan.pageposts_author {font-size:x-small; color:#ccc;}<br \/>\nspan.pageposts_comment {font-size:x-small; color:#ccc;}<br \/>\nspan.pageposts_blog {font-size:x-small; color:#ccc;}<br \/>\nspan.pageposts_title {font-size:small; color:#333;}<\/p><\/blockquote>\n<p>-&gt;&gt;[<a href=\"http:\/\/bton.papalabs.net\/wp-content\/uploads\/code\/bton_recent_posts_2.0.zip\"><strong>DOWNLOAD<\/strong><\/a>](bton_recent_posts_2.0.zip:4KB)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[JAPANESE] Download the code, and FTP-upload the file to \/wp-ontent\/mu-plugin\/. It will work as soon as file u [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[198,229,199],"_links":{"self":[{"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=\/wp\/v2\/posts\/993"}],"collection":[{"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=993"}],"version-history":[{"count":0,"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=\/wp\/v2\/posts\/993\/revisions"}],"wp:attachment":[{"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bton.papalabs.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}