aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/html_promo.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2009-07-04 08:46:20 -0400
committerRalph Amissah <ralph@amissah.com>2009-07-04 08:46:23 -0400
commit4e4ce5d362db3e88d41d371645bf998cdead1fbf (patch)
tree70a0b5b1bd3e1f3786a26adf34c851926c2829c3 /lib/sisu/v0/html_promo.rb
parentdal_numbering, minor regex reduction (diff)
html various minor: use suffix provided in constants; module SiSU_HTML_Tune; html promo
html promo, possibility of use of adsense, or other
Diffstat (limited to 'lib/sisu/v0/html_promo.rb')
-rw-r--r--lib/sisu/v0/html_promo.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/sisu/v0/html_promo.rb b/lib/sisu/v0/html_promo.rb
index eefc2e72..d4c1f4c0 100644
--- a/lib/sisu/v0/html_promo.rb
+++ b/lib/sisu/v0/html_promo.rb
@@ -244,6 +244,21 @@ module SiSU_HTML_promo
end
%{<p class="pane">Price:#{gbp}#{euro}#{usd}</p>}
end
+ def adsense #draw content from a configuration file
+ def column_right
+ if defined? @ad[:promo]['ad']['adsense']['column_right']
+ @ad[:promo]['ad']['adsense']['column_right'].join("\n")
+ else ''
+ end
+ end
+ def line_single
+ if defined? @ad[:promo]['ad']['adsense']['line_single']
+ @ad[:promo]['ad']['adsense']['line_single'].join("\n")
+ else ''
+ end
+ end
+ self
+ end
def site_link #Work area
if url_link.url
<<WOK
@@ -386,6 +401,12 @@ WOK
if defined? @ad[:promo][type][id] \
and not @ad[:promo][type][id].nil?
adverts << output_form_select(type,id)
+ else
+ if defined? @ad[:promo][category][type][id] \
+ and @ad[:promo][category][type][id].class==Array \
+ and @ad[:promo][category][type][id].length > 0
+ adverts << @ad[:promo][category][type][id].join("\n")
+ end
end
end
end