<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>みぞおち &#187; Word Press</title>
	<atom:link href="http://mizoochi.com/categories/php/word-press/feed" rel="self" type="application/rss+xml" />
	<link>http://mizoochi.com</link>
	<description>日々の足跡をコツコツと</description>
	<lastBuildDate>Mon, 08 Feb 2010 17:26:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/categories/php/word-press/feed" />
		<item>
		<title>AutoPagerizeとsyntaxhighlighterプラグインをWordPressで使う</title>
		<link>http://mizoochi.com/archives/621.html</link>
		<comments>http://mizoochi.com/archives/621.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 09:21:42 +0000</pubDate>
		<dc:creator>mizota</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Word Press]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[AutoPagerize]]></category>
		<category><![CDATA[syntaxhighlighter]]></category>

		<guid isPermaLink="false">http://mizoochi.com/?p=621</guid>
		<description><![CDATA[
最近このブログの機能アップに費やす時間を増やしています。
色々と便利にしたいなとWP-AutoPagerizeプラグインを入れてみました。
これは元々FirefoxのGreaseMonkeyというアドオンの追加するユー [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://mizoochi.com/files/2009/07/20090710.jpg" alt="Autopagerとsyntax-highlighter" title="Autopagerとsyntax-highlighter" width="600" height="180" /></p>
<p>最近このブログの機能アップに費やす時間を増やしています。<br />
色々と便利にしたいなと<a href="http://moto-mono.net/2009/01/26/wp-autopagerize.html" target="_blank">WP-AutoPagerizeプラグイン</a>を入れてみました。</p>
<p>これは元々FirefoxのGreaseMonkeyというアドオンの追加するユーザスクリプトで、検索結果やニュースページを見る際にページ遷移をせずにある一定のスクロールをした段階で、次のページの記事が追加されるという優れもの。</p>
<p>ただ、その上で問題になったのが<a href="http://wppluginsj.sourceforge.jp/syntax-highlighter/" target="_blank">syntaxhighlighterプラグイン</a>。<br />
これはソースコードを見せる際に綺麗に整形してくれるプラグインです。</p>
<p>何が問題かというと、次ページ記事を読み込んで表示する際にソースコードがあった場合に、syntaxhighlighterの表示処理の動作をしてくれないというものでした。<br />
そのため両方のプラグインの調整が必要になりました。</p>
<p>その調整のやり方を記載しておきます。</p>
<p><span id="more-621"></span><br />
まずは、Autopagerが新しいページを読み込んだ際にsyntaxhighlighterの関数を呼び出すよう設定します。wp-autopagerize.jsはソースコードが圧縮されているので、15行目をコピペして貼り付けて<a href="http://jsbeautifier.org/" target="_blank">Online Beautifier for JavaScript</a>などで綺麗に整形しなおしてもらいましょう。<br />
50行目にソースコードを追加します。</p>
<p><strong>wp-autopagerize.js</strong></p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small></div>
<pre class="brush: jscript; first-line: 35; highlight: 49; auto-links: false; font-size: 80%;" style="margin:18px 0;">
var o = function () {
  l.show();
  $.ajax({
    url: k,
    success: function (h) {
      if ($(pageRizeClassName, h).length &gt; 0) {
        j++;
        c.before(&quot;&lt;p id=&#039;page-&quot; + j + &quot;&#039; class=\&quot;pageNum txt75\&quot;&gt;&lt;a href=&#039;&quot; + k + &quot;&#039;&gt;&quot; + j + &quot;&lt;/a&gt; ページ目&lt;/p&gt;&quot;);
        k = $(&quot;p.pageNav a.next&quot;, h).length &gt; 0 ? $(&quot;p.pageNav a.next&quot;, h).attr(&quot;href&quot;) : null;
        c.before($(pageRizeClassName, h).filter(function () {
          return ! $(this).hasClass(&quot;pageNav&quot;);
        }));
        m = b.scrollHeight;
        g();
        SyntaxHighlighter.highlight();//この行を追加
      }
      l.hide();
    },
    error: function () {
      l.hide();
    }
  });
};
</pre>
<p>これでJavascript側の修正は終了。続いてsyntaxhighlighterを修正します。</p>
<p><strong>syntax_highlighter.php</strong></p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>PHP</strong></small></div>
<pre class="brush: php; first-line: 110; highlight: 116; auto-links: false; font-size: 80%;" style="margin:18px 0;">
function add_footer(){
	$enabled = false;
	foreach ($this-&gt;options as $key =&gt; $val) {if ($val[0]) {$enabled = true; break;}}
	if (!$enabled) return;

	$scripts  = &quot;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;{$this-&gt;plugin_url}js/shCore.js?ver={$this-&gt;plugin_ver}\&quot;&gt;&lt;/script&gt;\n&quot;;
	$scripts .= &quot;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;{$this-&gt;plugin_url}js/shBrushAll.js?ver={$this-&gt;plugin_ver}\&quot;&gt;&lt;/script&gt;\n&quot;;

/*
	// Bash / shell
	if (isset($this-&gt;options[&quot;bash&quot;]) &amp;&amp; $this-&gt;options[&quot;bash&quot;][0])
		$scripts .= &quot;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;{$this-&gt;plugin_url}js/shBrushBash.js?ver={$this-&gt;plugin_ver}	

	(中略)

	elseif (isset($this-&gt;options[&quot;xslt&quot;]) &amp;&amp; $this-&gt;options[&quot;xslt&quot;][0])
		$scripts .= &quot;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;{$this-&gt;plugin_url}js/shBrushXml.js?ver={$this-&gt;plugin_ver}\&quot;&gt;&lt;/script&gt;\n&quot;;
*/
	echo $scripts;
</pre>
<p>上記の修正は、syntaxhighlighterでは各プログラムソース毎にJavascriptファイルを持っていて、読み込んだ記事内で使っているプログラム表示用のJavascriptのうちどれを読み込むかを判定しています。<br />
今回は判定を飛ばして、各プログラム用JSを一つのファイル「shBrushAll.js」にまとめてそれを読み込ませることで対応しています。
<p>
&nbsp;
</p>
<p><strong>使用プラグイン</strong><br />
<a href="http://moto-mono.net/2009/01/26/wp-autopagerize.html" target="_blank">WP-AutoPagerizeプラグイン</a><br />
<a href="http://wppluginsj.sourceforge.jp/syntax-highlighter/" target="_blank">syntaxhighlighterプラグイン</a><br />
<h3>Popular Posts:</h3>
<ul class="popular-posts txt75">
<li class="txt75"><a href="http://mizoochi.com/archives/126.html" rel="bookmark" title="2008 年 11 月 27 日">jQuery ifによる要素の判定</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/145.html" rel="bookmark" title="2008 年 12 月 2 日">一新。</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/211.html" rel="bookmark" title="2008 年 2 月 21 日">いつも忘れちゃうので&#8230;UNIXタイムスタンプの変換</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>
</ul>
<p><!-- popular Posts took 3.034 ms --></p>
Similar Posts:<ul><li><a href="http://mizoochi.com/archives/224.html" rel="bookmark" title="2008 年 9 月 9 日">【注意】YSlowプラグインの挙動</a></li>

<li><a href="http://mizoochi.com/archives/610.html" rel="bookmark" title="2009 年 7 月 7 日">携帯とiphone対応しました</a></li>

<li><a href="http://mizoochi.com/archives/223.html" rel="bookmark" title="2008 年 8 月 18 日">jQuery版画像プロテクションプラグイン をリリース！！</a></li>

<li><a href="http://mizoochi.com/archives/50.html" rel="bookmark" title="2008 年 11 月 8 日">jQuery &#8211; 制作現場で使えるプラグインあれこれ</a></li>

<li><a href="http://mizoochi.com/archives/269.html" rel="bookmark" title="2008 年 12 月 27 日">はてなブログのデータを移行しました。</a></li>
</ul><!-- Similar Posts took 4.453 ms -->]]></content:encoded>
			<wfw:commentRss>http://mizoochi.com/archives/621.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/archives/621.html" />
	</item>
		<item>
		<title>携帯とiphone対応しました</title>
		<link>http://mizoochi.com/archives/610.html</link>
		<comments>http://mizoochi.com/archives/610.html#comments</comments>
		<pubDate>Tue, 07 Jul 2009 00:16:18 +0000</pubDate>
		<dc:creator>mizota</dc:creator>
				<category><![CDATA[Word Press]]></category>
		<category><![CDATA[プラグイン]]></category>
		<category><![CDATA[制作]]></category>
		<category><![CDATA[携帯対応]]></category>

		<guid isPermaLink="false">http://mizoochi.com/?p=610</guid>
		<description><![CDATA[
ブログを携帯対応してみました。
WordPressって素晴らしい！プラグインで難なく対応出来ました。
このプラグインの手軽さは他のブログシステムだと得られないなぁ…と感動。
ちなみにWPtouchとKtai Style [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://mizoochi.com/files/2009/07/20090707.jpg" alt="iphoneとdocomo携帯" title="iphoneとdocomo携帯" width="600" height="278" /></p>
<p>ブログを携帯対応してみました。<br />
WordPressって素晴らしい！プラグインで難なく対応出来ました。<br />
このプラグインの手軽さは他のブログシステムだと得られないなぁ…と感動。</p>
<p>ちなみに<a href="http://www.bravenewcode.com/wptouch/" target="_blank">WPtouch</a>と<a href="http://wppluginsj.sourceforge.jp/ktai_style/" target="_blank">Ktai Style</a>というプラグインを入れて、オプション設定いじって完成。<br />
一部携帯の方はヘッダ画像を出したいのでテンプレートファイルを調整していますが<br />
作業自体は30分かかってません。</p>
<p>他のブログにはもう戻れない…<br />
<h3>Popular Posts:</h3>
<ul class="popular-posts txt75">
<li class="txt75"><a href="http://mizoochi.com/archives/126.html" rel="bookmark" title="2008 年 11 月 27 日">jQuery ifによる要素の判定</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/145.html" rel="bookmark" title="2008 年 12 月 2 日">一新。</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/211.html" rel="bookmark" title="2008 年 2 月 21 日">いつも忘れちゃうので&#8230;UNIXタイムスタンプの変換</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>
</ul>
<p><!-- popular Posts took 3.006 ms --></p>
Similar Posts:<ul><li><a href="http://mizoochi.com/archives/621.html" rel="bookmark" title="2009 年 7 月 10 日">AutoPagerizeとsyntaxhighlighterプラグインをWordPressで使う</a></li>

<li><a href="http://mizoochi.com/archives/224.html" rel="bookmark" title="2008 年 9 月 9 日">【注意】YSlowプラグインの挙動</a></li>

<li><a href="http://mizoochi.com/archives/269.html" rel="bookmark" title="2008 年 12 月 27 日">はてなブログのデータを移行しました。</a></li>

<li><a href="http://mizoochi.com/archives/742.html" rel="bookmark" title="2009 年 8 月 13 日">ウェブの未来 &#8211; WISH2009</a></li>

<li><a href="http://mizoochi.com/archives/9.html" rel="bookmark" title="2008 年 10 月 28 日">WordPress MU 入れてみました。</a></li>
</ul><!-- Similar Posts took 3.933 ms -->]]></content:encoded>
			<wfw:commentRss>http://mizoochi.com/archives/610.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/archives/610.html" />
	</item>
		<item>
		<title>はてなブログのデータを移行しました。</title>
		<link>http://mizoochi.com/archives/269.html</link>
		<comments>http://mizoochi.com/archives/269.html#comments</comments>
		<pubDate>Sat, 27 Dec 2008 03:17:07 +0000</pubDate>
		<dc:creator>mizota</dc:creator>
				<category><![CDATA[Word Press]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[はてな]]></category>
		<category><![CDATA[移行]]></category>

		<guid isPermaLink="false">http://mizoochi.com/?p=269</guid>
		<description><![CDATA[wordpress(wp)の2.7へのバージョンアップと同時に
はてなで書いていた記事データをこちらに移行しました。
（写真データはまだはてな参照中）
なので記事数増えました～！
デザインもまだ簡易的なものなので来年早め [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ja.wordpress.org/" target="_blank">wordpress(wp)</a>の2.7へのバージョンアップと同時に<br />
はてなで書いていた記事データをこちらに移行しました。<br />
（写真データはまだはてな参照中）</p>
<p>なので記事数増えました～！<br />
デザインもまだ簡易的なものなので来年早めにデザインも一新していきます。<br />
プラグイン開発や右上の開発したプログラム公開などもデータ溜まっているので<br />
早めに公開出来るようします！</p>
<p>ちなみに<a href="http://mu.wordpress.org/" target="_blank">wordpress mu(wpmu)</a>使っていたのですが、wpからの移行だと写真データとかも<br />
インポート出来るのですね。。非常に優秀（当たり前）</p>
<p>プラグインのインストールとか楽だし。<br />
今後のバージョンも楽しみですね<br />
<h3>Popular Posts:</h3>
<ul class="popular-posts txt75">
<li class="txt75"><a href="http://mizoochi.com/archives/126.html" rel="bookmark" title="2008 年 11 月 27 日">jQuery ifによる要素の判定</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/145.html" rel="bookmark" title="2008 年 12 月 2 日">一新。</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/211.html" rel="bookmark" title="2008 年 2 月 21 日">いつも忘れちゃうので&#8230;UNIXタイムスタンプの変換</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>
</ul>
<p><!-- popular Posts took 3.056 ms --></p>
Similar Posts:<ul><li><a href="http://mizoochi.com/archives/580.html" rel="bookmark" title="2009 年 6 月 17 日">少しだけ</a></li>

<li><a href="http://mizoochi.com/archives/9.html" rel="bookmark" title="2008 年 10 月 28 日">WordPress MU 入れてみました。</a></li>

<li><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>

<li><a href="http://mizoochi.com/archives/399.html" rel="bookmark" title="2009 年 2 月 8 日">URIデータスキーム</a></li>

<li><a href="http://mizoochi.com/archives/564.html" rel="bookmark" title="2009 年 6 月 12 日">GoogleDeveloperDay2009 ～ OpenSocial Hackathon</a></li>
</ul><!-- Similar Posts took 3.966 ms -->]]></content:encoded>
			<wfw:commentRss>http://mizoochi.com/archives/269.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/archives/269.html" />
	</item>
		<item>
		<title>WordPress MU 入れてみました。</title>
		<link>http://mizoochi.com/archives/9.html</link>
		<comments>http://mizoochi.com/archives/9.html#comments</comments>
		<pubDate>Tue, 28 Oct 2008 06:48:25 +0000</pubDate>
		<dc:creator>mizota</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Word Press]]></category>

		<guid isPermaLink="false">http://mizoochi.com/?p=9</guid>
		<description><![CDATA[とりあえずWord Press MU を入れてみました。
こっちのほうがある意味MTに近い機能のようなので、あえてこちらで。
インストールはすごい簡単。
ファイル入れてから「index-install.php」にアクセス [...]]]></description>
			<content:encoded><![CDATA[<p>とりあえずWord Press MU を入れてみました。<br />
こっちのほうがある意味MTに近い機能のようなので、あえてこちらで。</p>
<p>インストールはすごい簡単。<br />
ファイル入れてから「index-install.php」にアクセスするだけ。<br />
あとはデータベースの設定を入れてあげれば完成。</p>
<p>なんとお手軽。</p>
<p>だた気になった点として、サブドメインでのブログの構築かフォルダ以下でのブログ構築を選ぶんだけども<br />
どっちもやりたい場合は？とか、まだまだ調べないといけないことが多いみたいですね。</p>
<p>本体のダウンロードは<br />
<a href="http://mu.wordpress.org/download/">http://mu.wordpress.org/download/</a></p>
<p>日本語化はGOOGLE codeにてダウンロード<br />
<a href="http://code.google.com/p/wpmu-ja/">http://code.google.com/p/wpmu-ja/</a></p>
<p>wordpressの本でいろいろ見たけど、タグ辞典的なものが良いよね。<br />
そんなわけで以下の本お勧め。</p>
<div class="amazlet-box clears">
<div class="amazlet-image" style="float:left"><a name="amazletlink" href="http://www.amazon.co.jp/exec/obidos/ASIN/479811667X/fujirin-22/ref=nosim/" target="_blank"><img style="border: none" src="http://ecx.images-amazon.com/images/I/51wvZ9nbUSL._SL160_.jpg" alt="WordPress逆引きデザイン事典[2.X対応]" /></a></div>
<div class="amazlet-info" style="float:left;margin-left:15px">
<div class="amazlet-name" style="margin-bottom:10px"><a name="amazletlink" href="http://www.amazon.co.jp/exec/obidos/ASIN/479811667X/fujirin-22/ref=nosim/" target="_blank">WordPress逆引きデザイン事典[2.X対応]</a>
</div>
<div class="amazlet-detail">高山 一登 大久保 アキラ 酒井 隆　翔泳社<br />
売り上げランキング: 28516</div>
<div class="amazlet-link" style="margin-top: 5px"><a name="amazletlink" href="http://www.amazon.co.jp/exec/obidos/ASIN/479811667X/fujirin-22/ref=nosim/" target="_blank">Amazon.co.jp で詳細を見る</a></div>
</div>
</div>
<h3>Popular Posts:</h3>
<ul class="popular-posts txt75">
<li class="txt75"><a href="http://mizoochi.com/archives/126.html" rel="bookmark" title="2008 年 11 月 27 日">jQuery ifによる要素の判定</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/145.html" rel="bookmark" title="2008 年 12 月 2 日">一新。</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/211.html" rel="bookmark" title="2008 年 2 月 21 日">いつも忘れちゃうので&#8230;UNIXタイムスタンプの変換</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>
</ul>
<p><!-- popular Posts took 3.160 ms --></p>
Similar Posts:<ul><li><a href="http://mizoochi.com/archives/610.html" rel="bookmark" title="2009 年 7 月 7 日">携帯とiphone対応しました</a></li>

<li><a href="http://mizoochi.com/archives/580.html" rel="bookmark" title="2009 年 6 月 17 日">少しだけ</a></li>

<li><a href="http://mizoochi.com/archives/223.html" rel="bookmark" title="2008 年 8 月 18 日">jQuery版画像プロテクションプラグイン をリリース！！</a></li>

<li><a href="http://mizoochi.com/archives/791.html" rel="bookmark" title="2010 年 1 月 15 日">windows vistaでPHP開発環境の構築</a></li>

<li><a href="http://mizoochi.com/archives/269.html" rel="bookmark" title="2008 年 12 月 27 日">はてなブログのデータを移行しました。</a></li>
</ul><!-- Similar Posts took 4.035 ms -->]]></content:encoded>
			<wfw:commentRss>http://mizoochi.com/archives/9.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/archives/9.html" />
	</item>
		<item>
		<title>star ratingのいたずら防止</title>
		<link>http://mizoochi.com/archives/221.html</link>
		<comments>http://mizoochi.com/archives/221.html#comments</comments>
		<pubDate>Fri, 08 Aug 2008 10:24:23 +0000</pubDate>
		<dc:creator>mizota</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Word Press]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[デザイン]]></category>

		<guid isPermaLink="false">http://mizoochi.com/archives/221</guid>
		<description><![CDATA[スターレーティングを簡単に作成する時に重宝しているjQueryのプラグイン
jQuery Star Rating Plugin 2.4
http://www.fyneworks.com/jquery/star-ratin [...]]]></description>
			<content:encoded><![CDATA[<p>スターレーティングを簡単に作成する時に重宝しているjQueryのプラグイン<br />
jQuery Star Rating Plugin 2.4<br />
<a href="http://www.fyneworks.com/jquery/star-rating/" target="_blank">http://www.fyneworks.com/jquery/star-rating/</a></p>
<p>便利なんだけど大きなサイトとかで使う場合、デフォルトだと何度もクリック出来ちゃう。<br />
なので、いたずら防止で以下のコードを追加してあげます。</p>
<p>63行目以下ののclickイベントを以下の形に変更</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small></div>
<pre class="brush: jscript; auto-links: false; font-size: 80%;" style="margin:18px 0;">
click: function(n, el, settings){	// Selected a star or cancelled
$.rating.groups[n].current = el;
var lnk = $(el).children(&#039;a&#039;); val = lnk.text();
// Set value
$.rating.groups[n].valueElem.val(val);
//
//ここから追加
$.rating.groups[n].readOnly = true;
$.rating.groups[n].valueElem.siblings(&#039;.star_group_&#039;+n)
.addClass(&#039;star_readonly&#039;)
.removeClass(&#039;star_live&#039;)
.unbind(&quot;mouseover mouseout&quot;);
//ここまで

// Update display
if($.rating.groups[n].readOnly == false){	//このif文も追加
	$.rating.event.drain(n, el, settings);
	$.rating.event.reset(n, el, settings);
// click callback, as requested here: http://plugins.jquery.com/node/1655
if(settings.callback) settings.callback.apply($.rating.groups[n].valueElem[0], [val, lnk[0]]);
}//閉じも忘れずに。
}
</pre>
<p>1回★のレーティングした後は更新ボタン押さないといけないようになりました。<br />
古いバージョンだとイベントなどが毎回読み込まれていたようですが、新しいバージョンだと<br />
設定部分にイベント関数が来てたりと、随分内容が変わっていました。<br />
古いバージョンだと</p>
<div style="position:relative;top:18px;margin-top:-18px;"><small><strong>Java Script</strong></small></div>
<pre class="brush: jscript; auto-links: false; font-size: 80%;" style="margin:18px 0;">
settings.cancel = &lt;span class=&quot;synConstant&quot;&gt;false&lt;/span&gt;;
</pre>
<p>とclickのアクションに追加するだけなので楽ちんだったけど<br />
イベント周りがバラバラだったので、新しい方がすっきりしてると思いました。<br />
<h3>Popular Posts:</h3>
<ul class="popular-posts txt75">
<li class="txt75"><a href="http://mizoochi.com/archives/126.html" rel="bookmark" title="2008 年 11 月 27 日">jQuery ifによる要素の判定</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/145.html" rel="bookmark" title="2008 年 12 月 2 日">一新。</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/211.html" rel="bookmark" title="2008 年 2 月 21 日">いつも忘れちゃうので&#8230;UNIXタイムスタンプの変換</a></li>
<li class="txt75"><a href="http://mizoochi.com/archives/216.html" rel="bookmark" title="2008 年 3 月 21 日">JSONデータの使い方</a></li>
</ul>
<p><!-- popular Posts took 3.165 ms --></p>
Similar Posts:<ul><li><a href="http://mizoochi.com/archives/37.html" rel="bookmark" title="2008 年 11 月 3 日">ハロウィン</a></li>

<li><a href="http://mizoochi.com/archives/780.html" rel="bookmark" title="2009 年 10 月 25 日">イベント</a></li>

<li><a href="http://mizoochi.com/archives/734.html" rel="bookmark" title="2009 年 8 月 9 日">iframe等を使った子から親へイベントを渡す方法</a></li>

<li><a href="http://mizoochi.com/archives/50.html" rel="bookmark" title="2008 年 11 月 8 日">jQuery &#8211; 制作現場で使えるプラグインあれこれ</a></li>

<li><a href="http://mizoochi.com/archives/718.html" rel="bookmark" title="2009 年 8 月 5 日">夏仕様</a></li>
</ul><!-- Similar Posts took 4.149 ms -->]]></content:encoded>
			<wfw:commentRss>http://mizoochi.com/archives/221.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://mizoochi.com/archives/221.html" />
	</item>
	</channel>
</rss>

