Added input for nth post for users

This commit is contained in:
Sarah Ni 2015-08-04 14:52:58 +10:00
parent 9e7b33f7c1
commit 9aa1bb3f4a
3 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export default {
initialize() {
PostModel.reopen({
postSpecificCount: function() {
return this.get('post_number') % 2 === 0;
return this.get('post_number') === parseInt(Discourse.SiteSettings.dfp_nth_post_code);
}.property('post_number')
});
}

View File

@ -16,6 +16,7 @@ en:
dfp_size_topic_above_suggested_height_code: "Put your ad topic above suggested size height!"
dfp_size_post_bottom_width_code: "Put your ad post bottom size width!"
dfp_size_post_bottom_height_code: "Put your ad post bottom size height!"
dfp_nth_post_code: "Choose the Nth position for your ad to show"
dfp_show_size_1_example: "leaderboard 728x90"
dfp_show_size_2_example: "large rectangle 336x280"
dfp_show_size_3_example: "medium rectangle 300x250"

View File

@ -47,6 +47,9 @@ ad_plugin:
dfp_show_post_bottom:
client: true
default: false
dfp_nth_post_code:
client: true
default: ''
dfp_show_size_1_example:
client: true
default: false