<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
    <title>並木ねっと開発者ブログ</title>
    <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/" />
    <generator url="http://nucleuscms.org/">Nucleus CMS v3.3</generator>
    <modified>2007-06-01T22:55:39Z</modified>
    <entry>
 <title type="text/html" mode="escaped"><![CDATA[V3.3にアップグレード]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/317.htm" />
 <author>
  <name>admin</name>
 </author>
 <modified>2007-06-01T22:55:39Z</modified>
 <issued>2007-06-02T07:55:39+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[Nucleus3.3がリリースされていたので、過去の変更が元に戻る覚悟でアップグレードしてみた。<br />
<br />
問題があれば、そのとき対処ということで。]]></content>
 <id>http://develop.namiki.ne.jp/:2:317</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[ADMINクラスのバグ]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/300.htm" />
 <author>
  <name>kosugi</name>
 </author>
 <modified>2007-03-05T14:49:24Z</modified>
 <issued>2007-03-05T23:49:24+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[NucleusのADMINクラスで、テンプレート複製機能にはちょっとしたバグがある。<br />
cloned + テンプレート名の文字長が20文字を超えると、末尾につける数字が名前チェックの際とインサート時に切り取られてしまうため。<br />
<br />
select * FROM mainnucleus_template_desc WHERE tdname="clonedartica/catlist"select * FROM mainnucleus_template_desc WHERE tdname="clonedartica/catlist1"mySQL error with query INSERT INTO mainnucleus_template_desc (tdname, tddesc) VALUES ('clonedartica/catlist1','articaスキン用'): Duplicate entry 'clonedartica/catlist' for key 3<br />
<br />
こんな感じのエラーになる。<br />
<br />
対策は、$nameが一定長より伸びたら文字数制限まで縮める必要がある。<br />
ということで、ADMIN.phpの３８００行付近とwhile文のところで、substrを使用する。]]></content>
 <id>http://develop.namiki.ne.jp/:2:300</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[rss用ファイルを微調整]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/4/222.htm" />
 <author>
  <name>admin</name>
 </author>
 <modified>2007-03-01T03:06:44Z</modified>
 <issued>2007-03-01T12:06:44+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[xml-rss2.phpでブログ振り分けを指定<br />
$host = ereg_replace("\.namiki\.ne\.jp","",$_SERVER['HTTP_HOST']);<br />
selectBlog($host);]]></content>
 <id>http://develop.namiki.ne.jp/:2:222</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[NP_MobileWithSinglePageを微調整]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/220.htm" />
 <author>
  <name>kosugi</name>
 </author>
 <modified>2007-02-26T21:10:53Z</modified>
 <issued>2007-02-27T06:10:53+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[refference by pass val に関する修正をかけた。]]></content>
 <id>http://develop.namiki.ne.jp/:2:220</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[Nucleusの破壊的代入のバグ修正]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/218.htm" />
 <author>
  <name>admin</name>
 </author>
 <modified>2007-02-26T08:36:38Z</modified>
 <issued>2007-02-26T17:36:38+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[アイテムの新規追加時にプラグインオプションが正しく保存されないというバグがあるのに今日気付いた。<br />
２度目は正しく保存する・・・。<br />
その心は・・・<br />
Nucleus 3.24の日本語版PLUGIN.phpでの話し。<br />
<br />
foreachのキーに破壊的代入を行って、バグってる。<br />
phpの実装によって結果が異なるのだろうけれど。<br />
<br />
その前に、このプラグインオプションの配列は酷すぎると思うよ？<br />
<br />
							// decide wether we are using the contextid of newContextid<br />
							/*<br />
							if ($newContextid !== 0) {<br />
								$contextid = $newContextid;<br />
							}<br />
							*/<br />
							if ($newContextid !== 0) {<br />
								$id = $newContextid;<br />
							} else {<br />
							 $id = $contextid;<br />
							}<br />
							<br />
<br />
							//trigger event PrePluginOptionsUpdate to give the plugin the<br />
							//possibility to change/validate the new value for the option<br />
							$manager->notify('PrePluginOptionsUpdate',array('context' => $o->ocontext, 'plugid' => $o->opid, 'optionname' => $o->oname, 'contextid' => $id, 'value' => &$value));<br />
							// delete the old value for the option<br />
							sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($id));<br />
							<br />
							sql_query('INSERT INTO '.sql_table('plugin_option')." (oid, ocontextid, ovalue) VALUES (".intval($oid).",".intval($id).",'" . addslashes($value) . "')");<br />
