<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom">
    <title>wa - NucleusやFlashなどなど</title>
	<subtitle>ブログツール Nucleus CMS に関する情報や、プラグインの配布など</subtitle>
	<id>http://wa.otesei.com/:1</id>

    <link rel="alternate" type="text/html" href="http://wa.otesei.com/" />
    <link rel="self" type="application/atom+xml" href="http://wa.otesei.com/atom.php" />
    <generator uri="http://nucleuscms.org/">Nucleus CMS v3.3</generator>
    <updated>2009-09-12T09:11:32Z</updated>

    <entry>
 <title type="html"><![CDATA[dokuwiki 見出しにセレクタを指定するプラグイン]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=535" />
 <author>
  <name>sato</name>
 </author>
 <updated>2009-09-12T09:11:32Z</updated>
 <published>2009-09-12T18:11:32+09:00</published>
 <content type="html"><![CDATA[今まで備忘録は、ローカルPCなどで動作させたNucleusでつけていたんですが、より手書き感覚に近い「wiki」で書いてみることにしてみました。新しいオモチャを使うと、自分仕様にしたくなっちゃうんですよねぇ、ということで、<a href="http://www.dokuwiki.org/ja:dokuwiki">dokuwiki</a>のプラグインを作ってみました。<br />
<br />
<h5>見出しにセレクタを指定するプラグイン</h5><br />
見出し（h1からh5）にidやclassを指定できれば、cssでアイコンを指定したりできて、もっと表現の幅が広がるなぁと思いまして。（一人wikiの発想ですけど）<br />
<img src="http://wa.otesei.com/media/1/headimage.png" width="426" height="267" alt="headselector" title="headselector" /><br />
<br />
<a href="http://www.dokuwiki.org/ja:development">ja:development</a>あたりを見たり、既存プラグインを参考にしたりして、なんとなく作ったものなので細かい部分把握しきれてません。<br />
挙動や手法でおかしな点がありましたら、直してやってくださいませ。（dokuwikiのプラグインって<a href="http://www.dokuwiki.org/ja:faq:charset">UTF-8</a>で書けば良いのかな）<br />
wikiっていうもの自体、あまり経験がないのですが、いまさらながら面白いですねぇ。dokuwikiのプラグイン構造も素敵です。使っていくうちに不満な点があれば、プラグイン作成にはまりそう（喜）。ただ、不特定多数のユーザが編集するwikiっていうものの特性上、プラグインを公開する場合、脆弱性対策には細心の注意が必要だなぁ。（当たり前か）<br />
<br />
最新バージョン（ver0.1）の解説です。<h3>解説</h3>
<div class="item_indent"><h5>必要条件</h5>
PHP 5.2.4以降（正規表現でPHP 5.2.4以降サポートの構文を使用しているため）

<h5>syntax</h5>
<p>すべての見出しレベル（1「======」から5「==」）で使用できます。</p>
<p>class名、id名に使用できない文字を指定した場合、セレクタは挿入されません。（命名規則の判定まではしていません。単純に使用文字の判定だけです。）</p>
<p>赤色の部分が、独自の記法です。<br />
<br />
<ul>
	<li>class名を指定する場合<br />
		<div class="pc"><code class="codebeautifier">
====== <span style="color:red">.{className}</span> title ======
</code></div>
		生成されるhtml
		<p>&lt;h1 <span style="color:red">class="className"</span>&gt;&lt;a name="title" id="title"&gt;title&lt;/a&gt;&lt;/h1&gt;</p>
		<br />
	</li>
	<li>id名を指定する場合<br />
		<div class="pc"><code class="codebeautifier">
====== <span style="color:red">#{idName}</span> title ======
</code></div>
		生成されるhtml
		<p>&lt;h1 <span style="color:red">id="idName"</span>&gt;&lt;a name="title" id="title"&gt;title&lt;/a&gt;&lt;/h1&gt;</p>
		<br />
	</li>
</ul>
</p>
</div>
<h3>ダウンロード</h3>
<div class="item_indent"><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=headerselector_0_1.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.1.zip</a>[26clicks]
<br /></div>
<h3>変更点</h3>
<div class="item_indent"><ul><li>新規</li></ul></div>
<br />
<h3>バージョン経歴</h3><br /><div class="item_indent"><table><thead><tr><th>Ver</th><th>Update</th><th>Download</th></tr></thead><tbody><tr onmouseover="focusRow(this);" onmouseout="blurRow(this);"><td><span class="atteR">最新</span><br /><a href="http://wa.otesei.com/headerselector-ver=0.1" title="0.1の解説ページへ">0.1</a></td><td><ul><li>新規</li></ul></td><td><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=headerselector_0_1.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.1.zip</a>[26clicks]
<br /></td></tr></tbody></table><img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_exclamation.gif" alt=":!!:" class="znsm_img" /><img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_arrow_top.gif" alt=":arwtop:" class="znsm_img" />verをクリックすると、各verの解説に切り替わります。<br /><br /><div class="say2"><div class="say4"><div class="say6"><div class="say8"><div class="say1"><div class="say3"><div class="say7"><div class="say9">プラグインのバージョンアップ情報をRSSで配信しています。バグ情報などもお届けいたしますので、拙作プラグインをお使いの際には、是非RSSリーダーにご登録ください。<img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_exclamation.gif" alt=":!!:" class="znsm_img" /><a href="http://wa.otesei.com/plug_ver_rss.php" title="右クリックからコピーして、RSSリーダーにご登録ください。">佐藤（な）作成・改造のプラグインバージョンアップ情報RSS</a></div></div></div></div></div></div></div></div></div>]]></content>
 <id>http://wa.otesei.com/:1:535</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗7]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=534" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-12-19T03:15:08Z</updated>
 <published>2008-12-19T12:15:08+09:00</published>
 <content type="html"><![CDATA[ダウンロードを一旦止めていましたが、修正して<a href="http://wa.otesei.com/item/530">再開</a>しました。2008.12.18 以前にダウンロードしていた方はお手数ですが、再度ダウンロードしてください。（バージョンはあげていません）<br />
<br />
SkinnableAdminの開発用Nucleusでは、<a href="http://wa.otesei.com/item/526">スペシャルスキンタイプを動的に変更できるといいのにな。</a>の改造を施しています。公開するにあたって、一応コアの改造が不要なようにしたのですが、公開直前に差し込んだコードのテストが不十分でポカミスしていました。]]></content>
 <id>http://wa.otesei.com/:1:534</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗6]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=530" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-12-14T15:48:53Z</updated>
 <published>2008-12-15T00:48:53+09:00</published>
 <content type="html"><![CDATA[まだまだ問題は山積、テストも不十分なんですが、構造サンプルということで一旦公開いたします。しょぼくてすみません。<br />
<br />
今のところ、、<br />
・管理画面作成フレームワーク（作りかけ）<br />
・overviewアクション<br />
・itemlistアクション<br />
・createitemアクション<br />
・additemアクション<br />
を実装しただけです。プラグインの対応も不十分です。<br />
管理画面作成フレームワーク自体の構造が変わる可能性もありますので、各アクションの実装方法ドキュメントはまだ着手していません。<br />
<br />
最新バージョン（ver0.2alpha）の解説です。<h3>解説</h3>
<div class="item_indent">NP_SkinnableAdminと、choiaスキンをインストールし、表スキンの好きな場所に
<div class="code">&lt;%SkinnableAdmin(adminpage, 管理ページ)%&gt;</div>と書くとそこに管理画面へのリンクが出力されます。
お試しの際は、ローカルPC内など、外部に公開しない環境でお願いします。</div>
<h3>ダウンロード</h3>
<div class="item_indent"><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=NP_SkinnableAdmin_0_2alpha.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.2alpha.zip</a>[79clicks]
<br /><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=NP_SkinnableAdmin_0_2alpha_choia_skin.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.2alpha_choia_skin.zip</a>[69clicks]
<br /></div>
<h3>変更点</h3>
<div class="item_indent"><ul><li>構造確認用公開</li></ul></div>
<br />
<br />
あ、<span style="color: blue; font-size: 16px; font-weight: bold;">PHP5</span>じゃないと動きません。＆UTF-8しか想定していません。<br />
]]></content>
 <id>http://wa.otesei.com/:1:530</id>
</entry><entry>
 <title type="html"><![CDATA[スペシャルスキンタイプを動的に変更できるといいのにな。]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=526" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-12-13T14:30:50Z</updated>
 <published>2008-12-13T23:30:50+09:00</published>
 <content type="html"><![CDATA[#[追記] 動的に指定できるといいのにな。 のほうが適切かな。<br />
<br />
スペシャルスキンパーツのことなんですけど、自分の中では「スペシャルスキンタイプ」とよんでます。<br />
<br />
使用するスキンはグローバル変数 $skinid を変更することで動的に変えることができますが、スキンタイプは InitSkinParse イベントで値渡しされるため、プラグインで変更することができません。<br />
<br />
SKIN.phpの以下の部分、<br />
<div class="code"><code class="codebeautifier">
<var>$manager</var>-&gt;notify(<span class="string_literal">'InitSkinParse'</span>,<span class="reserved">array</span>(<span class="string_literal">'skin'</span>&nbsp;=&gt;&nbsp;&amp;<var>$this</var>,&nbsp;<span class="string_literal">'type'</span>&nbsp;=&gt;&nbsp;<var>$type</var>));&nbsp;<span class="comment">//最後のところが、&amp;$type&nbsp;になれば</span>
</code></div>リファレンス渡しになれば、夢が広がります。<br />
<br />
SkinnableAdminの管理ページは、スペシャルスキンタイプを使っています。URLに任意のパラメータが与えられると発動し、（プラグインオプションで）設定したスキンの「Admin」スキンタイプをパースします。現状では上記箇所をリファレンス渡しに改造するか、InitSkinParse イベント以降の制御を無理やり奪うかのどちらかが必要になります。<br />
<br />
スキンタイプがリファレンス渡しになれば、他にも面白いことができるんじゃないかと思います。]]></content>
 <id>http://wa.otesei.com/:1:526</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗5]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=523" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-11-28T15:56:55Z</updated>
 <published>2008-11-29T00:56:55+09:00</published>
 <content type="html"><![CDATA[ここ数日はデータベース周りを再調整してました。<br />
<a href="http://kandk.cafe.coocan.jp/nucleus/" class="znkwl" title="Katsumiさん">Katsumiさん</a>作の<a href="http://kandk.cafe.coocan.jp/blog/jeans/index.php?itemid=685">汎用PDOエミュレータ</a>のpdo_mysqlドライバ用sql_biosクラスと、スタティックに使うためにPDOエミュレータをラップするクラスを作って、一応dsnから使用するDBドライバ用sql_biosクラスを自動で読む構造にしてみました。<br />
って、まだpdo_mysqlドライバがない環境でテストしてません。普段使わない機能もあって、検証もしてません。<br />
<div class="code"><code class="codebeautifier">
&lt;?php<br />
<var>$stmt</var>&nbsp;=&nbsp;SA_DB::query(<var>$query</var>);<br />
<var>$blog</var>&nbsp;=&nbsp;<var>$stmt</var>-&gt;fetch(PDO::FETCH_ASSOC);<br />
?&gt;
</code></div>こんな雰囲気で使用します。<br />
<br />
でも本当は、Nucleusの機能（管理画面）作るのに、自前でDB接続する必要ないわけです。ただ、「管理ページ作成フレームワーク」内のaction実装にPDO記法使いたかったっていうだけで、長い遠回りをしました。<br />
あと、また懲りもせず構造部分の変更を繰り返す日々。これで良いのか？こんな構造で良いのか？って、もういい加減にしておきます。<br />
<br />
さぁ、アイテム投稿画面周りの実装に戻ろう。]]></content>
 <id>http://wa.otesei.com/:1:523</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗4]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=521" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-11-18T15:42:20Z</updated>
 <published>2008-11-19T00:42:20+09:00</published>
 <content type="html"><![CDATA[ほふく前進<br />
<br />
アイテム投稿画面は、<br />
skins/choia/admintemplate/item/brogname/admin-add.tpl<br />
（choiaは今回管理画面用に作ったスキン。brognameはブログのショートネーム）<br />
って感じでテンプレートファイルを配置しておくとそれを読み、無い場合デフォルトのテンプレートを読む構造にしました。<br />
ブログのショートネーム別にディレクトリが分かれていますので、ブログごとに違うアイテム投稿画面を持つことができます。<br />
<br />
このあいだ、一部画像にパスが通っていなかったのを通るようにしたり、メディアポップアップurlの設定用変数を実装したり、らじば（違<br />
<br />
skinnable admin実装するなら、<a href="http://kandk.cafe.coocan.jp/blog/jeans/">Jeans CMS</a>や、<a href="http://www.matsubarafamily.com/lab/">Foodyn CMS</a>に実装したほうが建設的な気がしてならない今日この頃。]]></content>
 <id>http://wa.otesei.com/:1:521</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗3]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=519" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-11-13T15:07:13Z</updated>
 <published>2008-11-14T00:07:13+09:00</published>
 <content type="html"><![CDATA[<div class="leftbox"><a href="http://wa.otesei.com/media/1/sa.createitem.png">createitem</a></div><br />
アイテム新規投稿actionを実装中です。<br />
ざっくり動くようになりました。<br />
ツールバーやヘルプのアイコンのパスが通ってないですね。<br />
スマイリープラグインも無事動いています。<br />
受け口のadditem actionを実装していないので、まだ投稿テストはしてません。]]></content>
 <id>http://wa.otesei.com/:1:519</id>
</entry><entry>
 <title type="html"><![CDATA[SkinnableAdmin進捗2]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=517" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-11-12T14:46:07Z</updated>
 <published>2008-11-12T23:46:07+09:00</published>
 <content type="html"><![CDATA[各actionごとの権限確認機能を実装しました。<br />
<br />
Nucleus管理画面での（ページ遷移する）操作は、「action」という単位で処理されます。<br />
スキナブルアドミンは、この「action」の、データ処理をModel、表示をViewとして実装するための簡易フレームワークなのですが、各データ処理用Model内で毎回権限確認を行うのはしんどいので、構造体を定義するだけで自動的に例外をthrowする構造にしてみました。権限確認を行う必要が無くなる（減る？）ので、各データ処理用Modelの実装が楽になると思います。全actionに通用するかは未確認。（ひょっとしてこの機能、取っ払うかも...）<br />
<br />
Nucleus管理画面のaction名ってば統一感ない気がしますが、気のせいです？<br />
権限確認も余分なものがある気がしますが、気のせいです？]]></content>
 <id>http://wa.otesei.com/:1:517</id>
</entry><entry>
 <title type="html"><![CDATA[Skinnable Admin 計画の進捗]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=514" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-11-07T14:31:04Z</updated>
 <published>2008-11-07T23:31:04+09:00</published>
 <content type="html"><![CDATA[Nucleus合宿後、放置しまくっていたSkinnable Adminの進捗です。<br />
<a href="http://sa.otesei.com/wiki/">Skinnable Admin wiki</a> のサイトトップにタイトルを付けました。<br />
<br />
あ、スキナブルアドミンっていうのは、何かとストレスのもととなるNucleusの管理画面を、Nucleus自体で作って自由にカスタマイズできるようにしちゃおうって計画です。<br />
6000行以上あるADMIN.phpの機能を実装するわけなので、しんどそうなのが目に見えて、それがまた萎える要因のひとつだったりします。一応、各機能（action）を実装するための枠組み（フレームワーク）自体はほぼ完成しています。<br />
あと少し、あと少し、と思いながらも雑念が多くてなかなか進みません。細かいこと気にせず出しちゃえって、自分でも思ってるんですけどねぇ。<br />
<br />
TODO（意味不明）<br />
<ul><li>アイテム投稿関係</li><li>デザイン</li><li>権限関連</li><li>リスト関連</li><li>メッセージ関連</li><li>extrahead関連</li><li>quickmenu関連</li><li>ドキュメント</li></ul><br />
もう、ロゴ・アイコンは要らないからね（自分<img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_ase.gif" alt=":ase:" class="znsm_img" />]]></content>
 <id>http://wa.otesei.com/:1:514</id>
</entry><entry>
 <title type="html"><![CDATA[プラグインジェネレータ NP_PluginGenerator]]></title>
 <link rel="alternate" type="text/html" href="http://wa.otesei.com/?itemid=512" />
 <author>
  <name>sato</name>
 </author>
 <updated>2008-09-21T13:08:31Z</updated>
 <published>2008-09-21T22:08:31+09:00</published>
 <content type="html"><![CDATA[<div><img src="http://wa.otesei.com/znplug/img/NP_PluginGenerator.gif" alt="PluginGenerator" style="margin: 0 10px 2px 0; float: left;" />
プラグインのベースを簡単に生成するプラグイン。<br />
（引数の解説などを参考に）欲しい機能をチョイスするだけで雛形を作ります。</div>
最新バージョン（ver0.1alpha）の解説です。<h3>解説</h3>
<div class="item_indent"><h5>インストール</h5>
アップロード後、plugingeneratorディレクトリのパーミッションを777にします。

<h5>グローバルオプション（プラグイン一覧の「編集」）</h5>
<ul>
	<li>「プラグインの雛形を作成しますか？」・・・「はい」にした時だけプラグインファイルを生成します。生成後は、「いいえ」に戻ります。</li>
	<li>「生成した雛形をダウンロードしますか？」・・・「はい」の場合、plugingeneratorディレクトリ下に生成した雛形ファイル（.phps）をダウンロードします。</li>
</ul>

<h5>使い方</h5>
<ol>
	<li>プラグインの「編集」リンク、もしくはクイックメニューから、グローバルオプション画面に入る</li>
	<li>プラグイン名などの必要事項（基本情報）を入力</li>
	<li>必要な機能をチョイス</li>
	<li>「プラグインの雛形を作成しますか？」を「はい」にして、「オプションの保存」を押す</li>
	<li>plugingeneratorディレクトリ下にプラグインの雛形ファイル（.phps）が生成される。<br />
	「生成した雛形をダウンロードしますか？」が「はい」の場合、ダウンロードダイアログが出ます。</li>
</ol>
そのまま実行できるようにはあえてしていません。.phpにリネームして（pluginsディレクトリに置いて）お使いください。<br />
<a href="http://wa.otesei.com/item/511" title="動作ムービー">動作ムービー</a>を作成しました。

<h5>注意</h5>
すべてのイベントの検証はできていません。お気づきの点がありましたらよろしくです。

<h5>構想</h5>
<ul>
<li>プラグイン専用の管理ページも簡単に実装できる仕組みなんかもあったら良いなぁ</li>
<li>do***Var系のパラメータを &lt;%hoge(key1:value1, key2:value2)&gt; 形式で指定できるようにする仕組み</li>
<li>プラグインオプションの実装サポートもできると良いなぁ（無計画）</li>
<li>ブラウザ上で編集・実行は危ないからナシ！</li>
</ul></div>
<h3>ダウンロード</h3>
<div class="item_indent"><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=NP_PluginGenerator_0_1alpha.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.1alpha.zip</a>[146clicks]
<br /></div>
<h3>変更点</h3>
<div class="item_indent"><ul><li>初期バージョン</li></ul></div>
<br />
<h3>バージョン経歴</h3><br /><div class="item_indent"><table><thead><tr><th>Ver</th><th>Update</th><th>Download</th></tr></thead><tbody><tr onmouseover="focusRow(this);" onmouseout="blurRow(this);"><td><span class="atteR">最新</span><br /><a href="http://wa.otesei.com/NP_PluginGenerator-ver=0.1alpha" title="0.1alphaの解説ページへ">0.1alpha</a></td><td><ul><li>初期バージョン</li></ul></td><td><a href='http://wa.otesei.com/action.php?action=plugin&amp;name=LinkCounter&amp;type=c&amp;k=NP_PluginGenerator_0_1alpha.zip'><img src="http://wa.otesei.com/media/plug/download.gif" alt="download" class="download-icon" />0.1alpha.zip</a>[146clicks]
<br /></td></tr></tbody></table><img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_exclamation.gif" alt=":!!:" class="znsm_img" /><img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_arrow_top.gif" alt=":arwtop:" class="znsm_img" />verをクリックすると、各verの解説に切り替わります。<br /><br /><div class="say2"><div class="say4"><div class="say6"><div class="say8"><div class="say1"><div class="say3"><div class="say7"><div class="say9">プラグインのバージョンアップ情報をRSSで配信しています。バグ情報などもお届けいたしますので、拙作プラグインをお使いの際には、是非RSSリーダーにご登録ください。<img src="http://wa.otesei.com/nucleus/plugins/emoticons/icon_exclamation.gif" alt=":!!:" class="znsm_img" /><a href="http://wa.otesei.com/plug_ver_rss.php" title="右クリックからコピーして、RSSリーダーにご登録ください。">佐藤（な）作成・改造のプラグインバージョンアップ情報RSS</a></div></div></div></div></div></div></div></div></div>]]></content>
 <id>http://wa.otesei.com/:1:512</id>
</entry>
</feed>