Sha256: aede4aeabb2d166bf554e8c60ac0b6f4d6fb425855668f31e2513145d4f6d7c3
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
require 'sha1' module Awestruct module Extensions class IntenseDebate def execute(site) site.pages.each{|p| p.extend IntenseDebatable } end module IntenseDebatable def intense_debate_comments() post_id = self.post_id ? self.post_id : SHA1.hexdigest( self.url ) html = %Q(<script>\n) html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n) html += %Q( var idcomments_post_id='#{post_id}';\n ) html += %Q( var idcomments_post_url='#{self.url}';\n) html += %Q(</script>\n) html += %Q(<span id="IDCommentsPostTitle" style="display:none"></span>\n) html += %Q(<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>\n) html end def intense_debate_comments_link() post_id = self.post_id ? self.post_id : SHA1.hexdigest( self.url ) html = %Q(<script>\n) html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n) html += %Q( var idcomments_post_id='#{post_id}';\n ) html += %Q( var idcomments_post_url='#{self.url}';\n) html += %Q(</script>\n) html += %Q(<script type='text/javascript' src='http://www.intensedebate.com/js/genericLinkWrapperV2.js'></script>\n) html end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
awestruct-0.1.2 | lib/awestruct/extensions/intense_debate.rb |
awestruct-0.1.1 | lib/awestruct/extensions/intense_debate.rb |
awestruct-0.1.0 | lib/awestruct/extensions/intense_debate.rb |