Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Added :identifier option to disqus_thread #4

Open
wants to merge 3 commits into from

2 participants

Michael Kelly Rafael Felix
Michael Kelly

First off, great gem. :P

I'm learning Rails and Ruby through Mozilla's Webcraft online course program, and used your gem to add comments to our blog sample project. I wanted to be able to refer to the same comment thread from multiple URLs (I have permalinks and you can also access posts via the post id). So I added the :identifier option to disqus_thread.

Let me know if I've made any big mistakes, still trying to learn the Right Way (tm) to do things in Ruby and Rails. :P Thanks!

Rafael Felix
fellix commented July 12, 2011

+1

I thins the disqus_url can be add too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 3 unique commits by 1 author.

Feb 10, 2011
Added :identifier option to widget c00cf4b
Added require version to see if it'd work a7d7405
Revert "Added require version to see if it'd work"
This reverts commit a7d7405.
1087b23
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  lib/disqus/widget.rb
3  lib/disqus/widget.rb
@@ -34,6 +34,9 @@ def thread(opts = {})
34 34
         if opts[:developer]
35 35
           s << '<script type="text/javascript">var disqus_developer = 1;</script>'
36 36
         end
  37
+        if opts[:identifier]
  38
+          s << '<script type="text/javascript">var disqus_identifier = "' + opts[:identifier].to_s + '";</script>'
  39
+        end
37 40
         s << '<div id="disqus_thread"></div>'
38 41
         s << '<script type="text/javascript" src="' + THREAD + '"></script>'
39 42
         s << '<noscript><a href="http://%s.disqus.com/?url=ref">'
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.