<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Plugin on php-tips.com</title>
    <link>https://php-tips.com/tags/plugin/</link>
    <description>Recent content in Plugin on php-tips.com</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <lastBuildDate>Fri, 03 Jul 2015 09:48:56 +0900</lastBuildDate>
    <atom:link href="https://php-tips.com/tags/plugin/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>CakePHP 3 プラグインの名前空間をベンダー名付きにする方法</title>
      <link>https://php-tips.com/2015/07/03/cakephp3-load-plugin-with-vender-namespace/</link>
      <pubDate>Fri, 03 Jul 2015 09:48:56 +0900</pubDate>
      <guid>https://php-tips.com/2015/07/03/cakephp3-load-plugin-with-vender-namespace/</guid>
      <description>&lt;p&gt;詳しくはこちらを、&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://book.cakephp.org/3.0/en/plugins.html#loading-a-plugin&#34; title=&#34;Plugins — CakePHP Cookbook 3.x documentation&#34;&gt;Plugins — CakePHP Cookbook 3.x documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;CakePHP 3の標準ではプラグイン名＝名前空間名となります。&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Foo&lt;/code&gt;というプラグイン名なら、モデルやコントローラーの名前空間は、&lt;code&gt;\Foo\Model&lt;/code&gt;や&lt;code&gt;\Foo\Controller&lt;/code&gt;になります。
&lt;code&gt;AcmeCorp\ContactManager\Model&lt;/code&gt;, &lt;code&gt;AcmeCorp\ContactManager\Controller&lt;/code&gt;のようにベンダー名などを含めた名前空間をプラグインで使用したい場合は、以下のように&lt;code&gt;/&lt;/code&gt;で区切って呼び出します。&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHPで使えるテンプレートエンジンまとめ (CakePHP Advent Calendar 2011 17日目)</title>
      <link>https://php-tips.com/2011/12/17/cakephp-advent-calendar-2011-17/</link>
      <pubDate>Sat, 17 Dec 2011 09:00:57 +0900</pubDate>
      <guid>https://php-tips.com/2011/12/17/cakephp-advent-calendar-2011-17/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;http://php-tips.com/wp-content/uploads/2011/12/cakephp_logo_250_trans-150x150.png&#34; alt=&#34;&#34; title=&#34;cakephp_logo_250_trans&#34; width=&#34;150&#34; height=&#34;150&#34; class=&#34;alignleft size-thumbnail wp-image-695&#34; /&gt;こんにちは、nojimageです。この記事は &lt;a href=&#34;http://atnd.org/events/22721&#34;&gt;CakePHP Advent Calendar 2011&lt;/a&gt; 17日目の記事として書いています。前日は &lt;a href=&#34;https://twitter.com/#!/BiMihoujyun&#34;&gt;@BiMihoujyun&lt;/a&gt;さんの「&lt;a href=&#34;http://bimi.jpn.com/?p=188&#34;&gt;BMB » CakePHP2から追加されたCakeEmailをおいしく頂く。&lt;/a&gt;」というエントリーでした。CakePHP2.0ではメール周りに関してかなり改善されていますので、ぜひ先の記事を参考にして試してみてください。&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHP Skel Plugin &amp;#8211; CakePHPプロジェクトのひな形</title>
      <link>https://php-tips.com/2011/08/03/cakephp-skel-plugin-cakephp/</link>
      <pubDate>Wed, 03 Aug 2011 22:23:26 +0900</pubDate>
      <guid>https://php-tips.com/2011/08/03/cakephp-skel-plugin-cakephp/</guid>
      <description>&lt;p&gt;CakePHPのプロジェクトを素早く立ち上げるためのプラグイン&lt;a href=&#34;http://php-tips.com/php/cakephp-php/2011/04/cakephp-kickstart-plugin&#34;&gt;Kickstart&lt;/a&gt;を以前ご紹介しましたが、それに関連して、CakePHPのプロジェクトのひな形を提供するskelを公開しています。&lt;/p&gt;
