Aiivwjzr のバックアップ差分(No.1) - PukiWiki by illuminum

より:はーい。MOMOさんこんばんは。Gigs Calendar を触っていたのはずいぶん前のことだったので、思い出しつつ、あれこれ見てみました。プラグインのフォルダ直下、gigs-classes.php の436行目あたり、[php]function getAddress($oneLine = false) {$a = array();$city =   ;if ( $oneLine ) {if ( !empty($this->address) ) $a[] = str_replace( \n ,  ,  , $this->address);if ( !empty($this->city) ) $a[] = $this->city;if ( !empty($this->state) ) $a[] = $this->state;if ( !empty($this->postalCode) ) $a[] = $this->postalCode;if ( !empty($this->country) ) $a[] = $this->country;return imdpole( ,  , $a);} else {if ( !empty($this->address) ) $a[] = $this->address;if ( !empty($this->city) ) $temp .= $this->city;if ( !empty($this->state) ) $temp .= (!empty($temp) ?  ,   :   ) . $this->state;if ( !empty($this->country) ) $temp .= (!empty($temp) ?  ,   :   ) . $this->country;if ( !empty($this->postalCode) ) $temp .= (!empty($temp) ?     :   ) . $this->postalCode;if ( !empty($temp) ) $a[] = $temp;return imdpole( \n , $a);}}[/php]を、以下に変えてありました。なので、元ソース改変ですね。アップデートに対応できないので、良くないです。[php]function getAddress($oneLine = false) {$a = array();$city =   ;if ( $oneLine ) {if ( !empty($this->postalCode) ) $a[] = str_replace( \n ,  ,  , $this->postalCode);if ( !empty($this->state) ) $a[] = $this->state;if ( !empty($this->city) ) $a[] = $this->city;if ( !empty($this->address) ) $a[] = $this->address;//if ( !empty($this->country) ) $a[] = $this->country;return imdpole( ,  , $a);} else {if ( !empty($this->postalCode) ) $a[] =  〒'. $this->postalCode;if ( !empty($this->state) ) $temp .= (!empty($temp) ?  ,   :   ) . $this->state;if ( !empty($this->city) ) $temp .=    .$this->city;if ( !empty($this->address) ) $temp .= (!empty($temp) ?     :   ) . $this->address;//if ( !empty($this->country) ) $temp .= (!empty($temp) ?  ,   :   ) . $this->country;if ( !empty($temp) ) $a[] = $temp;return imdpole( \n , $a);}}[/php]ちなみに、わたくしあまりPHPに詳しくないので、もっと良いやり方があると思います。たぶん functions.phpにフックをかけて、ピーターパンが出てきて、とかそういう感じのあれです。以上、あまりお役に立てずにごめんなさい。よろしくどうぞ!


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS