Merge branch 'master' into stable

This commit is contained in:
Neil Lalonde 2018-11-29 11:05:04 -05:00
commit 5eed122002
57 changed files with 696 additions and 424 deletions

View File

@ -140,7 +140,7 @@ You can use the ```ad_platform_through_trust_level``` dropdown to disable ads fo
* 0 shows ads to users that are not logged in.
* 1 shows ads to users that are not logged in, and to new and basic users.
* 2 shows ads to members as well, but not to regulars and leaders.
* 3 shows ads to everyone but leaders.
* 3 shows ads to everyone, but not to leaders.
* 4 shows ads to everyone including leaders.
To find more about trust levels in Discourse, refer to [Discourse's posts on trust levels](https://meta.discourse.org/t/what-do-user-trust-levels-do/4924)

View File

@ -1,98 +1,167 @@
var currentUser = Discourse.User.current();
var data = {
"topic-list-top" : {},
"topic-above-post-stream" : {},
"topic-above-suggested" : {},
"post-bottom" : {}
"topic-list-top": {},
"topic-above-post-stream": {},
"topic-above-suggested": {},
"post-bottom": {}
};
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_list_top_src_code) {
data["topic-list-top"]["user_input"] = Discourse.SiteSettings.amazon_topic_list_top_src_code;
data["topic-list-top"]["amazon_width"] = parseInt(Discourse.SiteSettings.amazon_topic_list_top_ad_width_code);
data["topic-list-top"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_topic_list_top_ad_height_code);
if (
!Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_topic_list_top_src_code
) {
data["topic-list-top"]["user_input"] =
Discourse.SiteSettings.amazon_topic_list_top_src_code;
data["topic-list-top"]["amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_topic_list_top_ad_width_code
);
data["topic-list-top"]["amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_topic_list_top_ad_height_code
);
}
if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code) {
data["topic-list-top"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code;
data["topic-list-top"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_width_code);
data["topic-list-top"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_height_code);
if (
Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code
) {
data["topic-list-top"]["user_input_mobile"] =
Discourse.SiteSettings.amazon_mobile_topic_list_top_src_code;
data["topic-list-top"]["mobile_amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_width_code
);
data["topic-list-top"]["mobile_amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_list_top_ad_height_code
);
}
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_above_post_stream_src_code) {
data["topic-above-post-stream"]["user_input"] = Discourse.SiteSettings.amazon_topic_above_post_stream_src_code;
data["topic-above-post-stream"]["amazon_width"] = parseInt(Discourse.SiteSettings.amazon_topic_above_post_stream_ad_width_code);
data["topic-above-post-stream"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_topic_above_post_stream_ad_height_code);
if (
!Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_topic_above_post_stream_src_code
) {
data["topic-above-post-stream"]["user_input"] =
Discourse.SiteSettings.amazon_topic_above_post_stream_src_code;
data["topic-above-post-stream"]["amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_topic_above_post_stream_ad_width_code
);
data["topic-above-post-stream"]["amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_topic_above_post_stream_ad_height_code
);
}
if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code) {
data["topic-above-post-stream"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code;
data["topic-above-post-stream"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_width_code);
data["topic-above-post-stream"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_height_code);
if (
Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code
) {
data["topic-above-post-stream"]["user_input_mobile"] =
Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_src_code;
data["topic-above-post-stream"]["mobile_amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_width_code
);
data["topic-above-post-stream"]["mobile_amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_above_post_stream_ad_height_code
);
}
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_above_suggested_src_code) {
data["topic-above-suggested"]["user_input"] = Discourse.SiteSettings.amazon_topic_above_suggested_src_code;
data["topic-above-suggested"]["amazon_width"] = parseInt(Discourse.SiteSettings.amazon_topic_above_suggested_ad_width_code);
data["topic-above-suggested"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_topic_above_suggested_ad_height_code);
if (
!Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_topic_above_suggested_src_code
) {
data["topic-above-suggested"]["user_input"] =
Discourse.SiteSettings.amazon_topic_above_suggested_src_code;
data["topic-above-suggested"]["amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_topic_above_suggested_ad_width_code
);
data["topic-above-suggested"]["amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_topic_above_suggested_ad_height_code
);
}
if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code) {
data["topic-above-suggested"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code;
data["topic-above-suggested"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_width_code);
data["topic-above-suggested"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_height_code);
if (
Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code
) {
data["topic-above-suggested"]["user_input_mobile"] =
Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code;
data["topic-above-suggested"]["mobile_amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_width_code
);
data["topic-above-suggested"]["mobile_amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_height_code
);
}
if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_post_bottom_src_code) {
data["post-bottom"]["user_input"] = Discourse.SiteSettings.amazon_post_bottom_src_code;
data["post-bottom"]["amazon_width"] = parseInt(Discourse.SiteSettings.amazon_post_bottom_ad_width_code);
data["post-bottom"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_post_bottom_ad_height_code);
if (
!Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_post_bottom_src_code
) {
data["post-bottom"]["user_input"] =
Discourse.SiteSettings.amazon_post_bottom_src_code;
data["post-bottom"]["amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_post_bottom_ad_width_code
);
data["post-bottom"]["amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_post_bottom_ad_height_code
);
}
if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_post_bottom_src_code) {
data["post-bottom"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_post_bottom_src_code;
data["post-bottom"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_post_bottom_ad_width_code);
data["post-bottom"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_post_bottom_ad_height_code);
if (
Discourse.Mobile.mobileView &&
Discourse.SiteSettings.amazon_mobile_post_bottom_src_code
) {
data["post-bottom"]["user_input_mobile"] =
Discourse.SiteSettings.amazon_mobile_post_bottom_src_code;
data["post-bottom"]["mobile_amazon_width"] = parseInt(
Discourse.SiteSettings.amazon_mobile_post_bottom_ad_width_code
);
data["post-bottom"]["mobile_amazon_height"] = parseInt(
Discourse.SiteSettings.amazon_mobile_post_bottom_ad_height_code
);
}
export default Ember.Component.extend({
classNames: ['amazon-product-links'],
classNames: ["amazon-product-links"],
init: function() {
let placement = this.get('placement');
this.set('user_input', data[placement]["user_input"] );
this.set('amazon_width', data[placement]["amazon_width"] );
this.set('amazon_height', data[placement]["amazon_height"] );
this.set('user_input_mobile', data[placement]["user_input_mobile"] );
this.set('mobile_amazon_height', data[placement]["mobile_amazon_height"] );
this.set('mobile_amazon_width', data[placement]["mobile_amazon_width"] );
let placement = this.get("placement");
this.set("user_input", data[placement]["user_input"]);
this.set("amazon_width", data[placement]["amazon_width"]);
this.set("amazon_height", data[placement]["amazon_height"]);
this.set("user_input_mobile", data[placement]["user_input_mobile"]);
this.set("mobile_amazon_height", data[placement]["mobile_amazon_height"]);
this.set("mobile_amazon_width", data[placement]["mobile_amazon_width"]);
this._super();
},
adWrapperStyle: function() {
return `width: ${this.get('amazon_width')}px; height: ${this.get('amazon_height')}px;`.htmlSafe();
}.property('amazon_width', 'amazon_height'),
return `width: ${this.get("amazon_width")}px; height: ${this.get(
"amazon_height"
)}px;`.htmlSafe();
}.property("amazon_width", "amazon_height"),
adWrapperStyleMobile: function() {
return `width: ${this.get('mobile_amazon_width')}px; height: ${this.get('mobile_amazon_height')}px;`.htmlSafe();
}.property('mobile_amazon_width', 'mobile_amazon_height'),
return `width: ${this.get("mobile_amazon_width")}px; height: ${this.get(
"mobile_amazon_height"
)}px;`.htmlSafe();
}.property("mobile_amazon_width", "mobile_amazon_height"),
adTitleStyleMobile: function() {
return `width: ${this.get('mobile_amazon_width')}px;`.htmlSafe();
}.property('mobile_amazon_width'),
return `width: ${this.get("mobile_amazon_width")}px;`.htmlSafe();
}.property("mobile_amazon_width"),
userInput: function() {
return `${this.get('user_input')}`.htmlSafe();
}.property('user_input'),
return `${this.get("user_input")}`.htmlSafe();
}.property("user_input"),
userInputMobile: function() {
return `${this.get('user_input_mobile')}`.htmlSafe();
}.property('user_input_mobile'),
return `${this.get("user_input_mobile")}`.htmlSafe();
}.property("user_input_mobile"),
checkTrustLevels: function() {
return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.amazon_through_trust_level));
}.property('trust_level'),
return !(
currentUser &&
currentUser.get("trust_level") >
Discourse.SiteSettings.amazon_through_trust_level
);
}.property("trust_level")
});