&lt;p&gt;nojimage/CakePHP-skel - GitHub
&lt;a href=&#34;https://github.com/nojimage/CakePHP-skel&#34;&gt;&lt;a href=&#34;https://github.com/nojimage/CakePHP-skel&#34;&gt;https://github.com/nojimage/CakePHP-skel&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;※このプラグインはCakePHP1.3向けです。
※08/25 appディレクトリを対象とするbakeについて追記しました。&lt;/p&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHPのプラグインViewを上書きする</title>
      <link>https://php-tips.com/2011/05/03/cakephp-override-plugin-views/</link>
      <pubDate>Tue, 03 May 2011 22:15:55 +0900</pubDate>
      <guid>https://php-tips.com/2011/05/03/cakephp-override-plugin-views/</guid>
      <description>&lt;p&gt;今日は軽めのネタをひとつ。&lt;/p&gt;
&lt;p&gt;CakePHP1.3では、APP側からプラグインのViewを上書きすることができます。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://book.cakephp.org/view/1647/Overriding-plugin-views-from-inside-your-applicati&#34;&gt;Overriding plugin views from inside your application :: Plugin Views :: Plugins :: Developing with CakePHP :: The Manual :: 1.3 Collection&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHP Kickstart Plugin</title>
      <link>https://php-tips.com/2011/04/13/cakephp-kickstart-plugin/</link>
      <pubDate>Wed, 13 Apr 2011 22:17:42 +0900</pubDate>
      <guid>https://php-tips.com/2011/04/13/cakephp-kickstart-plugin/</guid>
      <description>&lt;p&gt;CakePHPプロジェクトを立ち上げやすくするため、Kickstartプラグインなるものを作りはじめています。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/nojimage/CakePHP-Kickstart-Plugin&#34;&gt;nojimage/CakePHP-Kickstart-Plugin - GitHub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;日本語での説明はこちら
&lt;a href=&#34;https://github.com/nojimage/CakePHP-Kickstart-Plugin/wiki&#34;&gt;CakePHP Kickstart plugin - GitHub&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>MySQL Workbench 5.2 &amp;#8211; export to PHP format plugin</title>
      <link>https://php-tips.com/2011/03/22/mysql-workbench-5-2-export-php-format-plugin/</link>
      <pubDate>Tue, 22 Mar 2011 09:00:28 +0900</pubDate>
      <guid>https://php-tips.com/2011/03/22/mysql-workbench-5-2-export-php-format-plugin/</guid>
      <description>&lt;h3&gt;何をするの?&lt;/h3&gt;
&lt;p&gt;MySQL Workbenchで発行したクエリ(SELECT文等)の結果をPHPの連想配列形式にて出力するプラグインです。
実データからテストデータを作成する場合などに有用かと存じ上げます。&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHPプラグインのwebrootをシンボリックリンクするシェルコマンド</title>
      <link>https://php-tips.com/2011/02/04/cakephp-plugin-webroot-ln-shell/</link>
      <pubDate>Fri, 04 Feb 2011 09:00:32 +0900</pubDate>
      <guid>https://php-tips.com/2011/02/04/cakephp-plugin-webroot-ln-shell/</guid>
      <description>&lt;p&gt;やっぱりサゴーゾが一番ですよね。こんにちはnojimageです。
