caboose-cms 0.5.192 → 0.5.193
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDgzYmEyYzE1Mjg5ZDljNGJhYWUzMjhlOTYwZmVhZmFjZTdkZGEwMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODY1NDE2MmQzZTdhN2Y5YWE1MDIwMmUwYzM4MWVhOTI4MGZiY2U5Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzIzMmEzMDY3Zjk4NmFkYTRlNTkxYTZjZWQ2ZjA2NzMzYjRjMzA1ZDE4MmNh
|
10
|
+
MTVjOTAyMDA5ZWE4NjFmNWRjYmZhNTJjZDMzZGY1ODk5ZDkxZTNlNzk2M2Rl
|
11
|
+
ZWQ3ZDczZWNjOGNlMjY0YTAxNmQ2ODJiYmQzZTg3NWI1YTA2NTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmM0OTI5YjcwNjVmM2QzNTE5OTM0NDNiNWIwMWM0NzNlZjI4Yjk0MzEzZTU1
|
14
|
+
MTA3ZmNmNzljMzIyNzczMmJhYmJkMjI1ZDZiNDUzMDk3YzA3ZDE0NjIwZDYy
|
15
|
+
YWYwYTQzMzFjOWZmZGE4YjQ0YTU1NWIyMWJlNzM3MDZkNTVmZGQ=
|
data/app/models/caboose/block.rb
CHANGED
@@ -240,10 +240,10 @@ class Caboose::Block < ActiveRecord::Base
|
|
240
240
|
str = view.render(:partial => "../../sites/#{site.name}/blocks/#{name}", :locals => options2)
|
241
241
|
rescue ActionView::MissingTemplate => ex
|
242
242
|
begin
|
243
|
-
str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
|
244
|
-
rescue
|
243
|
+
str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
|
244
|
+
rescue Exception => ex
|
245
245
|
Caboose.log("Partial caboose/blocks/#{name} doesn't exist.")
|
246
|
-
str = "<p class='note error'>#{self.partial_message(
|
246
|
+
str = "<p class='note error'>#{self.partial_message(name, ex)}</p>"
|
247
247
|
end
|
248
248
|
end
|
249
249
|
|
@@ -8,32 +8,10 @@ module Caboose
|
|
8
8
|
:conversion_id,
|
9
9
|
:labels_function
|
10
10
|
|
11
|
-
def labels(page)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def js_code(request, page)
|
16
|
-
return "" if !self.site.use_retargeting
|
17
|
-
|
18
|
-
str = ""
|
19
|
-
labels = self.labels(request, page)
|
20
|
-
labels.each do |label|
|
21
|
-
str << "<script type='text/javascript'>\n"
|
22
|
-
str << "/* <![CDATA[ */\n"
|
23
|
-
str << "var google_conversion_id = #{self.conversion_id};\n"
|
24
|
-
str << "var google_conversion_label = '#{label}';\n"
|
25
|
-
str << "var google_custom_params = window.google_tag_params;\n"
|
26
|
-
str << "var google_remarketing_only = true;\n"
|
27
|
-
str << "/* ]]> */\n"
|
28
|
-
str << "</script>\n"
|
29
|
-
str << "<script type='text/javascript' src='//www.googleadservices.com/pagead/conversion.js'></script>\n"
|
30
|
-
str << "<noscript>\n"
|
31
|
-
str << "<div style='display:inline;'>\n"
|
32
|
-
str << "<img height='1' width='1' style='border-style:none;' alt='' src='//googleads.g.doubleclick.net/pagead/viewthroughconversion/#{self.conversion_id}/?value=1.00&currency_code=USD&label=#{label}&guid=ON&script=0'/>\n"
|
33
|
-
str << "</div>\n"
|
34
|
-
str << "</noscript>\n"
|
35
|
-
end
|
36
|
-
return str
|
11
|
+
def labels(request, page)
|
12
|
+
arr = eval(self.labels_function)
|
13
|
+
return [arr] if arr is_a? String
|
14
|
+
return arr
|
37
15
|
end
|
38
16
|
|
39
17
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% if site.use_retargeting %>
|
2
2
|
<% rc = site.retargeting_config %>
|
3
|
-
<% rc.labels(request, page).each do |label %>
|
3
|
+
<% rc.labels(request, page).each do |label| %>
|
4
4
|
<script type='text/javascript'>
|
5
5
|
/* <![CDATA[ */
|
6
|
-
var google_conversion_id =
|
6
|
+
var google_conversion_id = <%= rc.conversion_id %>;
|
7
7
|
var google_conversion_label = "<%= raw label %>";
|
8
8
|
var google_custom_params = window.google_tag_params;
|
9
9
|
var google_remarketing_only = true;
|
data/lib/caboose/version.rb
CHANGED