View File

@ -1,9 +1,12 @@
import { default as computed, observes } from 'ember-addons/ember-computed-decorators';
import {
default as computed,
observes
} from "ember-addons/ember-computed-decorators";
var _loaded = false,
_promise = null,
currentUser = Discourse.User.current(),
propertyId = Discourse.SiteSettings.codefund_property_id;
_promise = null,
currentUser = Discourse.User.current(),
propertyId = Discourse.SiteSettings.codefund_property_id;
function loadCodeFund() {
if (_loaded) {
@ -14,15 +17,15 @@ function loadCodeFund() {
return _promise;
}
const url = 'https://codefund.io/t/s/' + propertyId + '/details.json';
const url = "https://codefund.io/t/s/" + propertyId + "/details.json";
_promise = new Promise(function(resolve, reject) {
let xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.open("GET", url);
xhr.onreadystatechange = handler;
xhr.responseType = 'json';
xhr.setRequestHeader('Accept', 'application/json');
xhr.responseType = "json";
xhr.setRequestHeader("Accept", "application/json");
xhr.send();
function handler() {
@ -32,79 +35,97 @@ function loadCodeFund() {
if (this.status === 200) {
resolve(this.response);
} else {
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
reject(
new Error(
"getJSON: `" + url + "` failed with status: [" + this.status + "]"
)
);
}
}
};
}
});
return _promise;
}
export default Ember.Component.extend({
classNameBindings: [':codefund-ad', 'classForSlot', 'isResponsive:codefund-responsive'],
classNameBindings: [
":codefund-ad",
"classForSlot",
"isResponsive:codefund-responsive"
],
propertyId: propertyId,
adRequested: false,
adDetails: {},
_triggerAds() {
if (!propertyId) return;
this.set('adRequested', true);
loadCodeFund().then((data) => {
_loaded = false;
_promise = null;
this.set('adDetails', data);
this.set('adRequested', false);
}).catch(error => console.log(error));
this.set("adRequested", true);
loadCodeFund()
.then(data => {
_loaded = false;
_promise = null;
this.set("adDetails", data);
this.set("adRequested", false);
})
.catch(error => console.log(error));
},
didInsertElement() {
this._super();
if (!this.get('showAd')) { return; }
if (!this.get("showAd")) {
return;
}
if (this.get('listLoading')) { return; }
if (this.get("listLoading")) {
return;
}
Ember.run.scheduleOnce('afterRender', this, this._triggerAds);
Ember.run.scheduleOnce("afterRender", this, this._triggerAds);
},
@observes('listLoading')
@observes("listLoading")
waitForLoad: function() {
if (this.get('adRequested')) { return; } // already requested that this ad unit be populated
if (!this.get('listLoading')) {
Ember.run.scheduleOnce('afterRender', this, this._triggerAds);
if (this.get("adRequested")) {
return;
} // already requested that this ad unit be populated
if (!this.get("listLoading")) {
Ember.run.scheduleOnce("afterRender", this, this._triggerAds);
}
},
checkTrustLevels: function() {
return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.codefund_through_trust_level));
}.property('trust_level'),
return !(
currentUser &&
currentUser.get("trust_level") >
Discourse.SiteSettings.codefund_through_trust_level
);
}.property("trust_level"),
@computed('checkTrustLevels')
@computed("checkTrustLevels")
showAd: function(checkTrustLevels) {
return Discourse.SiteSettings.codefund_property_id && checkTrustLevels;
},
@computed('placement')
@computed("placement")
displayPostBottom: function(placement) {
return placement === 'post-bottom';
return placement === "post-bottom";
},
@computed('placement')
@computed("placement")
displayTopicAbovePostStream: function() {
return this.get('placement') === 'topic-above-post-stream';
return this.get("placement") === "topic-above-post-stream";
},
@computed('placement')
@computed("placement")
displayTopicAboveSuggested: function() {
return this.get('placement') === 'topic-above-suggested';
return this.get("placement") === "topic-above-suggested";
},
@computed('placement')
@computed("placement")
displayTopicListTop: function() {
return this.get('placement') === 'topic-list-top';
return this.get("placement") === "topic-list-top";
}
});

View File

