Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
Updated README with info on new API code. Bumped gem version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Clarke committed Dec 9, 2008
1 parent e96b2e0 commit 9a03d70
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 4 deletions.
121 changes: 121 additions & 0 deletions README.textile
@@ -0,0 +1,121 @@
h1. Disqus Ruby Gem

The Disqus Gem helps you easily integrate the "Disqus":http://disqus.com
commenting system into your website. It works for any site programmed in Ruby,
and has view helpers for Rails and Merb.

Supports for the Disqus Javascript widgets is stable. Disqus API support is
"beta."

h2. Get it

h3. Stable release (does not yet include API):

<code>
gem install disqus
</code>

h3. Bleeding Edge (includes API):

<code>
gem install norman-disqus --source http://gems.github.com
</code>

h2. Use it:

h3. Configure it:

h4. Generic example:

<pre>
<code>
Disqus::defaults[:account] = "my_account"
Disqus::defaults[:api_key] = "my_api_key_from_disqus"
</code>
</pre>

h4. Rails-specific example:

<pre>
<code>
# in config/development.rb (or production.rb, test.rb, etc.)
config.after_initialize do
Disqus::defaults[:account] = "my_disqus_account"
end
</code>
</pre>
Note that here the "after initialize" is necessary, otherwise your settings
won't be set properly.


h3. Show the comment threads on a post page:

<pre>
<code>
# Loads the commenting system
disqus_thread

# Or if you're not using Rails/Merb:
Disqus::Widget::thread

# Sets the inner html to the comment count for any links on the page that
# have the anchor "disqus_thread". For example, "View Comments" below would
# be replaced by "1 comment" or "23 comments" etc.
# <a href="http://my.website/article-permalink#disqus_thread">View Comments</a>
# <a href="http://my.website/different-permalink#disqus_thread">View Comments</a>
disqus_comment_counts

# Or if you're not using Rails/Merb:
Disqus::Widget::comment_counts
</code>
</pre>

h3. Show the combo widget on a post page:

<pre>
<code>
disqus_combo(:color => "blue", :hide_mods => false, :num_items => 20)

# Or for non-Rails/Merb:
Disqus::Widget::combo(:color => "blue", :hide_mods => false, :num_items => 20)
</code>
</pre>

h3. Show the comment count on a permalink:

<pre>
<code>
link_to("Permalink", post_path(@post, :anchor => "disqus_thread"))
...
disqus_comment_counts

# Or for non-Rails/Merb:
Disqus::Widget::comment_counts
</code>
</pre>

h2. Hack it:

Github repository: http://github.com/norman/disqus

h2. Complain about it:

"norman@randomba.org":norman@randomba.org

h2. Learn more about Disqus:

"http://disqus.com":http://disqus.com

h2. Thanks to the following contributors:

* "Matt Van Horn":http://github.com/qhoxie - Disqus API
* "Quin Hoxie":http://github.com/qhoxie - Merb support

h2. Legal Stuff

The Disqus Ruby gem was not created by, nor is officially supported by
Disqus.com or Big Head Labs, Inc. Use it at your own risk and your own
responsibility under the terms of the MIT License.

Copyright (c) 2008 "Norman Clarke":norman@randomba.org, released under
the MIT license
8 changes: 4 additions & 4 deletions disqus.gemspec
@@ -1,14 +1,14 @@
Gem::Specification.new do |s|
s.name = "disqus-api"
s.version = "0.1.1"
s.date = "2008-09-03"
s.rubyforge_project = 'disqus-api'
s.version = "0.2.0"
s.date = "2008-12-09"
s.rubyforge_project = 'disqus'
s.summary = "Integrates Disqus commenting system into your Ruby-powered site."
s.email = 'norman@randomba.org'
s.homepage = 'http://randomba.org'
s.description = 'Integrates Disqus into your Ruby-powered site. Works with any Ruby website, and has view helpers for Rails and Merb.'
s.has_rdoc = true
s.authors = ['Norman Clarke','Matt Van Horn']
s.authors = ['Norman Clarke', 'Matt Van Horn']
s.files = [
"MIT-LICENSE",
"README.textile",
Expand Down

0 comments on commit 9a03d70

Please sign in to comment.