<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>さんきゅう堂　バックアップ &#187; プラグイン</title>
	<atom:link href="http://sunq.info/style/archives/tag/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3/feed" rel="self" type="application/rss+xml" />
	<link>http://sunq.info/style</link>
	<description>メインサイトは http://sunq.jp/ です。ここはバックアップ用サイトです。</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:12:42 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Word Press ショッピングカートプラグイン　uCart for WordPress</title>
		<link>http://sunq.info/style/archives/2009/07/15-150151</link>
		<comments>http://sunq.info/style/archives/2009/07/15-150151#comments</comments>
		<pubDate>Wed, 15 Jul 2009 06:01:51 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ショッピングカート]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/07/15-150151</guid>
		<description><![CDATA[WordPressのショッピングカートプラグインを試してみました。
YAK for WordPress
WP e-Commerce
海外のプラグイン、日本に合うようにはカスタマイズが結構必要で挫折・・・   
が、、、日 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />WordPressのショッピングカートプラグインを試してみました。<br />
YAK for WordPress<br />
WP e-Commerce<br clear=all><br />
海外のプラグイン、日本に合うようにはカスタマイズが結構必要で挫折・・・ <img src='http://sunq.info/style/wp-includes/images/smilies/namida.gif' alt=':namida:' class='wp-smiley' />  </p>
<p>が、、、日本のショッピングカートプラグインがありました <img src='http://sunq.info/style/wp-includes/images/smilies/smile01.gif' alt=':smile01:' class='wp-smiley' />  <br />
まだ、インストールしたところなので分かりませんが、管理画面はこれでフリーでいいの？ってくらい作り込まれています。これはお勧めだと思います <img src='http://sunq.info/style/wp-includes/images/smilies/25 Not guilty.png' alt=':-D' class='wp-smiley' />  <br />
uCart for WordPress<br />
<a title="" href="http://www.usconsort.com/" target="_blank">http://www.usconsort.com/</a><br />
デモサイト<br />
<a title="" href="http://www.usconsort.com/demo/wordpress/" target="_blank">http://www.usconsort.com/demo/wordpress/</a><br />
uCart コミュニティー<br />
<a title="" href="http://www.usconsort.com/community/" target="_blank">http://www.usconsort.com/community/</a><br />
uCart サポートサイト<br />
<a title="" href="http://www.usconsort.com/usces/" target="_blank">http://www.usconsort.com/usces/</a></p>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2385&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/07/15-150151/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP E-Commerce 文字化け</title>
		<link>http://sunq.info/style/archives/2009/07/11-143912</link>
		<comments>http://sunq.info/style/archives/2009/07/11-143912#comments</comments>
		<pubDate>Sat, 11 Jul 2009 05:39:12 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[文字化け]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/07/11-143912</guid>
		<description><![CDATA[覚書 wp-e-commerce.3.7Beta5 1、ショッピングカート内（買い物かご） 2、パンくずリスト での商品名文字化け htmlentitiesをhtmlspecialcharsに変更。 /wp-content/plugins/wp-e-commerce/wpsc-includes/cart.class.php　174行目 * cart item name function, no parameters * @return string the cart item name */ function wpsc_cart_item_name() { global $wpsc_cart; return htmlspecialchars(stripslashes($wpsc_cart-&#62;cart_item-&#62;product_name), ENT_QUOTES); } /wp-content/plugins/wp-e-commerce/wpsc-includes/wpsc_query.php　171、1516、1533行目 function wpsc_the_product_title() { global $wpsc_query; //return stripslashes($wpsc_query-&#62;the_product_title()); return htmlspecialchars(stripslashes($wpsc_query-&#62;the_product_title()), ENT_QUOTES, &#34;UTF-8&#34;); } function get_breadcrumbs() { global $wpdb; $this-&#62;breadcrumbs = array(); $i = 0; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />覚書<br />
wp-e-commerce.3.7Beta5<br /><br clear=all><br />
1、ショッピングカート内（買い物かご）<br />
2、パンくずリスト<br />
での商品名文字化け <img src='http://sunq.info/style/wp-includes/images/smilies/15 Cry.png' alt=':cry:' class='wp-smiley' />  htmlentitiesをhtmlspecialcharsに変更。<br />
/wp-content/plugins/wp-e-commerce/wpsc-includes/cart.class.php　174行目</p>
<pre class="brush: php:first-line:169:highlight:[174]">
* cart item name function, no parameters
* @return string the cart item name
*/
function wpsc_cart_item_name() {
	global $wpsc_cart;
	return htmlspecialchars(stripslashes($wpsc_cart-&gt;cart_item-&gt;product_name), ENT_QUOTES);
}
</pre>
<p>/wp-content/plugins/wp-e-commerce/wpsc-includes/wpsc_query.php　171、1516、1533行目</p>
<pre class="brush: php:first-line:168:highlight:[171]">
function wpsc_the_product_title() {
	global $wpsc_query;
	//return stripslashes($wpsc_query-&gt;the_product_title());
	return htmlspecialchars(stripslashes($wpsc_query-&gt;the_product_title()), ENT_QUOTES, &quot;UTF-8&quot;);
}
</pre>
<pre class="brush: php:first-line:1510:highlight:[1516]">
	function get_breadcrumbs() {
		global $wpdb;
		$this-&gt;breadcrumbs = array();
		$i = 0;
		if( $this-&gt;category != null) {
			if($this-&gt;is_single == true) {
				$this-&gt;breadcrumbs[$i][&#039;name&#039;] = htmlspecialchars(stripslashes($this-&gt;product[&#039;name&#039;]), ENT_QUOTES);
				$this-&gt;breadcrumbs[$i][&#039;url&#039;] = &#039;&#039;;
				$i++;
			}
</pre>
<pre class="brush: php:first-line:1531:highlight:[1533]">
			while ($category_info[&#039;category_parent&#039;]!=0) {
				$category_info =	$wpdb-&gt;get_row(&quot;SELECT * FROM &quot;.WPSC_TABLE_PRODUCT_CATEGORIES.&quot; WHERE id=&#039;{$category_info[&#039;category_parent&#039;]}&#039;&quot;,ARRAY_A);
				$this-&gt;breadcrumbs[$i][&#039;name&#039;] = htmlspecialchars(stripslashes($category_info[&#039;name&#039;]), ENT_QUOTES);
				$this-&gt;breadcrumbs[$i][&#039;url&#039;] = wpsc_category_url($category_info[&#039;id&#039;]);
				$i++;
			}
		}
</pre>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2369&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/07/11-143912/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YAK for WordPress 日本語化</title>
		<link>http://sunq.info/style/archives/2009/07/06-135409</link>
		<comments>http://sunq.info/style/archives/2009/07/06-135409#comments</comments>
		<pubDate>Mon, 06 Jul 2009 04:54:09 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[YAK for WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/07/06-135409</guid>
		<description><![CDATA[WordPressショッピングカートプラグイン　バージョン 1.4.6
設定画面を日本語にしたい   
見よう見まねでやったものです。万一使用する場合は元ファイルをリネームバックアップして下さい。
yak-ja.poはy [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />WordPressショッピングカートプラグイン　バージョン 1.4.6<br />
設定画面を日本語にしたい <img src='http://sunq.info/style/wp-includes/images/smilies/kya.gif' alt=':kya:' class='wp-smiley' />  <br />
見よう見まねでやったものです。万一使用する場合は元ファイルをリネームバックアップして下さい。<br clear=all><br />
yak-ja.poはyak-view-settings.php追加分翻訳できていません。誰か翻訳して下さい。<br />
/wp-content/plugins/yak-for-wordpress/yak-view-settings.php<br />
<a href="http://sunq.jp/style/?download=yak-view-settings.php">yak-view-settings.php</a>　DL数　[downloadcounter(yak-view-settings.php)]回<br />
<a href="http://sunq.jp/style/?download=yak-ja.po">yak-ja.po</a>　DL数　[downloadcounter(yak-ja.po)]回</p>
<p>2009年7月7日　13:52<br />
変更ファイル<br />
1、yak-for-wordpress.php<br />
2、yak-ja.po<br />
3、yak-static.php<br />
4、yak-view-orders.php<br />
5、yak-view-products.php<br />
6、yak-view-product-snippet.php<br />
7、yak-view-reports.php<br />
8、yak-view-settings.php<br />
修正箇所が都度発生しますのでTracでファイル管理しました <img src='http://sunq.info/style/wp-includes/images/smilies/kya.gif' alt=':kya:' class='wp-smiley' />  <br />
以後ファイルについては下記にあります。また修正箇所ありましたら、Trac側でご指摘下さい。<br />
日本語翻訳も募集中です。一部でも結構ですのでご協力お願いします。<br />
<a href="http://trac.asunara.jp/trac/repo/blog/">http://trac.asunara.jp/trac/repo/blog/</a></p>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2349&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/07/06-135409/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Word Press プラグインの日本語化</title>
		<link>http://sunq.info/style/archives/2009/07/05-110523</link>
		<comments>http://sunq.info/style/archives/2009/07/05-110523#comments</comments>
		<pubDate>Sun, 05 Jul 2009 02:05:23 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/07/05-110523</guid>
		<description><![CDATA[覚書
これでも、国際化された部分を読み込めます。
あとはプラグイン名-ja.mo

&#60;?php
if (file_exists(ABSPATH . &#039;wp-includes/l10n.php&#039;) [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />覚書<br />
これでも、国際化された部分を読み込めます。<br />
あとはプラグイン名-ja.mo<br /><br clear=all></p>
<pre class="brush: php">
&lt;?php
if (file_exists(ABSPATH . &#039;wp-includes/l10n.php&#039;)) {
    require_once(ABSPATH . &#039;wp-includes/l10n.php&#039;);
}
else {
    require_once(ABSPATH . &#039;wp-includes/wp-l10n.php&#039;);
}
?&gt;
</pre>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2343&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/07/05-110523/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Popularity Contest 日本語化</title>
		<link>http://sunq.info/style/archives/2009/06/28-135244</link>
		<comments>http://sunq.info/style/archives/2009/06/28-135244#comments</comments>
		<pubDate>Sun, 28 Jun 2009 04:52:44 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/06/28-135244</guid>
		<description><![CDATA[Popularity Contest バージョン 2.0b2
/wp-content/plugins/popularity-contest/popularity-contest.php82、1,634行目変更


loa [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />Popularity Contest バージョン 2.0b2<br />
/wp-content/plugins/popularity-contest/popularity-contest.php82、1,634行目変更</p>
<pre class="brush: php:first-line:82">

load_plugin_textdomain(&#039;popularity-contest&#039;, &#039;wp-content/plugins/popularity-contest&#039;);
</pre>
<pre class="brush: php:first-line:1634">
&lt;p id=&quot;akpc_options_link&quot;&gt;&lt;a href=&quot;options-general.php?page=popularity-contest.php&quot;&gt;&#039;.__(&#039;Change Popularity Values&#039;, &#039;popularity-contest&#039;).&#039;&lt;/a&gt;&lt;/p&gt;
</pre>
<p>おかしな所はpoファイルで変更して下さい。一応置いておきます。 <img src='http://sunq.info/style/wp-includes/images/smilies/kya.gif' alt=':kya:' class='wp-smiley' />  <br />
<a href="http://sunq.jp/style/?download=popularity-contest-ja.po">popularity-contest-ja.po</a>　DL数　[downloadcounter(popularity-contest-ja.po)]回<br />
<a href="http://sunq.jp/style/?download=popularity-contest-ja.mo">popularity-contest-ja.mo</a>　DL数　[downloadcounter(popularity-contest-ja.mo)]回</p>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2305&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/06/28-135244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All in One SEO Pack 日本語化</title>
		<link>http://sunq.info/style/archives/2009/06/20-125517</link>
		<comments>http://sunq.info/style/archives/2009/06/20-125517#comments</comments>
		<pubDate>Sat, 20 Jun 2009 03:55:17 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/06/20-125517</guid>
		<description><![CDATA[All in One SEO Pack　バージョン 1.5.6
WordPress 2.8
管理画面で日本語にならずいろいろやってみましたがこれでOK？？かなっ   
all_in_one_seo_pack.phpを秀丸 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPres" title="WordPres" width="50" height="50" class="alignleft size-full wp-image-2321" />All in One SEO Pack　バージョン 1.5.6<br />
WordPress 2.8<br /><br clear=all><br />
管理画面で日本語にならずいろいろやってみましたがこれでOK？？かなっ <img src='http://sunq.info/style/wp-includes/images/smilies/12 Tease.png' alt=':razz:' class='wp-smiley' />  <br />
all_in_one_seo_pack.phpを秀丸で開けると文字コードの問い合わせがでる。Shift-JISになっているので「エンコードの種類を指定しなおす」から、日本語（Shift-JIS）でそのままOK <img src='http://sunq.info/style/wp-includes/images/smilies/02 Laugh.png' alt=':twisted:' class='wp-smiley' />  <br />
all_in_one_seo_pack.php　585行目変更 <img src='http://sunq.info/style/wp-includes/images/smilies/11 Geek.png' alt=':oops:' class='wp-smiley' /> </p>
<pre class="brush: php:first-line:585">
	function init() {
		if (function_exists(&#039;load_plugin_textdomain&#039;)) {
			load_plugin_textdomain(&#039;all_in_one_seo_pack&#039;, &#039;wp-content/plugins/all-in-one-seo-pack&#039;);
		}
	}
</pre>
<p>これでも日本語化にならないので <img src='http://sunq.info/style/wp-includes/images/smilies/15 Cry.png' alt=':cry:' class='wp-smiley' />  all_in_one_seo_pack.moからall_in_one_seo_pack-ja.poを作成。all_in_one_seo_pack-ja.moをアップロード。これでOK <img src='http://sunq.info/style/wp-includes/images/smilies/kya.gif' alt=':kya:' class='wp-smiley' />  <br />
一応置いておきます。<br />
<a href="http://sunq.jp/style/?download=all_in_one_seo_pack-ja.po">all_in_one_seo_pack-ja.po</a>　DL数 [downloadcounter(all_in_one_seo_pack-ja.po)]回<br />
<a href="http://sunq.jp/style/?download=all_in_one_seo_pack-ja.mo">all_in_one_seo_pack-ja.mo</a>　DL数　[downloadcounter(all_in_one_seo_pack-ja.mo)]回<br />
これでもOKみたい <img src='http://sunq.info/style/wp-includes/images/smilies/04 Wink.png' alt=':shock:' class='wp-smiley' /> </p>
<pre class="brush: php:first-line:585">
	function init() {
		if (function_exists(&#039;load_plugin_textdomain&#039;)) {
			load_plugin_textdomain(&#039;all_in_one_seo_pack&#039;, PLUGINDIR.&#039;/&#039;.dirname(plugin_basename(__FILE__)), dirname(plugin_basename(__FILE__)));
		}
	}
</pre>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2277&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/06/20-125517/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WP Grins &#8211; Lite</title>
		<link>http://sunq.info/style/archives/2009/06/18-143249</link>
		<comments>http://sunq.info/style/archives/2009/06/18-143249#comments</comments>
		<pubDate>Thu, 18 Jun 2009 05:32:49 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/06/18-143249</guid>
		<description><![CDATA[フェイスアイコン表示にWP Grins（prototype.js）を使用していましたが、jQuery版がありました。  
WP Grins &#8211; Lite　http://www.raproject.com/wo [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunq.info/style/wp-content/uploads/2009/06/blue-s.png" alt="WordPress" title="WordPress" width="50" height="50" class="alignleft size-full wp-image-2321" />フェイスアイコン表示にWP Grins（prototype.js）を使用していましたが、jQuery版がありました。 <img src='http://sunq.info/style/wp-includes/images/smilies/32 Not one care.png' alt='8O' class='wp-smiley' /> <br />
WP Grins &#8211; Lite　<a title="" href="http://www.raproject.com/wordpress/wp-grins-lite/" target="_blank">http://www.raproject.com/wordpress/wp-grins-lite/</a><br />
WordPress 2.8で動作確認OKです。 <img src='http://sunq.info/style/wp-includes/images/smilies/memo.gif' alt=':memo:' class='wp-smiley' />  <br />
他プラグインなどとのコンフリクトなくなりテーマ修正部分も元に戻せました。 <img src='http://sunq.info/style/wp-includes/images/smilies/smile01.gif' alt=':smile01:' class='wp-smiley' />  </p>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=2269&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/06/18-143249/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customizable Post Listingsで新着にNEWをつける</title>
		<link>http://sunq.info/style/archives/2009/02/28-141314</link>
		<comments>http://sunq.info/style/archives/2009/02/28-141314#comments</comments>
		<pubDate>Sat, 28 Feb 2009 05:13:14 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/02/28-141314</guid>
		<description><![CDATA[表示させることができたので覚書 Customizable Post Listings　Version:3.0.1　Last update:03 April 2008 http://coffee2code.com/wp-plugins/#customizablepostlistings うちのは CPL日本語版　ver 2.0.1 http://hsuzuki.ddo.jp/weblog/?p=2339 参考HP　ともかめ亭　WordPress Hacks : New / Up マーク http://tomokame.moo.jp/archives/614 サンプルコード function new_up() { $display = &#039;&#039;; $newmark = &#039;&#60;span style=&#34;color: maroon;&#34;&#62;NEW!&#60;/span&#62;&#039;; $upmark = &#039;&#60;span style=&#34;color: blue;&#34;&#62;UP!&#60;/span&#62;&#039;; 　 $pos_time = get_the_time(&#039;U&#039;); $mod_time = get_the_modified_time(&#039;U&#039;); 　 if ((time() - $mod_time) / (60*60*24) &#60;3) { if (($mod_time [...]]]></description>
			<content:encoded><![CDATA[<p>
    表示させることができたので覚書 <img src='http://sunq.info/style/wp-includes/images/smilies/04 Wink.png' alt=':shock:' class='wp-smiley' />  <br />
    Customizable Post Listings　Version:<span>3.0.1　</span>Last update:<span>03 April 2008</span><br />
    <a title="" href="http://coffee2code.com/wp-plugins/#customizablepostlistings" target="_blank">http://coffee2code.com/wp-plugins/#customizablepostlistings</a></p>
<p>    うちのは<br />
    CPL日本語版　ver 2.0.1<br />
    <a title="" href="http://hsuzuki.ddo.jp/weblog/?p=2339" target="_blank">http://hsuzuki.ddo.jp/weblog/?p=2339</a></p>
<p>    参考HP　ともかめ亭　WordPress Hacks : New / Up マーク <img src='http://sunq.info/style/wp-includes/images/smilies/02 Laugh.png' alt=':twisted:' class='wp-smiley' />  <br />
    <a title="" href="http://tomokame.moo.jp/archives/614" target="_blank">http://tomokame.moo.jp/archives/614</a></p>
<p>    サンプルコード</p>
<pre class="brush: php">
function new_up() {
	$display = &#039;&#039;;
	$newmark = &#039;&lt;span style=&quot;color: maroon;&quot;&gt;NEW!&lt;/span&gt;&#039;;
	$upmark = &#039;&lt;span style=&quot;color: blue;&quot;&gt;UP!&lt;/span&gt;&#039;;
　
	$pos_time = get_the_time(&#039;U&#039;);
	$mod_time = get_the_modified_time(&#039;U&#039;);
　
	if ((time() - $mod_time) / (60*60*24) &lt;3) {
		if (($mod_time - $pos_time) / (60*60*24) &lt;1) {
			$display = &quot;$newmark&quot;;
		} else {
			$display = &quot;$upmark&quot;;
		}
	}
	return &quot;$display&quot;;
}
</pre>
<p>    CPL日本語版　ver 2.0.1<br />
    /wp-content/plugins/customizable-post-listings/customizable-post-listings.php</p>
<pre class="brush: php:first-line:589">
// ************************ START TEMPLATE TAGS ******************************************************************
//  以下に挿入
function new_up() {
	$display = &#039;&#039;;
	$newmark = &#039;&lt;span style=&quot;color: maroon;&quot;&gt;NEW!&lt;/span&gt;&#039;;
	$upmark = &#039;&lt;span style=&quot;color: blue;&quot;&gt;UP!&lt;/span&gt;&#039;;
　
	$pos_time = get_the_time(&#039;U&#039;);
	$mod_time = get_the_modified_time(&#039;U&#039;);
　
	if ((time() - $mod_time) / (60*60*24) &lt;3) {
		if (($mod_time - $pos_time) / (60*60*24) &lt;1) {
			$display = &quot;$newmark&quot;;
		} else {
			$display = &quot;$upmark&quot;;
		}
	}
	return &quot;$display&quot;;
}　//ここまで
　
function c2c_get_recent_posts( $num_posts = 5,
	$format = &quot;&lt;li&gt;%post_date%: %post_URL%&lt;/li&gt;&quot;,
</pre>
<p>1176行目挿入</p>
<pre class="brush: php:first-line:1159:highlight:[1176]">
//Modified by H.Suzuki--End
				case &#039;%post_URL%&#039;:
				case &#039;%post_URL_short%&#039;:
					if (!$title) { $title = the_title(&#039;&#039;, &#039;&#039;, false); }
					if (&#039;%post_URL_short%&#039; != $tag)
						$ntitle = $title;
					else {
						$ntitle = strip_tags($title);
						if ($post_URL_short_words) {
							$words = explode(&#039; &#039;, $ntitle);
							$ntitle = join(&#039; &#039;, array_slice($words, 0, $post_URL_short_words));
							if (count($words) &gt; $post_URL_short_words) $ntitle .= &quot;...&quot;;
						} elseif ($post_URL_short_length) {
							if (strlen($ntitle) &gt; $post_URL_short_length) $ntitle = substr($ntitle,0,$post_URL_short_length) . &quot;...&quot;;
						}
					}
					$new = &#039;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; title=&quot;この記事の内容を表示&quot;&gt;&#039;.$ntitle.&#039;&lt;/a&gt;&#039;;//translated by H.Suzuki
					$new .= new_up();　//挿入
					break;
				case &#039;%trackbacks_count%&#039;:
					if (!$trackback_count) { $trackback_count = c2c_comment_count($post-&gt;ID, &#039;trackback&#039;); }
					$new = $trackback_count;
					break;
				case &#039;%trackbacks_fancy%&#039;:
					if (!$trackback_count) { $trackback_count = c2c_comment_count($post-&gt;ID, &#039;trackback&#039;); }
					if ($trackback_count &lt; 2) $new = $trackback_fancy[$trackback_count];
					else $new = str_replace(&#039;%trackbacks_count%&#039;, $trackback_count, $trackback_fancy[2]);
					break;
			}
			$text = str_replace($tag, $new, $text);
		}
		if ($echo) echo $text . &quot;\n&quot;;
	}
	$post = $orig_post; $authordata = $orig_authordata; $comment = $orig_comment;
	return ($echo ? count($posts) : $text);
} // end function c2c_get_recent_tagmap()
　
function c2c_get_recent_handler( $posts, $format = &#039;&#039;, $date_format = &#039;&#039;, $echo = true ) {
	if (!$format) { return $posts; }
	if (!is_array($posts)) $posts = array($posts);
</pre>
<p>    Customizable Post Listings　Version:<span>3.0.1<br /></span>/wp-content/plugins/customizable-post-listings/customizable-post-listings.php</p>
<pre class="brush: php:first-line:602">
// ************************ START TEMPLATE TAGS ******************************************************************
//　以下に挿入
function new_up() {
	$display = &#039;&#039;;
	$newmark = &#039;&lt;span style=&quot;color: maroon;&quot;&gt;NEW!&lt;/span&gt;&#039;;
	$upmark = &#039;&lt;span style=&quot;color: blue;&quot;&gt;UP!&lt;/span&gt;&#039;;
　
	$pos_time = get_the_time(&#039;U&#039;);
	$mod_time = get_the_modified_time(&#039;U&#039;);
　
	if ((time() - $mod_time) / (60*60*24) &lt;3) {
		if (($mod_time - $pos_time) / (60*60*24) &lt;1) {
			$display = &quot;$newmark&quot;;
		} else {
			$display = &quot;$upmark&quot;;
		}
	}
	return &quot;$display&quot;;
}　//ここまで
　
function c2c_get_recent_posts( $num_posts = 5,
	$format = &quot;&lt;li&gt;%post_date%: %post_URL%&lt;/li&gt;&quot;,
</pre>
<p>1128行目挿入</p>
<pre class="brush: php:first-line:1112:highlight:[1128]">
			case &#039;%post_URL%&#039;:
			case &#039;%post_URL_short%&#039;:
				if (!$title) { $title = the_title(&#039;&#039;, &#039;&#039;, false); }
				if (&#039;%post_URL_short%&#039; != $tag)
					$ntitle = $title;
				else {
					$ntitle = strip_tags($title);
					if ($post_URL_short_words) {
						$words = explode(&#039; &#039;, $ntitle);
						$ntitle = join(&#039; &#039;, array_slice($words, 0, $post_URL_short_words));
						if (count($words) &gt; $post_URL_short_words) $ntitle .= &quot;...&quot;;
					} elseif ($post_URL_short_length) {
						if (strlen($ntitle) &gt; $post_URL_short_length) $ntitle = substr($ntitle,0,$post_URL_short_length) . &quot;...&quot;;
					}
				}
				$new = &#039;&lt;a href=&quot;&#039;.get_permalink().&#039;&quot; title=&quot;View post &#039;.wp_specialchars(strip_tags($title), 1).&#039;&quot;&gt;&#039;.$ntitle.&#039;&lt;/a&gt;&#039;;
				$new .= new_up();　//挿入
				break;
			case &#039;%trackbacks_count%&#039;:
				if (!$trackback_count) { $trackback_count = c2c_comment_count($post-&gt;ID, &#039;trackback&#039;); }
				$new = $trackback_count;
				break;
			case &#039;%trackbacks_fancy%&#039;:
				if (!$trackback_count) { $trackback_count = c2c_comment_count($post-&gt;ID, &#039;trackback&#039;); }
				if ($trackback_count &lt; 2) $new = $trackback_fancy[$trackback_count];
				else $new = str_replace(&#039;%trackbacks_count%&#039;, $trackback_count, $trackback_fancy[2]);
				break;
		}
		$text = str_replace($tag, $new, $text);
	}
	if ($echo) echo $text . &quot;\n&quot;;
}
$post = $orig_post; $authordata = $orig_authordata; $comment = $orig_comment;
return ($echo ? count($posts) : $text);
} // end function c2c_get_recent_tagmap()
</pre>
<p>
    こんな感じで出力<br />
    <img title="CPL.jpg" height="74" alt="CPL.jpg" src="http://sunq.info/style/wp-content/uploads/2009/02/bw-uploadscpl.jpg" width="173" border="0" /></p>
<p>    ご参考まで&#8230;.</p>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=1504&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/02/28-141314/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Post Updated</title>
		<link>http://sunq.info/style/archives/2009/02/13-201658</link>
		<comments>http://sunq.info/style/archives/2009/02/13-201658#comments</comments>
		<pubDate>Fri, 13 Feb 2009 11:16:58 +0000</pubDate>
		<dc:creator>さんきゅう</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[プラグイン]]></category>

		<guid isPermaLink="false">http://sunq.jp/style/archives/2009/02/13-201658</guid>
		<description><![CDATA[覚書

&#60;?php post_updated(&#8216;Y年n月j日 H:s&#8217;, 1, &#8216;（最終更新日: &#8216;, &#8216;）&#8217;, false, true);  [...]]]></description>
			<content:encoded><![CDATA[<p>覚書</p>
<blockquote><p>
&lt;?php post_updated(&#8216;Y年n月j日 H:s&#8217;, 1, &#8216;（最終更新日: &#8216;, &#8216;）&#8217;, false, true); ?&gt;
</p></blockquote>
<img src="http://sunq.info/style/?ak_action=api_record_view&id=1153&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://sunq.info/style/archives/2009/02/13-201658/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
