メモ:poeditを使うときの注意点
CakePHP のおいしい食べ方: CakePHP1.2の簡単国際化 [カタログ]⇒[設定]から、この翻訳ファイルに関する情報を追加できますが、その際、[複数形:]というところを、 nplurals=1; plural=0; としておきましょう。
CakePHP のおいしい食べ方: CakePHP1.2の簡単国際化 [カタログ]⇒[設定]から、この翻訳ファイルに関する情報を追加できますが、その際、[複数形:]というところを、 nplurals=1; plural=0; としておきましょう。
適当すぎるけどこんな感じのパッチ。 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;
CakePHPで、ごそごそと開発をしていたときのこと。 突然、エラーが。 Fatal error: Allowed memory size of xxxxxx bytes exhausted (tried to allocate xxxx bytes) メモリ不足ですって!? 十分なメモリは確保しているはずなのに。。 ...
WPtoTwitterプラグインのテストなのです。
php-tips.comでは、phpやweb周りのネタをまとめていきます。
MODxで記事の複製をすると、テンプレート変数がコピーされるんだけど、その後テンプレートを変更すると使用しないテンプレート変数が残ったままになるので削除するです。 ...
2009.08.24 追記 TCPDF 4.6.0021でpatchを適用してもらった模様です。よかったよかった。 貧弱な英語でBug報告してみたら瞬殺。。 https://sourceforge.net/tracker/index.php?func=detail&aid=2822339&group_id=128076&atid=710532 なんか、文章だけじゃダメだろうからpatchを送ってみたけど伝わってない気がする。 ...
mod_rewriteが使えるなら RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} ^/anypath [OR] RewriteCond %{REQUEST_URI} ^/otherpath RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Error: Target org.macports.activate returned: Image error: /opt/local/lib/php/.registry/xml_util.reg already exists and does not belong to a registered port. Unable to activate port php5. port あっぷぐれーどを使用としたら、php5のactivateのところで、上記エラーが。 pearオプションでこけている感じなので、 sudo port install php5 @5.2.10_1+apache2+macosx+mysql5+postgresql83+sqlite な、感じで、やってみませう。 ...
走り書きなので、内容について保証しません。 XCodeをいれておく。(当たり前か libjpegをコンパイル 参考: Mac OS X 10.5 と libjpeg - 風ブログ 上記サイトの通りにやると、 /usr/local/libにlibjpegができます。 ...