<br />
問題を発見するのに数時間か・・・この忙しいときに orz.]]></content>
 <id>http://develop.namiki.ne.jp/:2:218</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[NP_LoopとNP_Shadowの連携]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/174.htm" />
 <author>
  <name>admin</name>
 </author>
 <modified>2007-02-25T23:56:39Z</modified>
 <issued>2007-02-26T08:56:39+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[&lt;%Loop(blog,4,Loop,category,all,Shadow,testloop,parsed)%&gt;<br />
こう書いたらちょっとトリッキーだろうか。<br />
NP_Loopでブログ4をループしその中のカテゴリーのすべてをループしすつ、<br />
NP_Shadowでシンボル名testloopのアイテムのbodyをスキンとしてパースする。<br />
という意味。<br />
トップページのリンク集のカテゴリー別一覧で使用している。]]></content>
 <id>http://develop.namiki.ne.jp/:2:174</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[NP_phpBB]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/6/170.htm" />
 <author>
  <name>kosugi</name>
 </author>
 <modified>2007-02-25T11:55:06Z</modified>
 <issued>2007-02-25T20:55:06+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[phpBBとの認証ブリッジはすでに開発されている模様。<br />
ざっと見た感じでは、ユーザが作成されてしまう感じか。<br />
変更はどう追いかけているのか確認してみよう。<br />
<br />
<a href="http://wakka.xiffy.nl/phpbb">http://wakka.xiffy.nl/phpbb</a>]]></content>
 <id>http://develop.namiki.ne.jp/:2:170</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[allow_call_time_pass_referenceにはまる]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/2/169.htm" />
 <author>
  <name>kosugi</name>
 </author>
 <modified>2007-02-25T09:03:48Z</modified>
 <issued>2007-02-25T18:03:48+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[昔風のコーディングをしていると、こういう仕様上の注意に気付かずに過ごしてしまう。<br />
allow_call_time_pass_reference<br />
この設定は将来Offになるそうな。<br />
<br />
このおかげで、アクセスログを超えるエラーログが保存されていた]]></content>
 <id>http://develop.namiki.ne.jp/:2:169</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[URLカスタマイズでやや悩む]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/plugins/168.htm" />
 <author>
  <name>kosugi</name>
 </author>
 <modified>2007-02-25T08:39:16Z</modified>
 <issued>2007-02-25T17:39:16+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[並木ねっとのサイトの構成を変更してみた。<br />
<br /><table cellspacing="1" cellpadding="1" border="1" align="" summary="" style="width: 398px; height: 119px;">    <tbody>        <tr>            <td>写真ニュース</td>            <td>http://photo.namiki.ne.jp</td>        </tr>        <tr>            <td>リンク集</td>            <td>http://link.namiki.ne.jp</td>        </tr>        <tr>            <td>メイン</td>            <td>http://www.namiki.ne.jp<br />
(暫定namiki.kips.gr.jp)</td>        </tr>        <tr>            <td style="vertical-align: top;">開発者ブログ</td>            <td style="vertical-align: top;">http://develop.namiki.ne.jp</td>        </tr>    </tbody></table><br />
つまり、サブドメイン名をブログ名として使用します。<br />
これには、クッキーを共有しないというセキュリティ設定も兼ねています。<br />
<br />ここで、URLカスタマイズとして拙作のNP_ShortPathを3.24用にデチューンして使用した。<br />
<br />URLカスタマイズにはmod_rewriteを使うのが一般的だけれど、ルートレベルでは<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
でディレクトリと判定されてしまいリライトが発動しない。<br />
このことに気付かずに１時間ぐらいを悩んで過ごしてしまいました。<br />
<br />php側で回避したのだけれど、rewriteRuleで回避する方法をご存知の方、教えてください。<img src="/nucleus/plugins/mitasnom/editor/images/smiley/msn/regular_smile.gif" alt="" /><br />
<br /><br /><br />]]></content>
 <id>http://develop.namiki.ne.jp/:2:168</id>
</entry><entry>
 <title type="text/html" mode="escaped"><![CDATA[クッキーの挙動に悩む]]></title>
 <link rel="alternate" type="text/html" href="http://develop.namiki.ne.jp/16/166.htm" />
 <author>
  <name>admin</name>
 </author>
 <modified>2007-02-24T11:50:05Z</modified>
 <issued>2007-02-24T20:50:05+09:00</issued>
 <content type="text/html" mode="escaped"><![CDATA[NP_ExtraCookieのバグがあったようで、ログアウトしても、再度ログインしてしまうという現象が起きていたらしい。<br />
<br />
コード修正をしてアップすると、今度はログインできなくなった。<br />
クッキー周りは修正前後でブラウザに残っているクッキーの期限やら、ログインエラーやらでトラブルが起きやすい。<br />
「ブラウザーのクッキーを削除」で初期状態にほぼ戻るので再開は可能だけれど、全員にそれをお願いするのは難しい。<br />
クッキーの削除は選択的じゃないから、普通は。]]></content>
 <id>http://develop.namiki.ne.jp/:2:166</id>
</entry>
</feed>