diff options
Diffstat (limited to 'lib/sisu/v0/html_promo.rb')
-rw-r--r-- | lib/sisu/v0/html_promo.rb | 21 |
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 |