wpng-calendar導入には、あらかじめGoogleアカウントの登録とGoogleカレンダーの作成(および、カレンダーの公開設定)が必要です。
ここでは既にそれらが終わっているものとして、wpng-calendarの導入と有効化のみ記述します。
Google Calendarの予定表をWordPressに読み込むpluginです。
wpng-calendarは以下のサイトからダウンロード。
Mar 2008時点で Version 0.8.5 が最新。
ダウンロードサイトにもリンクがありますが、Google Data APIのキーをもらうためにサインアップします。
URLを入れるだけで、ながーいキーがもらえます。
$ cd ~ $ wget http://wpng-calendar.googlecode.com/files/wpng-calendar_0.8.5.zip $ cd ~/.avfs/***/wpng-calendar_0.8.5.zip# $ cp -a wpng-calendar ~/***/wp-content/plugins/.
$ cd ~ $ wget http://datejs.googlecode.com/files/Datejs-all-Alpha1.zip $ cd ~/.avfs/***/Datejs-all-Alpha1.zip# $ cp -a Datejs-all/build/date-ja-JP.js ~/***/wp-content/plugins/wpng-calendar/js/.
$ cd ~/***/wp-content/plugins/wpng-calendar/ $ cp -a wpng-calendar.php wpng-calendar.php.org以下diffイメージで修正。
$ diff -brNup wpng-calendar.php.org wpng-calendar.php --- wpng-calendar.php.org 2008-11-09 14:04:31.000000000 +0900 +++ wpng-calendar.php 2008-11-09 14:04:30.000000000 +0900 @@ -160,7 +160,7 @@ if (!class_exists("WPNGCalendar")) { // Add the plugin's necessary objects to the header function addWPNGHeader() { // Add the DateJS file - wp_enqueue_script('date-js', get_bloginfo('wpurl') . '/wp-content/plugins/wpng-calendar/js/date.js', null, 'alpha-1'); + wp_enqueue_script('date-js', get_bloginfo('wpurl') . '/wp-content/plugins/wpng-calendar/js/date-ja-JP.js', null, 'alpha-1'); // Add the ThickBox files wp_enqueue_script('jquery-js', get_bloginfo('wpurl') . '/wp-content/plugins/wpng-calendar/js/jquery.js', null, '6124'); wp_enqueue_script('thickbox-js', get_bloginfo('wpurl') . '/wp-content/plugins/wpng-calendar/js/thickbox.js', null, '3.1');
WordPressの管理画面でwpng-calendarを有効化します。
WordPressの管理画面で新規に予定表を埋めこむためのページを作成します。