mixiボイスの発言をtwitterに投稿するスクリプト(php版)

twitterの発言をmixiボイスに投稿するスクリプト(php版)の逆バージョンです。 このスクリプトは、 mixiボイスに投稿した発言をtwitterに投稿 mixiボイスの発言に返信された場合、twitterにダイレクトメッセージで転送 することができます。 ...

10月 10, 2009 · nojimage

twitter2mixivoice version 0.5.1

twitterの発言をmixiボイスに投稿するスクリプト(php版)を更新しました。 本スクリプトの概要とダウンロードは、こちらを参照してください。 今回のバージョンアップにより、設定ファイルにハッシュタグを記入することでmixiへ投稿する発言のフィルタリングが可能になります。 ...

10月 8, 2009 · nojimage

MODx PHxプラグイン placeholder問題修正

MODxには、PHxという出力変数をゴニョゴニョするプラグインがあります。 PHx - MODx Wiki だた、このプラグインを導入してしまうとスニペット等で定義したプレイスホルダーの値が参照できなくなります。 (例: dittoのページネーション処理等) ...

9月 24, 2009 · nojimage

twitterの発言をmixiボイスに投稿するスクリプト(php版)

twitterからmixiボイスにマルチポストするRubyスクリプト書いた - 5.1さらうどん のエントリーにいんすぱいあーされて作ってみました。php版です。 このスクリプトは、 twitterに投稿した発言をmixiボイスに投稿(@で始まるメッセージは除外) ハッシュタグフィルタリングで特定のメッセージのみ投稿 することができます。 ...

9月 23, 2009 · nojimage

CakePHP Cookieコンポーネントの改良(ちょっとだけ)

cakephpにはCookieコンポーネントがあります。 http://book.cakephp.org/ja/view/177/Cookies これを利用すると、cookieの管理が楽にできたり格納値の暗号化ぽいことができるのですが、設定方法がController::beforeFilter()での設定となり、ちょっとスマートじゃないなと思ったのでひと工夫。 ...

9月 15, 2009 · nojimage

レイアウトを初期化するCSS

CSSでレイアウトするときは、ブラウザ間の誤差をなくすためスタイルを初期化してから、個々のCSSを適用するようにするのがベターです。 というわけで、私が使用しているリセット+よく使うクラスを定義したCSSを晒します。 ...

8月 26, 2009 · nojimage

メモ:poeditを使うときの注意点

CakePHP のおいしい食べ方: CakePHP1.2の簡単国際化 [カタログ]⇒[設定]から、この翻訳ファイルに関する情報を追加できますが、その際、[複数形:]というところを、 nplurals=1; plural=0; としておきましょう。

8月 24, 2009 · nojimage

WPtoTwitterプラグインのテストとして長いタイトルのエントリーを投稿して見る

適当すぎるけどこんな感じのパッチ。 wp-to-twitter-mb.patch *** wp-to-twitter.php 2009-08-20 22:04:29.000000000 +0900 --- wp-to-twitter-fixed.php 2009-08-20 22:36:38.000000000 +0900 *************** *** 206,227 **** $sentence = $sentence . " " . get_option( 'jd_twit_append' ); } ! $twit_length = strlen( $sentence ); ! $title_length = strlen( $thisposttitle ); ! $blog_length = strlen( $thisblogtitle ); if ( ( ( $twit_length + $title_length ) - 7 ) < 140 ) { $sentence = str_ireplace( '#title#', $thisposttitle, $sentence ); ! $twit_length = strlen( $sentence ); } else { ! $thisposttitle = substr( $thisposttitle, 0, ( 140- ( $twit_length-3 ) ) ) . "..."; $sentence = str_ireplace ( '#title#', $thisposttitle, $sentence ); ! $twit_length = strlen( $sentence ); } if ( ( ( $twit_length + $blog_length ) - 6 ) < 140 ) { $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence ); ! $twit_length = strlen( $sentence ); } else { ! $thisblogtitle = substr( $thisblogtitle, 0, ( 140-( $twit_length-3 ) ) ) . "..."; $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence ); } return $sentence; --- 206,230 ---- $sentence = $sentence . " " . get_option( 'jd_twit_append' ); } ! mb_internal_encoding('UTF-8'); ! $thisposttitle = urldecode($thisposttitle); ! $thisblogtitle = urldecode($thisblogtitle); ! $twit_length = mb_strlen( $sentence ); ! $title_length = mb_strlen( $thisposttitle ); ! $blog_length = mb_strlen( $thisblogtitle ); if ( ( ( $twit_length + $title_length ) - 7 ) < 140 ) { $sentence = str_ireplace( '#title#', $thisposttitle, $sentence ); ! $twit_length = mb_strlen( $sentence ); } else { ! $thisposttitle = mb_substr( $thisposttitle, 0, ( 140- ( $twit_length-3 ) ) ) . "..."; $sentence = str_ireplace ( '#title#', $thisposttitle, $sentence ); ! $twit_length = mb_strlen( $sentence ); } if ( ( ( $twit_length + $blog_length ) - 6 ) < 140 ) { $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence ); ! $twit_length = mb_strlen( $sentence ); } else { ! $thisblogtitle = mb_substr( $thisblogtitle, 0, ( 140-( $twit_length-3 ) ) ) . "..."; $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence ); } return $sentence;

8月 20, 2009 · nojimage

CakePHPでDebugKitを使っていたらメモリが足りません云々

CakePHPで、ごそごそと開発をしていたときのこと。 突然、エラーが。 Fatal error: Allowed memory size of xxxxxx bytes exhausted (tried to allocate xxxx bytes) メモリ不足ですって!? 十分なメモリは確保しているはずなのに。。 ...

8月 20, 2009 · nojimage

投稿テスト

WPtoTwitterプラグインのテストなのです。

8月 15, 2009 · nojimage