remove advertisement code

This commit is contained in:
r888888888
2017-02-21 13:33:20 -08:00
parent f4d9f76646
commit 6c9d5e4f9a
24 changed files with 1 additions and 704 deletions

View File

@@ -1,35 +0,0 @@
module AdvertisementsHelper
def render_advertisement(ad_type)
if Danbooru.config.can_see_ads?(CurrentUser.user)
@advertisement = Advertisement.find(:first, :conditions => ["ad_type = ? AND status = 'active'", ad_type], :order => "random()")
if @advertisement
content_tag(
"div",
link_to(
image_tag(
@advertisement.image_url,
:alt => "Advertisement",
:width => @advertisement.width,
:height => @advertisement.height
),
advertisement_hits_path(:advertisement_id => @advertisement.id),
:method => :post
),
:style => "margin-bottom: 1em;"
)
end
else
""
end
end
def render_rss_advertisement(short_or_long, safe)
if Danbooru.config.can_see_ads?(CurrentUser.user)
if safe
render "advertisements/jlist_rss_ads_explicit_#{short_or_long}"
else
render "advertisements/jlist_rss_ads_safe_#{short_or_long}"
end
end
end
end