myGallery 拡張タグ関数
●概要
このパッチは、Wordpress用ギャラリープラグイン myGallery で使用される、ギャラリー構築用のページタグに簡易的なタグ関数を拡張するパッチです。
以前、「拡張パッチmygalsw」として公開していたものを改良したものですが、使い方は全く異なります。
●インストール
myGallery ver 1.2.1 および 1.4b6 で動作確認しています。
下記リンクより、拡張用スクリプトをダウンロードしてください。
ダウンロード mygaltagext.php-0.2.txt (2.4K)
これを、myGalleryプラグインをインストールしたディレクトリ内 wp-content/plugin/mygallery/ へ ファイル名 mygaltagext.php としてコピーします。
次に、wp-content/plugin/mygallery/mygallery.php 内に次のコード(赤文字部分)を追加します。
ver 1.2.1の場合
wp-content/plugin/mygallery/mygallery.php : line 41
@include_once(myGalleryPath. 'myfunctions/mygalleryfunctions.php');
// include tag function (add by norida)
@include_once(myGalleryPath. 'mygaltagext.php');
wp-content/plugin/mygallery/mygallery.php : line 75
$mypicture_id=$_GET[picture_id];
// tag function (add by norida)
$content = mgext_tagfunc($content);
ver 1.4b6の場合
wp-content/plugin/mygallery/mygallery.php : line 28
@include_once(myGalleryPath. 'myfunctions/mygalleryfunctions.php');
// include tag function (add by norida)
@include_once(myGalleryPath. 'mygaltagext.php');
wp-content/plugin/mygallery/mygallery.php : line 66
$myurl=get_bloginfo('wpurl').'/'.$mg_options[gallerybasepath];
// tag function (add by norida)
$content = mgext_tagfunc($content);
以上でインストールは完了です。
2007/05/08 追記
myGallery ver 1.4b4 以前のバージョンにはセキュリティに問題があります。
そのため記事内容を一部変更しました。
ver 1.4b5 以降を使用する事をお薦めします。
| 固定リンク
| コメント (0)
| トラックバック (0)
最近のコメント