@ -1,20 +1,24 @@
import loadScript from 'discourse/lib/load-script';
import loadScript from "discourse/lib/load-script";
var _loaded = false,
_promise = null,
currentUser = Discourse.User.current(),
publisher_id = Discourse.SiteSettings.adsense_publisher_code;
_promise = null,
currentUser = Discourse.User.current(),
publisher_id = Discourse.SiteSettings.adsense_publisher_code;
const mobileView = Discourse.Site.currentProp('mobileView');
const mobileView = Discourse.Site.currentProp("mobileView");
function parseAdWidth(value) {
if (value === 'responsive') { return 'auto'; }
return `${parseInt( value.substring(0, 3).trim() )}px`;
if (value === "responsive") {
return "auto";
}
return `${parseInt(value.substring(0, 3).trim())}px`;
}
function parseAdHeight(value) {
if (value === 'responsive') { return 'auto'; }
return `${parseInt( value.substring(4, 7).trim() )}px`;
if (value === "responsive") {
return "auto";
}
return `${parseInt(value.substring(4, 7).trim())}px`;
}
function loadAdsense() {
@ -26,7 +30,9 @@ function loadAdsense() {
return _promise;
}
var adsenseSrc = (('https:' === document.location.protocol) ? 'https:' : 'http:') + '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
var adsenseSrc =
("https:" === document.location.protocol ? "https:" : "http:") +
"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
_promise = loadScript(adsenseSrc, { scriptTag: true }).then(function() {
_loaded = true;
});
@ -35,57 +41,113 @@ function loadAdsense() {
}
var data = {
"topic-list-top" : {},
"topic-above-post-stream" : {},
"topic-above-suggested" : {},
"post-bottom" : {}
"topic-list-top": {},
"topic-above-post-stream": {},
"topic-above-suggested": {},
"post-bottom": {}
};
if (Discourse.SiteSettings.adsense_publisher_code) {
if (!mobileView && Discourse.SiteSettings.adsense_topic_list_top_code) {
data["topic-list-top"]["ad_code"] = Discourse.SiteSettings.adsense_topic_list_top_code;
data["topic-list-top"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes);
data["topic-list-top"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_topic_list_top_ad_sizes);
data["topic-list-top"]["ad_code"] =
Discourse.SiteSettings.adsense_topic_list_top_code;
data["topic-list-top"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_topic_list_top_ad_sizes
);
data["topic-list-top"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_topic_list_top_ad_sizes
);
}
if (mobileView && Discourse.SiteSettings.adsense_mobile_topic_list_top_code) {
data["topic-list-top"]["ad_code"] = Discourse.SiteSettings.adsense_mobile_topic_list_top_code;
data["topic-list-top"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_mobile_topic_list_top_ad_size);
data["topic-list-top"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_mobile_topic_list_top_ad_size);
data["topic-list-top"]["ad_code"] =
Discourse.SiteSettings.adsense_mobile_topic_list_top_code;
data["topic-list-top"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_mobile_topic_list_top_ad_size
);
data["topic-list-top"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_mobile_topic_list_top_ad_size
);
}
if (!mobileView && Discourse.SiteSettings.adsense_topic_above_post_stream_code) {
data["topic-above-post-stream"]["ad_code"] = Discourse.SiteSettings.adsense_topic_above_post_stream_code;
data["topic-above-post-stream"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes);
data["topic-above-post-stream"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes);
if (
!mobileView &&
Discourse.SiteSettings.adsense_topic_above_post_stream_code
) {
data["topic-above-post-stream"]["ad_code"] =
Discourse.SiteSettings.adsense_topic_above_post_stream_code;
data["topic-above-post-stream"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes
);
data["topic-above-post-stream"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_topic_above_post_stream_ad_sizes
);
}
if (mobileView && Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code) {
data["topic-above-post-stream"]["ad_code"] = Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code;
data["topic-above-post-stream"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_ad_size);
data["topic-above-post-stream"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_ad_size);
if (
mobileView &&
Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code
) {
data["topic-above-post-stream"]["ad_code"] =
Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_code;
data["topic-above-post-stream"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_ad_size
);
data["topic-above-post-stream"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_mobile_topic_above_post_stream_ad_size
);
}
if (!mobileView && Discourse.SiteSettings.adsense_topic_above_suggested_code) {
data["topic-above-suggested"]["ad_code"] = Discourse.SiteSettings.adsense_topic_above_suggested_code;
data["topic-above-suggested"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes);
data["topic-above-suggested"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes);
if (
!mobileView &&
Discourse.SiteSettings.adsense_topic_above_suggested_code
) {
data["topic-above-suggested"]["ad_code"] =
Discourse.SiteSettings.adsense_topic_above_suggested_code;
data["topic-above-suggested"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes
);
data["topic-above-suggested"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_topic_above_suggested_ad_sizes
);
}
if (mobileView && Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code) {
data["topic-above-suggested"]["ad_code"] = Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code;
data["topic-above-suggested"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_mobile_topic_above_suggested_ad_size);
data["topic-above-suggested"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_mobile_topic_above_suggested_ad_size);
if (
mobileView &&
Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code
) {
data["topic-above-suggested"]["ad_code"] =
Discourse.SiteSettings.adsense_mobile_topic_above_suggested_code;
data["topic-above-suggested"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_mobile_topic_above_suggested_ad_size
);
data["topic-above-suggested"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_mobile_topic_above_suggested_ad_size
);
}
if (!mobileView && Discourse.SiteSettings.adsense_post_bottom_code) {
data["post-bottom"]["ad_code"] = Discourse.SiteSettings.adsense_post_bottom_code;
data["post-bottom"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_post_bottom_ad_sizes);
data["post-bottom"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_post_bottom_ad_sizes);
data["post-bottom"]["ad_code"] =
Discourse.SiteSettings.adsense_post_bottom_code;
data["post-bottom"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_post_bottom_ad_sizes
);
data["post-bottom"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_post_bottom_ad_sizes
);
}
if (mobileView && Discourse.SiteSettings.adsense_mobile_post_bottom_code) {
data["post-bottom"]["ad_code"] = Discourse.SiteSettings.adsense_mobile_post_bottom_code;
data["post-bottom"]["ad_width"] = parseAdWidth(Discourse.SiteSettings.adsense_mobile_post_bottom_ad_size);
data["post-bottom"]["ad_height"] = parseAdHeight(Discourse.SiteSettings.adsense_mobile_post_bottom_ad_size);
data["post-bottom"]["ad_code"] =
Discourse.SiteSettings.adsense_mobile_post_bottom_code;
data["post-bottom"]["ad_width"] = parseAdWidth(
Discourse.SiteSettings.adsense_mobile_post_bottom_ad_size
);
data["post-bottom"]["ad_height"] = parseAdHeight(
Discourse.SiteSettings.adsense_mobile_post_bottom_ad_size
);
}
}
export default Ember.Component.extend({
classNameBindings: [':google-adsense', 'classForSlot', 'isResponsive:adsense-responsive'],
classNameBindings: [
":google-adsense",
"classForSlot",
"isResponsive:adsense-responsive"
],
loadedGoogletag: false,
publisher_id: publisher_id,
@ -95,14 +157,14 @@ export default Ember.Component.extend({
adRequested: false,
init() {
this.set('ad_width', data[this.placement]["ad_width"] );
this.set('ad_height', data[this.placement]["ad_height"] );
this.set('ad_code', data[this.placement]["ad_code"] );
this.set("ad_width", data[this.placement]["ad_width"]);
this.set("ad_height", data[this.placement]["ad_height"]);
this.set("ad_code", data[this.placement]["ad_code"]);
this._super();
},
_triggerAds() {
this.set('adRequested', true);
this.set("adRequested", true);
loadAdsense().then(function() {
const adsbygoogle = window.adsbygoogle || [];
@ -115,45 +177,63 @@ export default Ember.Component.extend({
didInsertElement() {
this._super();
if (!this.get('showAd')) { return; }
if (!this.get("showAd")) {
return;
}
if (this.get('listLoading')) { return; }
if (this.get("listLoading")) {
return;
}
Ember.run.scheduleOnce('afterRender', this, this._triggerAds);
Ember.run.scheduleOnce("afterRender", this, this._triggerAds);
},
waitForLoad: function() {
if (this.get('adRequested')) { return; } // already requested that this ad unit be populated
if (!this.get('listLoading')) {
Ember.run.scheduleOnce('afterRender', this, this._triggerAds);
if (this.get("adRequested")) {
return;
} // already requested that this ad unit be populated
if (!this.get("listLoading")) {
Ember.run.scheduleOnce("afterRender", this, this._triggerAds);
}
}.observes('listLoading'),
}.observes("listLoading"),
isResponsive: function() {
return this.get('ad_width') === 'auto';
}.property('ad_width'),
return this.get("ad_width") === "auto";
}.property("ad_width"),
classForSlot: function() {
return `adsense-${this.get('placement')}`.htmlSafe();
}.property('placement'),
return `adsense-${this.get("placement")}`.htmlSafe();
}.property("placement"),
autoAdFormat: function() {
return this.get('isResponsive') ? 'auto'.htmlSafe() : false;
}.property('isResponsive'),
return this.get("isResponsive") ? "auto".htmlSafe() : false;
}.property("isResponsive"),
adWrapperStyle: function() {
return (this.get('isResponsive') ? '' : `width: ${this.get('ad_width')}; height: ${this.get('ad_height')};`).htmlSafe();
}.property('ad_width', 'ad_height'),
return (this.get("isResponsive")
? ""
: `width: ${this.get("ad_width")}; height: ${this.get("ad_height")};`
).htmlSafe();
}.property("ad_width", "ad_height"),
adInsStyle: function() {
return `display: ${this.get('isResponsive') ? 'block' : 'inline-block'}; ${this.get('adWrapperStyle')}`.htmlSafe();
}.property('adWrapperStyle', 'isResponsive'),
return `display: ${
this.get("isResponsive") ? "block" : "inline-block"
}; ${this.get("adWrapperStyle")}`.htmlSafe();
}.property("adWrapperStyle", "isResponsive"),
checkTrustLevels: function() {
return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.adsense_through_trust_level));
}.property('trust_level'),
return !(
currentUser &&
currentUser.get("trust_level") >
Discourse.SiteSettings.adsense_through_trust_level
);
}.property("trust_level"),
showAd: function() {
return Discourse.SiteSettings.adsense_publisher_code && this.get('checkTrustLevels');
}.property('checkTrustLevels')
return (
Discourse.SiteSettings.adsense_publisher_code &&
this.get("checkTrustLevels")
);
}.property("checkTrustLevels")
});

View File

@ -1,37 +1,36 @@
import loadScript from 'discourse/lib/load-script';
import loadScript from "discourse/lib/load-script";
var currentUser = Discourse.User.current(),
_loaded = false,
_promise = null,
ads = {};
_loaded = false,
_promise = null,
ads = {};
function splitWidthInt(value) {
var str = value.substring(0, 3);
return str.trim();
var str = value.substring(0, 3);
return str.trim();
}
function splitHeightInt(value) {
var str = value.substring(4, 7);
return str.trim();
var str = value.substring(4, 7);
return str.trim();
}
// This creates an array for the values of the custom targeting key
function valueParse(value) {
var final = value.replace(/ /g,'');
final = final.replace(/['"]+/g, '');
final = final.split(',');
var final = value.replace(/ /g, "");
final = final.replace(/['"]+/g, "");
final = final.split(",");
return final;
}
// This creates an array for the key of the custom targeting key
function keyParse(word) {
var key = word;
key = key.replace(/['"]+/g, '');
key = key.replace(/['"]+/g, "");
key = key.split("\n");
return key;
}
// This sets the key and value for custom targeting
var Foo = function(key, value, adslot) {
this.locationKey = key;
@ -56,7 +55,6 @@ function custom_targeting(key_array, value_array, location) {
}
function defineSlot(divId, placement, settings, isMobile) {
if (!settings.dfp_publisher_id) {
return;
}
@ -67,65 +65,204 @@ function defineSlot(divId, placement, settings, isMobile) {
return ads[divId];
}
if (placement === "topic-list-top" && settings.dfp_topic_list_top_code && settings.dfp_topic_list_top_ad_sizes) {
if (
placement === "topic-list-top" &&
settings.dfp_topic_list_top_code &&
settings.dfp_topic_list_top_ad_sizes
) {
if (isMobile) {
width = parseInt(splitWidthInt(settings.dfp_mobile_topic_list_top_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_mobile_topic_list_top_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_mobile_topic_list_top_code, [width,height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_key_code)), (keyParse(settings.dfp_target_topic_list_top_value_code)), ad);
width = parseInt(
splitWidthInt(settings.dfp_mobile_topic_list_top_ad_sizes)
);
height = parseInt(
splitHeightInt(settings.dfp_mobile_topic_list_top_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_mobile_topic_list_top_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(Discourse.SiteSettings.dfp_target_topic_list_top_key_code),
keyParse(settings.dfp_target_topic_list_top_value_code),
ad
);
} else {
width = parseInt(splitWidthInt(settings.dfp_topic_list_top_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_topic_list_top_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_list_top_code, [width, height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_topic_list_top_key_code)), (keyParse(settings.dfp_target_topic_list_top_value_code)), ad);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_topic_list_top_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_topic_list_top_key_code),
keyParse(settings.dfp_target_topic_list_top_value_code),
ad
);
}
} else if (placement === "topic-above-post-stream" && settings.dfp_topic_above_post_stream_code && settings.dfp_topic_above_post_stream_ad_sizes) {
} else if (
placement === "topic-above-post-stream" &&
settings.dfp_topic_above_post_stream_code &&
settings.dfp_topic_above_post_stream_ad_sizes
) {
if (isMobile) {
width = parseInt(splitWidthInt(settings.dfp_mobile_topic_above_post_stream_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_mobile_topic_above_post_stream_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_mobile_topic_above_post_stream_code, [width,height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_topic_above_post_stream_key_code)), (keyParse(settings.dfp_target_topic_above_post_stream_value_code)), ad);
width = parseInt(
splitWidthInt(settings.dfp_mobile_topic_above_post_stream_ad_sizes)
);
height = parseInt(
splitHeightInt(settings.dfp_mobile_topic_above_post_stream_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_mobile_topic_above_post_stream_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_topic_above_post_stream_key_code),
keyParse(settings.dfp_target_topic_above_post_stream_value_code),
ad
);
} else {
width = parseInt(splitWidthInt(settings.dfp_topic_above_post_stream_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_topic_above_post_stream_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_post_stream_code, [width, height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_topic_above_post_stream_key_code)), (keyParse(settings.dfp_target_topic_above_post_stream_value_code)), ad);
width = parseInt(
splitWidthInt(settings.dfp_topic_above_post_stream_ad_sizes)
);
height = parseInt(
splitHeightInt(settings.dfp_topic_above_post_stream_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_topic_above_post_stream_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_topic_above_post_stream_key_code),
keyParse(settings.dfp_target_topic_above_post_stream_value_code),
ad
);
}
} else if (placement === "topic-above-suggested" && settings.dfp_topic_above_suggested_code && settings.dfp_topic_above_suggested_ad_sizes) {
} else if (
placement === "topic-above-suggested" &&
settings.dfp_topic_above_suggested_code &&
settings.dfp_topic_above_suggested_ad_sizes
) {
if (isMobile) {
width = parseInt(splitWidthInt(settings.dfp_mobile_topic_above_suggested_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_mobile_topic_above_suggested_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_mobile_topic_above_suggested_code, [width,height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_topic_above_suggested_key_code)), (keyParse(settings.dfp_target_topic_above_suggested_value_code)), ad);
width = parseInt(
splitWidthInt(settings.dfp_mobile_topic_above_suggested_ad_sizes)
);
height = parseInt(
splitHeightInt(settings.dfp_mobile_topic_above_suggested_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_mobile_topic_above_suggested_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_topic_above_suggested_key_code),
keyParse(settings.dfp_target_topic_above_suggested_value_code),
ad
);
} else {
width = parseInt(splitWidthInt(settings.dfp_topic_above_suggested_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_topic_above_suggested_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_topic_above_suggested_code, [width, height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_topic_above_suggested_key_code)), (keyParse(settings.dfp_target_topic_above_suggested_value_code)), ad);
width = parseInt(
splitWidthInt(settings.dfp_topic_above_suggested_ad_sizes)
);
height = parseInt(
splitHeightInt(settings.dfp_topic_above_suggested_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_topic_above_suggested_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_topic_above_suggested_key_code),
keyParse(settings.dfp_target_topic_above_suggested_value_code),
ad
);
}
} else if (placement === "post-bottom" && settings.dfp_post_bottom_code && settings.dfp_post_bottom_ad_sizes) {
} else if (
placement === "post-bottom" &&
settings.dfp_post_bottom_code &&
settings.dfp_post_bottom_ad_sizes
) {
if (isMobile) {
width = parseInt(splitWidthInt(settings.dfp_mobile_post_bottom_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_mobile_post_bottom_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_mobile_post_bottom_code, [width,height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_post_bottom_key_code)), (keyParse(settings.dfp_target_post_bottom_value_code)), ad);
height = parseInt(
splitHeightInt(settings.dfp_mobile_post_bottom_ad_sizes)
);
ad = window.googletag
.defineSlot(
"/" +
settings.dfp_publisher_id +
"/" +
settings.dfp_mobile_post_bottom_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_post_bottom_key_code),
keyParse(settings.dfp_target_post_bottom_value_code),
ad
);
} else {
width = parseInt(splitWidthInt(settings.dfp_post_bottom_ad_sizes));
height = parseInt(splitHeightInt(settings.dfp_post_bottom_ad_sizes));
ad = window.googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + settings.dfp_post_bottom_code, [width, height], divId).addService(window.googletag.pubads());
custom_targeting((keyParse(settings.dfp_target_post_bottom_key_code)), (keyParse(settings.dfp_target_post_bottom_value_code)), ad);
ad = window.googletag
.defineSlot(
"/" + settings.dfp_publisher_id + "/" + settings.dfp_post_bottom_code,
[width, height],
divId
)
.addService(window.googletag.pubads());
custom_targeting(
keyParse(settings.dfp_target_post_bottom_key_code),
keyParse(settings.dfp_target_post_bottom_value_code),
ad
);
}
}
if (ad) {
ads[divId] = {ad: ad, width: width, height: height};
ads[divId] = { ad: ad, width: width, height: height };
return ads[divId];
}
}
function destroySlot(divId) {
if (ads[divId] && window.googletag) {
window.googletag.cmd.push(function(){
window.googletag.cmd.push(function() {
window.googletag.destroySlots([ads[divId].ad]);
delete ads[divId];
});
@ -142,11 +279,13 @@ function loadGoogle() {
}
// The boilerplate code
var dfpSrc = (('https:' === document.location.protocol) ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
var dfpSrc =
("https:" === document.location.protocol ? "https:" : "http:") +
"//www.googletagservices.com/tag/js/gpt.js";
_promise = loadScript(dfpSrc, { scriptTag: true }).then(function() {
_loaded = true;
if (window.googletag === undefined) {
console.log('googletag is undefined!');
console.log("googletag is undefined!");
}
window.googletag.cmd.push(function() {
@ -159,84 +298,110 @@ function loadGoogle() {
return _promise;
}
// Ember component - the class is the adblock and css
export default Ember.Component.extend({
width: 728,
height: 90,
classNameBindings: ['adUnitClass'],
classNames: ['google-dfp-ad'],
classNameBindings: ["adUnitClass"],
classNames: ["google-dfp-ad"],
loadedGoogletag: false,
refreshOnChange: null,
divId: function() {
if (this.get('postNumber')) {
return "div-gpt-ad-" + this.get('placement') + '-' + this.get('postNumber');
if (this.get("postNumber")) {
return (
"div-gpt-ad-" + this.get("placement") + "-" + this.get("postNumber")
);
} else {
return "div-gpt-ad-" + this.get('placement');
return "div-gpt-ad-" + this.get("placement");
}
}.property('placement', 'postNumber'),
}.property("placement", "postNumber"),
adUnitClass: function() {
return "dfp-ad-" + this.get("placement");
}.property('placement'),
}.property("placement"),
adWrapperStyle: function() {
return `width: ${this.get('width')}px; height: ${this.get('height')}px;`.htmlSafe();
}.property('width', 'height'),
return `width: ${this.get("width")}px; height: ${this.get(
"height"
)}px;`.htmlSafe();
}.property("width", "height"),
adTitleStyleMobile: function() {
return `width: ${this.get('width')}px;`.htmlSafe();
}.property('width'),
return `width: ${this.get("width")}px;`.htmlSafe();
}.property("width"),
showAd: function() {
return Discourse.SiteSettings.dfp_publisher_id && this.get('checkTrustLevels');
}.property('checkTrustLevels'),
return (
Discourse.SiteSettings.dfp_publisher_id && this.get("checkTrustLevels")
);
}.property("checkTrustLevels"),
checkTrustLevels: function() {
return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.dfp_through_trust_level));
}.property('trust_level'),
return !(
currentUser &&
currentUser.get("trust_level") >
Discourse.SiteSettings.dfp_through_trust_level
);
}.property("trust_level"),
refreshAd: function() {
var slot = ads[this.get('divId')];
if (!(slot && slot.ad)) { return; }
var slot = ads[this.get("divId")];
if (!(slot && slot.ad)) {
return;
}
var self = this,
ad = slot.ad;
ad = slot.ad;
if (this.get('loadedGoogletag') && this.get('refreshOnChange')) {
if (this.get("loadedGoogletag") && this.get("refreshOnChange")) {
window.googletag.cmd.push(function() {
ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : '0');
ad.setTargeting(
"discourse-category",
self.get("category") ? self.get("category") : "0"
);
window.googletag.pubads().refresh([ad]);
});
}
}.observes('refreshOnChange'),
}.observes("refreshOnChange"),
_initGoogleDFP: function() {
if (!this.get('showAd')) { return; }
if (!this.get("showAd")) {
return;
}
const ember_w_function = String.prototype.w;
String.prototype.w = null;
var self = this;
loadGoogle(this.siteSettings).then(function() {
self.set('loadedGoogletag', true);
window.googletag.cmd.push(function() {
let slot = defineSlot(self.get('divId'), self.get('placement'), self.siteSettings, self.site.mobileView);
if (slot && slot.ad) {
slot.ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : '0');
self.set('width', slot.width);
self.set('height', slot.height);
window.googletag.display(self.get('divId'));
window.googletag.pubads().refresh([slot.ad]);
}
loadGoogle(this.siteSettings)
.then(function() {
self.set("loadedGoogletag", true);
window.googletag.cmd.push(function() {
let slot = defineSlot(
self.get("divId"),
self.get("placement"),
self.siteSettings,
self.site.mobileView
);
if (slot && slot.ad) {
slot.ad.setTargeting(
"discourse-category",
self.get("category") ? self.get("category") : "0"
);
self.set("width", slot.width);
self.set("height", slot.height);
window.googletag.display(self.get("divId"));
window.googletag.pubads().refresh([slot.ad]);
}
});
})
.finally(function() {
String.prototype.w = ember_w_function;
});
}).finally(function() {
String.prototype.w = ember_w_function;
});
}.on('didInsertElement'),
}.on("didInsertElement"),
cleanup: function() {
destroySlot(this.get('divId'));
}.on('willDestroyElement')
destroySlot(this.get("divId"));
}.on("willDestroyElement")
});

View File

@ -1,53 +1,50 @@
import PostModel from 'discourse/models/post';
import {
withPluginApi
} from 'discourse/lib/plugin-api';
import PostModel from "discourse/models/post";
import { withPluginApi } from "discourse/lib/plugin-api";
export default {
name: 'initialize-ad-plugin',
name: "initialize-ad-plugin",
initialize(container) {
const siteSettings = container.lookup('site-settings:main');
const siteSettings = container.lookup("site-settings:main");
PostModel.reopen({
postSpecificCountDFP: function() {
return this.isNthPost(parseInt(siteSettings.dfp_nth_post_code));
}.property('post_number'),
}.property("post_number"),
postSpecificCountAdsense: function() {
return this.isNthPost(parseInt(siteSettings.adsense_nth_post_code));
}.property('post_number'),
}.property("post_number"),
postSpecificCountAmazon: function() {
return this.isNthPost(parseInt(siteSettings.amazon_nth_post_code));
}.property('post_number'),
}.property("post_number"),
postSpecificCountCodeFund: function() {
return this.isNthPost(parseInt(siteSettings.codefund_nth_post));
}.property('post_number'),
}.property("post_number"),
isNthPost: function(n) {
if (n && n > 0) {
return (this.get('post_number') % n) === 0;
return this.get("post_number") % n === 0;
} else {
return false;
}
}
});
withPluginApi('0.1', api => {
api.decorateWidget('post:after', dec => {
withPluginApi("0.1", api => {
api.decorateWidget("post:after", dec => {
if (dec.canConnectComponent) {
return dec.connect({
component: 'adplugin-container',
context: 'model'
component: "adplugin-container",
context: "model"
});
}
// Old way for backwards compatibility
return dec.connect({
templateName: 'connectors/post-bottom/discourse-adplugin',
context: 'model'
templateName: "connectors/post-bottom/discourse-adplugin",
context: "model"
});
});
});

View File

@ -10,6 +10,4 @@ ar:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'جوجل ادسنس'
amazon_plugin: 'اعلانات امازون'

View File

@ -13,6 +13,4 @@ bs_BA:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ cs:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ da:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -14,6 +14,6 @@ de:
site_settings:
categories:
dfp_plugin: 'DFP/Ad Manager'
adsense_plugin: 'Adsense'
adsense_plugin: 'AdSense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -10,6 +10,4 @@ el:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -7,6 +7,6 @@ en:
site_settings:
categories:
dfp_plugin: 'DFP/Ad Manager'
adsense_plugin: 'Adsense'
adsense_plugin: 'AdSense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'
codefund_plugin: 'CodeFund'

View File

@ -14,6 +14,6 @@ es:
site_settings:
categories:
dfp_plugin: 'DFP/Ad Manager'
adsense_plugin: 'Adsense'
adsense_plugin: 'AdSense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -13,6 +13,4 @@ et:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -10,6 +10,4 @@ fa_IR:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'ادسنس'
amazon_plugin: 'آمازون'

View File

@ -13,6 +13,4 @@ fi:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -14,6 +14,6 @@ fr:
site_settings:
categories:
dfp_plugin: 'Gestionnaire DFP/Ad'
adsense_plugin: 'Adsense'
adsense_plugin: 'AdSense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -10,6 +10,4 @@ gl:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ he:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'אדסנס'
amazon_plugin: 'אמזון'

View File

@ -13,7 +13,5 @@ hu:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -5,9 +5,4 @@
# To work with us on translations, join this project:
# https://www.transifex.com/projects/p/discourse-org/
id:
admin_js:
admin:
site_settings:
categories:
adsense_plugin: 'Adsense'
id: {}

View File

@ -13,7 +13,5 @@ it:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -10,6 +10,4 @@ ko:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -0,0 +1,17 @@
# encoding: utf-8
#
# Never edit this file. It will be overwritten when translations are pulled from Transifex.
#
# To work with us on translations, join this project:
# https://www.transifex.com/projects/p/discourse-org/
lt:
js:
adplugin:
advertisement_label: 'REKLAMA'
admin_js:
admin:
site_settings:
categories:
dfp_plugin: 'DFP/Ad Redaktorius'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ nb_NO:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -10,6 +10,4 @@ nl:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -10,6 +10,4 @@ pl_PL:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ pt:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,7 +13,6 @@ pt_BR:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
dfp_plugin: 'Gerenciador de Anúncios'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -13,6 +13,4 @@ ro:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,7 +13,6 @@ ru:
admin:
site_settings:
categories:
dfp_plugin: 'Плагин DoubleClick for Publishers (DFP)'
adsense_plugin: 'Adsense'
dfp_plugin: 'DFP/Ad Manager'
amazon_plugin: 'Amazon'
codefund_plugin: 'Плагин CodeFund'

View File

@ -13,6 +13,4 @@ sk:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -13,7 +13,5 @@ sw:
admin:
site_settings:
categories:
dfp_plugin: 'Programu ya matangazo kutoka Google'
adsense_plugin: 'Matangazo ya Google.'
amazon_plugin: 'Amazon'
codefund_plugin: 'CodeFund'

View File

@ -10,6 +10,4 @@ tr_TR:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'AdSense'
amazon_plugin: 'Amazon'

View File

@ -13,6 +13,4 @@ ur:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'ایڈسینس'
amazon_plugin: 'اَیمَیزَون'

View File

@ -13,6 +13,6 @@ zh_CN:
admin:
site_settings:
categories:
dfp_plugin: '谷歌DFP广告'
adsense_plugin: '谷歌Adsense广告'
dfp_plugin: '谷歌 DFP/广告管理器'
amazon_plugin: '亚马逊网站联盟'
codefund_plugin: 'CodeFund'

View File

@ -10,6 +10,4 @@ zh_TW:
admin:
site_settings:
categories:
dfp_plugin: 'DFP'
adsense_plugin: 'Adsense'
amazon_plugin: 'Amazon'

View File

@ -7,7 +7,6 @@
ar:
site_settings:
dfp_publisher_id: "ضع الشفرة الخاصة بشبكتك, التي يمكنك العثور عليها في اعدادات شبكتك."
dfp_through_trust_level: "اضهر اعلاناتك للأعضاء بناء على مستوى الثقة, الأعضاء ذو مستوى ثقة اعلى من هذه القيمة لن يشاهدوا الاعلانات."
dfp_topic_list_top_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي تظهر فوق قائمة المواضيع, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا."
dfp_topic_list_top_ad_sizes: "اختر حجم اعلانك للمساحة فوق قوائم المواضيع"

View File

@ -7,7 +7,6 @@
cs:
site_settings:
dfp_publisher_id: "Zadejte kód Vaší sítě, který najdete v nastavení Vaší sítě."
dfp_through_trust_level: "Zobrazit reklamy uživatelům podle jejich důvěryhodnosti. Uživatelé s důvěryhodností vyšší než tato hodnota reklamy neuvidí."
dfp_topic_list_top_code: "Zadejte unikátní kód jednotky reklamy pro zobrazení nad seznamem témat. Toto je krátký kód (max 100 znaků) přidělený reklamní jednotce, když byla vytvořena, ne JavaScript kód."
dfp_topic_list_top_ad_sizes: "Zvolte velikost reklamy pro reklamní jednotku nad seznamem témat."

View File

@ -7,7 +7,6 @@
el:
site_settings:
dfp_publisher_id: "Input your network code, which is found in your network settings."
dfp_through_trust_level: "Show your ads to users based on trust levels. Users with trust level higher than this value will not see ads."
dfp_topic_list_top_code: "Enter the unique Code of the ad unit to display above topic lists. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code."
dfp_topic_list_top_ad_sizes: "Choose your ad size for the ad unit above topic lists."

View File

@ -7,7 +7,7 @@
es:
site_settings:
dfp_publisher_id: "Ingrese su network code, que podes encontrar en la configuración."
dfp_publisher_id: "Ingrese su network code del Google Ad Manager (llamado DFP), que puedes encontrar en la configuración."
dfp_through_trust_level: "Muestre sus anuncios a los usuarios basados en los niveles de confianza. Usuarios con un nivel de confianza elevado no verían anuncios."
dfp_topic_list_top_code: "Ingrese su código único de anuncio para mostrar por encima de la lista de temas. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript."
dfp_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio para el anuncio sobre la lista de temas."

View File

@ -7,7 +7,6 @@
fa_IR:
site_settings:
dfp_publisher_id: "کد شبکه خود را وارد کنید، در بخش تنظیمات شبکه می توانید آنرا بیابید."
dfp_through_trust_level: "تبلیغات خود را به کاربران بر اساس سطح اعتماد نمایش دهید. کاربرانی با سطح اعتماد بالاتر از این مقدار نمی توانند تبلیغات شما را ببینند."
dfp_topic_list_top_code: "کد منحصر بفرد واحد تبلیغ خود را وارد کنید تا بالای لیست مباحث نمایش داده شود. این کد، یک کد کوتاه (با حداکثر طول 100 کاراکتر) می باشد که هنگام ساختن واحد تبلیغ اختصاص داده شده است، کد جاوا اسکریپت نیست."
dfp_topic_list_top_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات بالای لیست مباحث انتخاب کنید."

View File

@ -7,7 +7,7 @@
fi:
site_settings:
dfp_publisher_id: "Network code, jonka löydät verkkoasetuksistasi (network settings)."
dfp_publisher_id: "Anna Google Ad Managerin (entiseltä nimeltään DFP) network code, jonka löydät asetustesi kohdasta network settings."
dfp_through_trust_level: "Näytä mainoksia käyttäjälle luottamustasosta riippuen. Käyttäjät joiden luottamustaso on tätä korkeampi eivät näe mainoksia."
dfp_topic_list_top_code: "Ketjulistausten yllä näytettävän mainosyksikön yksilöllinen koodi. Kyseessä on lyhyt koodi (enint. 100 merkkiä), joka annetaan mainosyksikölle kun sitä luodaan. Ei JavaScript-koodi."
dfp_topic_list_top_ad_sizes: "Ketjulistauksen yllä näytettävän mainoksen koko."

View File

@ -5,6 +5,4 @@
# To work with us on translations, join this project:
# https://www.transifex.com/projects/p/discourse-org/
id:
site_settings:
dfp_publisher_id: "Masukan kode jaringan, ditemukan pada pengaturan jaringan."
id: {}

View File

@ -7,7 +7,6 @@
it:
site_settings:
dfp_publisher_id: "Inserisci il codice della rete che si trova nelle impostazioni di rete."
dfp_through_trust_level: "Mostra i tuoi annunci agli utenti in base ai livelli di esperienza. Gli utenti con livello di esperienza superiore a questo valore non vedranno gli annunci."
dfp_topic_list_top_code: "Inserisci il Codice univoco dell'annuncio da mostrare sopra le liste argomenti. E' il codice breve (massimo 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript."
dfp_topic_list_top_ad_sizes: "Scegli la dimensione dell'annuncio sopra le liste degli argomenti."

View File

@ -7,7 +7,6 @@
ko:
site_settings:
dfp_publisher_id: "네트워크 설정에 있는 네트워크 코드를 입력하세요."
dfp_through_trust_level: "사용자 레벨에 맞추어 광고를 표시합니다. 지정된 레벨 이상의 사용자에게는 광고가 보이지 않습니다."
dfp_topic_list_top_code: "토픽 목록 상단에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)"
dfp_topic_list_top_ad_sizes: "토픽 목록 상단에 표시할 광고 유닛의 광고 사이즈를 선택하세요."

View File

@ -0,0 +1,8 @@
# encoding: utf-8
#
# Never edit this file. It will be overwritten when translations are pulled from Transifex.
#
# To work with us on translations, join this project:
# https://www.transifex.com/projects/p/discourse-org/
lt: {}

View File

@ -7,7 +7,6 @@
nb_NO:
site_settings:
dfp_publisher_id: "Skriv inn din nettverkskode, som er å finne i nettverksinnstillingene."
dfp_through_trust_level: "Vis dine reklamer til brukere basert på tillitsnivå. Brukere med tillitsnivå høyere enn denne verdien vil ikke se reklamer."
dfp_nth_post_code: "Vis en reklame etter hver N post, der N er denne verdien."
adsense_topic_list_top_ad_sizes: "Velg din reklamestørrelse"

View File

@ -7,8 +7,8 @@
pt:
site_settings:
dfp_publisher_id: "Insira o seu código de rede, que pode encontrar nas suas configurações de rede."
dfp_through_trust_level: "Mostre os seus anúncios aos utilizadores com base nos níveis de confiança. Os utilizadores com nível de confiança superior a este valor não irão ver anúncios."
dfp_topic_list_top_ad_sizes: "Escolha o tamanho do bloco publicitário acima da lista dos tópicos. "
adsense_topic_list_top_ad_sizes: "Escolha o tamanho do seu anúncio"
adsense_mobile_topic_list_top_ad_size: "Escolha o tamanho do seu anúncio"
adsense_topic_above_post_stream_ad_sizes: "Escolha o tamanho do seu anúncio"

View File

@ -7,7 +7,6 @@
pt_BR:
site_settings:
dfp_publisher_id: "Entre com o seu código de rede, o qual é encontrado nas suas configurações de rede."
dfp_through_trust_level: "Exibir seus anúncios para usuários baseado em níveis de confiança. Usuários com nível de confiança maior que este valor não verá anúncios."
dfp_topic_list_top_code: "Digite o Código único do anúncio para exibir em cima das listas de tópicos. Este é o short code (máx. 100 caractereres) dado ao item de anúncio quando ele foi criado, não o código JavaScript."
dfp_topic_list_top_ad_sizes: "Escolha o tamanho do seu anúncio para o ítem de anúncio em cima das listas de tópicos."

View File

@ -5,4 +5,7 @@
# To work with us on translations, join this project:
# https://www.transifex.com/projects/p/discourse-org/
ro: {}
ro:
site_settings:
codefund_above_suggested_enabled: "Afișează o reclamă desupra listei cu discuții propuse"
codefund_top_of_topic_list_enabled: "Afișează o reclamă deasupra listei de discuții"

View File

@ -7,5 +7,4 @@
ru:
site_settings:
dfp_publisher_id: "Введите код вашей сети, который может быть найден в настройках сети."
dfp_through_trust_level: "Показывайте рекламу пользователям основываясь на уровне доверия. Пользователи с большим уровнем доверия не будут видеть рекламу. "

View File

@ -7,7 +7,6 @@
sw:
site_settings:
dfp_publisher_id: "Ingiza kodi ya mtandano, ambayo inapatikana kwenye mipangilio ya mtandao."
dfp_through_trust_level: "Onyesha matangazo yako kulingana na uaminifu. Watumiaji ambao wanaaminika kiasii cha juu hawatayaona matangazo."
dfp_topic_list_top_code: "Andika kodi ya kitengo cha tangazo litakalo onyeshwa juu ya orodha ya mada. Hii kodi lazima iwe fupi (kiwango cha juu ni herufi 100) iliyopewa kitengo cha tangazo kipindi ilivyotengenezwa, isiwe kodi ya JavaScript."
dfp_topic_list_top_ad_sizes: "Chagua ukubwa wa tangazo juu ya orodha ya mada"

View File

@ -7,7 +7,6 @@
ur:
site_settings:
dfp_publisher_id: "اپنے نیٹ ورک کوڈ، جو آپ کے نیٹ ورک سیٹِنگ میں پایا جاتا ہے، کو درج کیجیے۔"
dfp_through_trust_level: "اپنے صارفین کوٹرسٹ لَیول کی بنیاد پر اشتہارات دکھائیں۔ اس وَیلِیو سے زیادہ ٹرسٹ لَیول والے صارفین کو اشتہارات نہیں دکھاے جائیں گے۔"
dfp_topic_list_top_code: "ٹاپک فہرست کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔"
dfp_topic_list_top_ad_sizes: "ٹاپک فہرست کے اوپر اشتھار کا سائز منتخب کریں۔"

View File

@ -7,72 +7,49 @@
zh_CN:
site_settings:
dfp_publisher_id: "输入DFP出版者ID号码"
dfp_through_trust_level: "DFP广告.最高的信任级别"
dfp_topic_list_top_code: "主页.输入DFP广告代码"
dfp_topic_list_top_ad_sizes: "主页.DFP广告大小选择"
dfp_mobile_topic_list_top_code: "主页.手机版.输入DFP广告代码"
dfp_mobile_topic_list_top_ad_sizes: "移动端主题列表页顶端.DFP广告大小选择"
dfp_target_topic_list_top_key_code: "主页.輸入(英文)指定群組"
dfp_target_topic_list_top_value_code: "主页.輸入(英文)指定目標"
dfp_topic_above_post_stream_code: "论坛标题以下.输入DFP广告代码"
dfp_topic_above_post_stream_ad_sizes: "论坛标题以下.DFP广告大小选择"
dfp_mobile_topic_above_post_stream_ad_sizes: "移动端视图主题页面顶端.DFP广告大小选择"
dfp_target_topic_above_post_stream_key_code: "论坛标题以下.輸入(英文)指定群組"
dfp_target_topic_above_post_stream_value_code: "论坛标题以下.輸入(英文)指定目標"
dfp_topic_above_suggested_code: "论坛主题建议以上.输入DFP广告代码"
dfp_topic_above_suggested_ad_sizes: "论坛主题建议以上.DFP广告大小选择"
dfp_mobile_topic_above_suggested_ad_sizes: "移动端视图主题页面最后帖子后.DFP广告大小选择"
dfp_target_topic_above_suggested_key_code: "论坛主题建议以上.輸入(英文)指定群組"
dfp_target_topic_above_suggested_value_code: "论坛主题建议以上.輸入(英文)指定目標"
dfp_nth_post_code: "Nth评论"
dfp_post_bottom_code: "评论以下.输入DFP广告代码"
dfp_post_bottom_ad_sizes: "评论以下.DFP广告大小选择"
dfp_mobile_post_bottom_ad_sizes: "移动端视图帖子间.DFP广告大小选择"
dfp_target_post_bottom_key_code: "主页.輸入(英文)指定群組"
dfp_target_post_bottom_value_code: "主页.輸入(英文)指定目標"
adsense_publisher_code: "输入Adsense出版者ID号码"
adsense_through_trust_level: "Adsense广告.最高的信任级别"
adsense_topic_list_top_code: "主页.输入Adsense广告代码"
adsense_mobile_topic_list_top_code: "主页.手机版.输入Adsense广告代码"
adsense_topic_list_top_ad_sizes: "主页.Adsense广告大小选择"
adsense_mobile_topic_list_top_ad_size: "移动端视图主题列表页顶端.adsense广告大小选择"
adsense_topic_above_post_stream_code: "论坛标题以下.输入Adsense广告代码"
adsense_mobile_topic_above_post_stream_code: "论坛标题以下.手机版.输入Adsense广告代码"
adsense_topic_above_post_stream_ad_sizes: "论坛标题以下.Adsense广告大小选择"
adsense_mobile_topic_above_post_stream_ad_size: "移动端视图帖子前.Adsense广告大小选择"
adsense_topic_above_suggested_code: "论坛主题建议以上.输入Adsense广告代码"
adsense_mobile_topic_above_suggested_code: "论坛主题建议以上.手机版.输入Adsense广告代码"
adsense_topic_above_suggested_ad_sizes: "论坛主题建议以上.Adsense广告大小选择"
adsense_mobile_topic_above_suggested_ad_size: "移动端视图论坛主题建议以上.Adsense广告大小选择"
adsense_post_bottom_code: "评论以下.暂停Adsense标题广告"
adsense_mobile_post_bottom_code: "评论以下.手机版.输入Adsense广告代码"
adsense_post_bottom_ad_sizes: "评论以下.Adsense广告大小选择"
adsense_mobile_post_bottom_ad_size: "移动端视图论坛主题页底端.Adsense广告大小选择"
adsense_nth_post_code: "Nth评论"
amazon_through_trust_level: "亚马逊广告.最高的信任级别"
amazon_topic_list_top_src_code: "主页.输入亚马逊广告代码(src)"
amazon_topic_list_top_ad_width_code: "主页.亚马逊广告宽度"
amazon_topic_list_top_ad_height_code: "主页.亚马逊广告高度"
amazon_mobile_topic_list_top_src_code: "主页.手机版.输入亚马逊广告代码(src)"
amazon_mobile_topic_list_top_ad_width_code: "主页.手机版.亚马逊广告宽度"
amazon_mobile_topic_list_top_ad_height_code: "主页.手机版.亚马逊广告高度"
amazon_topic_above_post_stream_src_code: "论坛标题以下.输入亚马逊广告代码(src)"
amazon_topic_above_post_stream_ad_width_code: "论坛标题以下.亚马逊广告宽度"
amazon_topic_above_post_stream_ad_height_code: "论坛标题以下.亚马逊广告高度"
amazon_mobile_topic_above_post_stream_src_code: "论坛标题以下.手机版.输入亚马逊广告代码(src)"
amazon_mobile_topic_above_post_stream_ad_width_code: "论坛标题以下.手机版.亚马逊广告宽度"
amazon_mobile_topic_above_post_stream_ad_height_code: "论坛标题以下.手机版.亚马逊广告高度"
amazon_topic_above_suggested_src_code: "论坛主题建议以上.输入亚马逊广告代码(src)"
amazon_topic_above_suggested_ad_width_code: "论坛主题建议以上.亚马逊广告宽度"
amazon_topic_above_suggested_ad_height_code: "论坛主题建议以上.亚马逊广告高度"
amazon_mobile_topic_above_suggested_src_code: "论坛主题建议以上.手机版.输入亚马逊广告代码(src)"
amazon_mobile_topic_above_suggested_ad_width_code: "论坛主题建议以上.手机版.亚马逊广告宽度"
amazon_mobile_topic_above_suggested_ad_height_code: "论坛主题建议以上.手机版.亚马逊广告高度"
amazon_post_bottom_src_code: "评论以下.输入亚马逊广告代码(src)"
amazon_post_bottom_ad_width_code: "评论以下.亚马逊广告宽度"
amazon_post_bottom_ad_height_code: "评论以下.亚马逊广告高度"
amazon_mobile_post_bottom_src_code: "评论以下.手机版.输入亚马逊广告代码(src)"
amazon_mobile_post_bottom_ad_width_code: "评论以下.手机版.亚马逊广告宽度"
amazon_mobile_post_bottom_ad_height_code: "评论以下.手机版.亚马逊广告高度"
amazon_nth_post_code: "Nth评论"
dfp_publisher_id: "输入谷歌广告管理器(曾用名 DFP网络号码可在广告网络设置中找到。"
dfp_through_trust_level: "按照信任等级向用户展示广告。高于此等级的用户不会看到广告。"
dfp_target_topic_list_top_key_code: "输入自定义广告导向键——清单级"
dfp_target_topic_list_top_value_code: "输入自定义广告导向值——清单级"
dfp_target_topic_above_post_stream_key_code: "输入自定义广告导向键——清单级"
dfp_target_topic_above_post_stream_value_code: "输入自定义广告导向值——清单级"
dfp_target_topic_above_suggested_key_code: "输入自定义广告导向键——清单级"
dfp_target_topic_above_suggested_value_code: "输入自定义广告导向值——清单级"
dfp_nth_post_code: "每这么多条帖子展示一条广告"
dfp_mobile_post_bottom_ad_sizes: "移动端视图帖子间广告单元大小选择"
dfp_target_post_bottom_key_code: "输入自定义广告导向键——清单级"
dfp_target_post_bottom_value_code: "输入自定义广告导向值——清单级"
adsense_publisher_code: "输入 Adsense 出版者ID号码不带 pub-"
adsense_through_trust_level: "按照信任等级向用户展示广告。高于此等级的用户不会看到广告。"
adsense_topic_list_top_ad_sizes: "选择广告大小"
adsense_mobile_topic_list_top_ad_size: "选择广告大小"
adsense_topic_above_post_stream_ad_sizes: "选择广告大小"
adsense_mobile_topic_above_post_stream_ad_size: "选择广告大小"
adsense_topic_above_suggested_ad_sizes: "选择广告大小"
adsense_mobile_topic_above_suggested_ad_size: "选择广告大小"
adsense_post_bottom_ad_sizes: "选择广告大小"
adsense_mobile_post_bottom_ad_size: "选择广告大小"
adsense_nth_post_code: "每这么多条帖子展示一条广告"
amazon_through_trust_level: "基于信任等级向用户展示广告。高于此等级的用户不会看到广告。"
amazon_topic_list_top_ad_width_code: "输入广告宽度"
amazon_topic_list_top_ad_height_code: "输入广告高度"
amazon_mobile_topic_list_top_ad_width_code: "输入手机版广告宽度"
amazon_mobile_topic_list_top_ad_height_code: "输入手机版广告高度"
amazon_topic_above_post_stream_ad_width_code: "输入广告宽度"
amazon_topic_above_post_stream_ad_height_code: "输入高度"
amazon_mobile_topic_above_post_stream_ad_width_code: "输入手机版广告宽度"
amazon_mobile_topic_above_post_stream_ad_height_code: "输入手机版广告高度"
amazon_topic_above_suggested_ad_width_code: "输入广告宽度"
amazon_mobile_topic_above_suggested_ad_width_code: "输入手机版广告宽度"
amazon_mobile_topic_above_suggested_ad_height_code: "输入手机版广告高度"
amazon_post_bottom_ad_width_code: "输入广告宽度"
amazon_post_bottom_ad_height_code: "输入广告高度"
amazon_mobile_post_bottom_ad_width_code: "输入手机版广告宽度"
amazon_mobile_post_bottom_ad_height_code: "输入手机版广告高度"
amazon_nth_post_code: "每这么多条帖子展示一条广告"
codefund_through_trust_level: "基于信任等级向用户展示广告。高于此等级的用户不会看到广告。"
codefund_nth_post: "每这么多条帖子展示一条广告"
codefund_below_post_enabled: "每贴下面都展示一幅广告"
codefund_above_post_stream_enabled: "在贴文流以上展示广告"
codefund_above_suggested_enabled: "在推荐主题列表以上展示广告"
codefund_top_of_topic_list_enabled: "在推主题列表以上展示广告"

View File

@ -31,6 +31,7 @@ register_css <<CSS
.google-adsense .google-adsense-label {
width: 728px;
max-width: 100%;
margin: 0 auto;
}