diff --git a/app/Admin/Screen.php b/app/Admin/Screen.php index ed1aef5..1c9c96f 100644 --- a/app/Admin/Screen.php +++ b/app/Admin/Screen.php @@ -166,6 +166,7 @@ public function admin_init(){ $new_option = array( "style" => intval((bool)$this->input->post('afb_style')), "post_types" => (array)$this->input->post('afb_post_types'), + "hide_default_controller" => (array)$this->input->post('afb_hide_default_controller'), "comment" => intval((bool)$this->input->post('afb_comment')), "controller" => (string)$this->input->post('afb_text'), 'ga' => intval((bool)$this->input->post('afb_ga')), diff --git a/app/Main.php b/app/Main.php index 0a99779..445624c 100644 --- a/app/Main.php +++ b/app/Main.php @@ -170,7 +170,7 @@ public function ajax(){ * @return string */ function the_content($content){ - if( false !== array_search(get_post_type(), $this->option["post_types"]) ){ + if( false !== array_search(get_post_type(), $this->option["post_types"]) && false === array_search(get_post_type(), $this->option["hide_default_controller"]) ){ $content .= $this->get_controller_tag(get_the_ID(), get_post_type()); } return $content; diff --git a/app/Pattern/Controller.php b/app/Pattern/Controller.php index 4f2c2c6..a74b951 100644 --- a/app/Pattern/Controller.php +++ b/app/Pattern/Controller.php @@ -79,6 +79,7 @@ public function __get($key){ $default = array( "style" => 0, "post_types" => array(), + "hide_default_controller" => array(), "comment" => 0, "controller" => '', 'ga' => false, diff --git a/language/anyway-feedback-ja.mo b/language/anyway-feedback-ja.mo index a414801..c7f8e3a 100644 Binary files a/language/anyway-feedback-ja.mo and b/language/anyway-feedback-ja.mo differ diff --git a/language/anyway-feedback-ja.po b/language/anyway-feedback-ja.po index 624d111..c46b9ff 100644 --- a/language/anyway-feedback-ja.po +++ b/language/anyway-feedback-ja.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: Anyway Feedback 0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-09 16:55+0900\n" -"PO-Revision-Date: 2014-10-09 16:55+0900\n" -"Last-Translator: Takahashi Fumiki \n" +"POT-Creation-Date: 2016-03-23 14:40+0900\n" +"PO-Revision-Date: 2016-03-23 15:12+0900\n" +"Last-Translator: Minori Miyauchi \n" "Language-Team: Takahashi Fumiki \n" "Language: ja\n" "MIME-Version: 1.0\n" @@ -13,7 +13,7 @@ msgstr "" "X-Poedit-KeywordsList: _;gettext;gettext_noop;e\n" "X-Poedit-Basepath: .\n" "X-Poedit-SourceCharset: utf-8\n" -"X-Generator: Poedit 1.6.9\n" +"X-Generator: Poedit 1.8.7\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" @@ -74,15 +74,15 @@ msgstr "否定的な意見" msgid "No data" msgstr "データがありません" -#: ../app/Admin/Screen.php:175 +#: ../app/Admin/Screen.php:176 msgid "Option was updated." msgstr "オプションが更新されました。" -#: ../app/Admin/Screen.php:184 +#: ../app/Admin/Screen.php:185 msgid "Database has been updated." msgstr "データベースが更新されました。" -#: ../app/Admin/Screen.php:227 +#: ../app/Admin/Screen.php:228 msgid "Feedback" msgstr "フィードバック" @@ -114,7 +114,7 @@ msgstr "すでに投票済みです。" msgid "Comment" msgstr "コメント" -#: ../app/Main.php:71 ../templates/page/setting.php:55 +#: ../app/Main.php:71 ../templates/page/setting.php:68 #, php-format msgid "Is this %s useful?" msgstr "この%sは役に立ちましたか?" @@ -124,11 +124,11 @@ msgstr "この%sは役に立ちましたか?" msgid "%1$d of %2$d people say this %3$s is useful." msgstr "%2$d 人中 %1$d 人がこの %3$s は役に立ったと言っています。" -#: ../app/Main.php:73 ../templates/page/setting.php:56 +#: ../app/Main.php:73 ../templates/page/setting.php:69 msgid "Useful" msgstr "役に立った" -#: ../app/Main.php:74 ../templates/page/setting.php:57 +#: ../app/Main.php:74 ../templates/page/setting.php:70 msgid "Useless" msgstr "役に立たなかった" @@ -392,7 +392,7 @@ msgstr "" ""スタイルなし"を選んだ場合、ご自分でスタイリングを行う必要がありま" "す。スキンのマークアップは%sセクションで変更できます。" -#: ../templates/page/setting.php:17 ../templates/page/setting.php:47 +#: ../templates/page/setting.php:17 ../templates/page/setting.php:60 msgid "Custom markup" msgstr "カスタムマークアップ" @@ -406,24 +406,33 @@ msgstr "" "チェックされた投稿タイプは投稿内にフィードバック用コントローラーを含みます。" #: ../templates/page/setting.php:35 +msgid "Hide default feedback controller" +msgstr "コントローラーを非表示" + +#: ../templates/page/setting.php:43 +msgid "Checked post type if you need to hide default feedback controller." +msgstr "" +"チェックされた投稿タイプのフィードバック用コントローラーを非表示にします。" + +#: ../templates/page/setting.php:48 msgid "Comment setting" msgstr "コメント設定" -#: ../templates/page/setting.php:38 +#: ../templates/page/setting.php:51 msgid "Not show" msgstr "表示しない" -#: ../templates/page/setting.php:39 +#: ../templates/page/setting.php:52 msgid "Show in comment loop" msgstr "コメントループ内での表示" -#: ../templates/page/setting.php:42 +#: ../templates/page/setting.php:55 msgid "This option decide to display feedback controller in comment loop." msgstr "" "このオプションはフィードバック用コントローラーをコメントループの中に出力する" "かどうかを決定します。" -#: ../templates/page/setting.php:51 +#: ../templates/page/setting.php:64 msgid "" "You can customize markup of Feedback controller.
If you don't want, " "leave it blank.
In case of customization, You can use " @@ -438,24 +447,24 @@ msgstr "" "bad"というクラス名を持ち、href属性が%LINK%である必要があります
デフォルトのマークアップは下記になります。" -#: ../templates/page/setting.php:58 +#: ../templates/page/setting.php:71 #, php-format msgid "%1$s of %2$s people say this %3$s is useful." msgstr "%2$s人中%1$s人がこの%3$sは役に立ったと言っています。" -#: ../templates/page/setting.php:71 +#: ../templates/page/setting.php:84 msgid "Google Analytics Tracking" msgstr "Google Analytics トラッキング" -#: ../templates/page/setting.php:73 +#: ../templates/page/setting.php:86 msgid "Track" msgstr "トラックする" -#: ../templates/page/setting.php:74 +#: ../templates/page/setting.php:87 msgid "Do not track" msgstr "トラックしない" -#: ../templates/page/setting.php:77 +#: ../templates/page/setting.php:90 #, php-format msgid "" "This feature send report as event tracking to Google Analytics. You can get " @@ -466,7 +475,7 @@ msgstr "" "り、時系列のデータを取得できます。詳細は詳しい使い方をご覧" "下さい。" -#: ../templates/page/setting.php:83 +#: ../templates/page/setting.php:96 msgid "Update" msgstr "更新" diff --git a/language/anyway-feedback.pot b/language/anyway-feedback.pot index da120e9..65da324 100644 --- a/language/anyway-feedback.pot +++ b/language/anyway-feedback.pot @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: Anyway Feedback 0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-09 16:55+0900\n" +"POT-Creation-Date: 2016-03-23 15:13+0900\n" "PO-Revision-Date: 2014-10-09 16:55+0900\n" -"Last-Translator: Takahashi Fumiki \n" +"Last-Translator: Minori Miyauchi \n" "Language-Team: Takahashi Fumiki \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -12,7 +12,7 @@ msgstr "" "X-Poedit-KeywordsList: _;gettext;gettext_noop;e\n" "X-Poedit-Basepath: .\n" "X-Poedit-SourceCharset: utf-8\n" -"X-Generator: Poedit 1.6.9\n" +"X-Generator: Poedit 1.8.7\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" @@ -67,15 +67,15 @@ msgstr "" msgid "No data" msgstr "" -#: ../app/Admin/Screen.php:175 +#: ../app/Admin/Screen.php:176 msgid "Option was updated." msgstr "" -#: ../app/Admin/Screen.php:184 +#: ../app/Admin/Screen.php:185 msgid "Database has been updated." msgstr "" -#: ../app/Admin/Screen.php:227 +#: ../app/Admin/Screen.php:228 msgid "Feedback" msgstr "" @@ -107,7 +107,7 @@ msgstr "" msgid "Comment" msgstr "" -#: ../app/Main.php:71 ../templates/page/setting.php:55 +#: ../app/Main.php:71 ../templates/page/setting.php:68 #, php-format msgid "Is this %s useful?" msgstr "" @@ -117,11 +117,11 @@ msgstr "" msgid "%1$d of %2$d people say this %3$s is useful." msgstr "" -#: ../app/Main.php:73 ../templates/page/setting.php:56 +#: ../app/Main.php:73 ../templates/page/setting.php:69 msgid "Useful" msgstr "" -#: ../app/Main.php:74 ../templates/page/setting.php:57 +#: ../app/Main.php:74 ../templates/page/setting.php:70 msgid "Useless" msgstr "" @@ -355,7 +355,7 @@ msgid "" "can be specified at %s section" msgstr "" -#: ../templates/page/setting.php:17 ../templates/page/setting.php:47 +#: ../templates/page/setting.php:17 ../templates/page/setting.php:60 msgid "Custom markup" msgstr "" @@ -368,22 +368,30 @@ msgid "Checked post type will have feedback controller inside post content" msgstr "" #: ../templates/page/setting.php:35 +msgid "Hide default feedback controller" +msgstr "" + +#: ../templates/page/setting.php:43 +msgid "Checked post type if you need to hide default feedback controller." +msgstr "" + +#: ../templates/page/setting.php:48 msgid "Comment setting" msgstr "" -#: ../templates/page/setting.php:38 +#: ../templates/page/setting.php:51 msgid "Not show" msgstr "" -#: ../templates/page/setting.php:39 +#: ../templates/page/setting.php:52 msgid "Show in comment loop" msgstr "" -#: ../templates/page/setting.php:42 +#: ../templates/page/setting.php:55 msgid "This option decide to display feedback controller in comment loop." msgstr "" -#: ../templates/page/setting.php:51 +#: ../templates/page/setting.php:64 msgid "" "You can customize markup of Feedback controller.
If you don't want, " "leave it blank.
In case of customization, You can use " @@ -392,24 +400,24 @@ msgid "" "and %LINK% as href attribute.
Default markup is below." msgstr "" -#: ../templates/page/setting.php:58 +#: ../templates/page/setting.php:71 #, php-format msgid "%1$s of %2$s people say this %3$s is useful." msgstr "" -#: ../templates/page/setting.php:71 +#: ../templates/page/setting.php:84 msgid "Google Analytics Tracking" msgstr "" -#: ../templates/page/setting.php:73 +#: ../templates/page/setting.php:86 msgid "Track" msgstr "" -#: ../templates/page/setting.php:74 +#: ../templates/page/setting.php:87 msgid "Do not track" msgstr "" -#: ../templates/page/setting.php:77 +#: ../templates/page/setting.php:90 #, php-format msgid "" "This feature send report as event tracking to Google Analytics. You can get " @@ -417,7 +425,7 @@ msgid "" "a>. " msgstr "" -#: ../templates/page/setting.php:83 +#: ../templates/page/setting.php:96 msgid "Update" msgstr "" diff --git a/templates/page/setting.php b/templates/page/setting.php index 4c71c4f..0a4dc8b 100644 --- a/templates/page/setting.php +++ b/templates/page/setting.php @@ -31,6 +31,19 @@

+ + i18n->e("Hide default feedback controller"); ?> + +

+ + + +

+

+ i18n->e("Checked post type if you need to hide default feedback controller."); ?> +

+ + i18n->e("Comment setting"); ?>