今日は、CakePHPでプラグイン内部にcss,js等を持つ場合に、若干のパフォーマンスアップを行うためのシェルスクリプトのご紹介です。&lt;/p&gt;
&lt;p&gt;プラグイン内部のcss,jsは、特に対策を行わなければDispatcherを通して出力され、これはかなりのオーバヘッドを伴います。
この対策として、APP/webroot配下にシンボリックリンクを張ることで、.htaccessに記述されているmod_rewriteの設定により直接apacheから出力するようにできます。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2011.04.22追記: Themeにも対応しました。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
    <item>
      <title>CakePHPでmixi Graph APIを扱うためのプラグイン MixiKit 0.1を公開しました</title>
      <link>https://php-tips.com/2010/10/06/cakephp_mixi-graph-api_plugin_on_github/</link>
      <pubDate>Wed, 06 Oct 2010 09:00:29 +0900</pubDate>
      <guid>https://php-tips.com/2010/10/06/cakephp_mixi-graph-api_plugin_on_github/</guid>
      <description>&lt;p&gt;先の記事に書いた通り、&lt;a href=&#34;http://php-tips.com/php/cakephp-php/2010/10/phpmatsuri2010_mixi-graph-api_cakephp-plugin&#34;&gt;PHP Matsuri 2010にて作成した&lt;/a&gt;CakePHP向けのmixi Graph APIを扱うためのプラグイン&amp;quot;MixiKit&amp;quot;をgithubにて公開しています。&lt;/p&gt;</description>
    </item>
    <item>
      <title>PHP Matsuriでmixi Graph APIのCakePHP Pluginを作ってきました</title>
      <link>https://php-tips.com/2010/10/05/phpmatsuri2010_mixi-graph-api_cakephp-plugin/</link>
      <pubDate>Tue, 05 Oct 2010 01:57:09 +0900</pubDate>
      <guid>https://php-tips.com/2010/10/05/phpmatsuri2010_mixi-graph-api_cakephp-plugin/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://php-tips.com/wp-content/uploads/2010/10/phpmatsuri2010.png&#34;&gt;&lt;img src=&#34;http://php-tips.com/wp-content/uploads/2010/10/phpmatsuri2010.png&#34; alt=&#34;phpmatsuri2010&#34; title=&#34;phpmatsuri2010&#34; width=&#34;320&#34; height=&#34;195&#34; class=&#34;alignnone size-full wp-image-472&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PHPerの祭典、&lt;a href=&#34;http://2010.phpmatsuri.net/&#34;&gt;PHP Matsuri&lt;/a&gt;に行ってきました。&lt;/p&gt;
&lt;p&gt;PHP Matsuriとは、10月2日、3日の2日間にわたって開催された、日本最大級のPHP開発合宿イベントです。80名近い参加者が集まり、とてもホットなイベントとなりました。&lt;/p&gt;
&lt;p&gt;どんなことが行われていたかは、私より筆のうまい他の方のレポート記事にお任せするとして、私がハッカソンで行った内容について書きます。&lt;/p&gt;
&lt;p&gt;今回私は、他の人がまず作らないだろうなーと言うことで、先日公開された&lt;a href=&#34;http://developer.mixi.co.jp/connect/mixi_graph_api&#34;&gt;mixi Graph API&lt;/a&gt;のCakePHP向けプラグインを作ってみることにしました。
以前に、&lt;a href=&#34;http://php-tips.com/php/cakephp-php/2010/07/cakephp-twitterkit-slid&#34;&gt;TwitterKitというTwitterを利用するプラグインパッケージを作成していた&lt;/a&gt;ので、ほぼ同じような機能を実装することに。&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;APIを呼び出すDataSouceを提供する。
  （DataSouceにするのは、database.phpでアプリケーション固有の設定が出来るため&lt;/li&gt;
	&lt;li&gt;OAuthで認証を行い、AccessTokenをデータベースへ保存するOauthControllerを提供する&lt;/li&gt;
	&lt;li&gt;他、付随するModel、Component、Helperを提供する&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;以上の機能をもつプラグインを作ってサンプルアプリケーションを行うことを目標に設定しました。&lt;/p&gt;
&lt;p&gt;会場到着後、午前中は基調講演などのセッションを聴いて、開発を開始したのは午後からでした。気になるセッションを聴きにいきながら、ちまちま環境構築してコーディング開始です。&lt;/p&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
    <item>
      <title>jQueryのplugin作成時にajaxメソッドのcallbackで呼び出し元のエレメントを呼び出す方法</title>
      <link>https://php-tips.com/2010/07/17/jquery-plugin-ajax-callback-element/</link>
      <pubDate>Sat, 17 Jul 2010 00:15:23 +0900</pubDate>
      <guid>https://php-tips.com/2010/07/17/jquery-plugin-ajax-callback-element/</guid>
      <description>&lt;p&gt;皆さんプラグイン作ってますかー。わたしは作ってます、CakePHPの方ですが。
というわけで、こんにちは。今回もタイトルが長いですね。&lt;/p&gt;
&lt;p&gt;とある日、jQueryでプラグインを書いていたときのことです。&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQLダンプを生成するCakePHPプラグイン &amp;#8220;Sql Dumper&amp;#8221;</title>
      <link>https://php-tips.com/2010/05/27/cakephp-sql-dumper/</link>
      <pubDate>Thu, 27 May 2010 22:37:47 +0900</pubDate>
      <guid>https://php-tips.com/2010/05/27/cakephp-sql-dumper/</guid>
      <description>&lt;p&gt;とあるプロジェクトで、データベースのバックアップ用にSQLを吐き出す必要があったので作ってみました。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://github.com/nojimage/sql_dumper&#34;&gt;Sql Dumper Plugin for CakePHP 1.2+(github)&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;プラグインといっても1ファイル1クラスのみ&#34;&gt;プラグインといっても、1ファイル1クラスのみ。。&lt;/h1&gt;
&lt;h2&gt;できること&lt;/h2&gt;
&lt;ul&gt;
    &lt;li&gt;DataSourceからテーブルを取得して、Create、Drop文を生成&lt;/li&gt;
    &lt;li&gt;テーブルに登録されているデータをInsert文として生成&lt;/li&gt;
    &lt;li&gt;生成したSQLを指定したファイルへ吐き出し&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;mysqldumpやpg_dumpの代用になりますが、SQLの生成にはCakeSchemaクラスを利用しているので、Schemaで作成したテーブル以外は正しくダンプできるとは限りません。&lt;/p&gt;
&lt;h1 id=&#34;定義されていない型とかトリガーとか&#34;&gt;定義されていない型とか、トリガーとか。&lt;/h1&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
    <item>
      <title>マークアップ補助用 jquery プラグイン2種</title>
      <link>https://php-tips.com/2010/02/02/%E3%83%9E%E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A3%9C%E5%8A%A9%E7%94%A8-jquery-%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B32%E7%A8%AE/</link>
      <pubDate>Tue, 02 Feb 2010 22:51:37 +0900</pubDate>
      <guid>https://php-tips.com/2010/02/02/%E3%83%9E%E3%83%BC%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%E8%A3%9C%E5%8A%A9%E7%94%A8-jquery-%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B32%E7%A8%AE/</guid>
      <description>&lt;ul&gt;
	&lt;li&gt; &lt;a href=&#34;http://bit.ly/a5Wp8P&#34;&gt;jquery.markup_first_last.js [Gist]&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&#34;http://bit.ly/9fR9YP&#34;&gt;jquery.firefox_table_fix.js [Gist]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;最初と最後の子要素にスタイルクラスを与える jquery.markup_first_last.js&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;指定した要素の最初の子要素に、class=&amp;ldquo;first&amp;quot;を、最後の子要素に class=&amp;ldquo;last&amp;quot;を付与するプラグインです。&lt;/p&gt;</description>
    </item>
    <item>
      <title>リスト、表組みなどのマークアップをサポートするjQueryプラグイン jquery.alternation.js</title>
      <link>https://php-tips.com/2009/12/15/jquery-alternation-js/</link>
      <pubDate>Tue, 15 Dec 2009 23:01:12 +0900</pubDate>
      <guid>https://php-tips.com/2009/12/15/jquery-alternation-js/</guid>
      <description>&lt;p&gt;今回はリストや表組みで交互に色を変えるなど、スタイルを適用するときに便利なjQueryプラグインをご紹介します。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://bit.ly/4tAhBL&#34;&gt;jquery.alternation.js [ダウンロード]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HTMLで以下のようなリストがあったとき、リストを見やすくするため交互に背景色をつける場合は、背景色をつける要素になんらかのスタイルクラスを与え、そのスタイルクラスに対して背景色を指定する方法があります。&lt;/p&gt;
&lt;pre class=&#34;brush: html&#34;&gt;
&amp;lt;ul&amp;gt;
		&amp;lt;li&amp;gt;リンゴ&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;バナナ&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;ミカン&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;イチゴ&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;
&lt;p&gt;背景色をつける要素にalterクラスを指定&lt;/p&gt;
&lt;pre class=&#34;brush: html&#34;&gt;
&amp;lt;ul&amp;gt;
		&amp;lt;li&amp;gt;リンゴ&amp;lt;/li&amp;gt;
		&amp;lt;li class=&#34;alter&#34;&amp;gt;バナナ&amp;lt;/li&amp;gt;
		&amp;lt;li&amp;gt;ミカン&amp;lt;/li&amp;gt;
		&amp;lt;li class=&#34;alter&#34;&amp;gt;イチゴ&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;
&lt;p&gt;CSSは下記のように指定します。&lt;/p&gt;
&lt;pre class=&#34;brush: css&#34;&gt;
ul li {
		/* 通常のリストの指定 */
}
ul li.alter {
		/* 背景色を薄い灰色にする */
		background-color: #e6e6e6;
}
&lt;/pre&gt;
&lt;p&gt;しかし、この方法を手動で行うと項目の数が増えた場合、HTMLのマークアップが煩雑になります。また、項目の追加や削除があった場合の作業も、考えただけでイヤになります。&lt;/p&gt;
&lt;p&gt;そこで、本jQueryプラグインの出番です。&lt;/p&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
    <item>
      <title>文字の均等割り付けを行うjQueryプラグイン jQuery.justify.js</title>
      <link>https://php-tips.com/2009/12/05/%E6%96%87%E5%AD%97%E3%81%AE%E5%9D%87%E7%AD%89%E5%89%B2%E3%82%8A%E4%BB%98%E3%81%91%E3%82%92%E8%A1%8C%E3%81%86jquery%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3-jquery-justify-js/</link>
      <pubDate>Sat, 05 Dec 2009 13:09:06 +0900</pubDate>
      <guid>https://php-tips.com/2009/12/05/%E6%96%87%E5%AD%97%E3%81%AE%E5%9D%87%E7%AD%89%E5%89%B2%E3%82%8A%E4%BB%98%E3%81%91%E3%82%92%E8%A1%8C%E3%81%86jquery%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3-jquery-justify-js/</guid>
      <description>&lt;p&gt;日本人は表組が大好きです。
クリスマスのチキンより表組みが好きなんです。（嘘&lt;/p&gt;
&lt;p&gt;そんな表組の中で時折見かけるのが下表のようなデザイン。&lt;/p&gt;
&lt;p&gt;[caption id=&amp;ldquo;attachment_285&amp;rdquo; align=&amp;ldquo;alignnone&amp;rdquo; width=&amp;ldquo;303&amp;rdquo; caption=&amp;ldquo;表1&amp;rdquo;]&lt;img src=&#34;http://php-tips.com/wp-content/uploads/2009/12/427feeba2c3a5b495c286f27ae1fdcc3.png&#34; alt=&#34;表1&#34; title=&#34;justify-sample&#34; width=&#34;303&#34; height=&#34;168&#34; class=&#34;size-full wp-image-285&#34; /&gt;[/caption]&lt;/p&gt;
&lt;p&gt;見出し部分を均等割り付けです。
均等割り付けなんかイヤだ！といってもやらなきゃいけないときもあるわけで。&lt;/p&gt;
&lt;p&gt;普通、こういう表現をする場合スペースなんかで間隔を揃えてしまいがちですが、アクセシビリティを考えるとあんまりよろしくありません。&lt;/p&gt;
&lt;p&gt;そんなとき、CSSプロパティのletter-spacingを利用して文字間隔を揃えます。
しかし、手動でやるのは文字数やフォントサイズが変わるたびに値を調整しないといけないため、あまり効率的ではありません。&lt;/p&gt;
&lt;p&gt;そんなときに使えるのが本jQueryプラグインになります。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://bit.ly/4CU0Fs&#34; title=&#34;http://gist.github.com/249164&#34;&gt;jQuery.justify.js  [ダウンロード]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;※IE6, 7, 8, firefox 3.5, Safari 4, Google Chorme 4での動作を確認しています。&lt;/p&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
