• This repository has been archived on 06/Dec/2017
  • Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 16 years ago
  • Updated over 13 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Ruby library for the Disqus commenting API and Javascript widgets.

Disqus


**NOTE** I am no longer using this library and would like to hand if off to another maintainer. If you're interested in using this and would like to take over, please send me a message.

The Disqus Gem helps you easily integrate the Disqus commenting system into your Ruby-based website. It includes a Ruby wrapper for Disqus's REST API, and views helpers to generate their Javasript widgets.

What is Disqus?

From the Disqus website:

"Disqus, pronounced "discuss", is a service and tool for web comments and discussions. The Disqus comment system can be plugged into any website, blog, or application. Disqus makes commenting easier and more interactive, while connecting websites and commenters across a thriving discussion community."

"Disqus is a free service to the general public with absolutely no inline advertisements."

Getting it

gem install disqus

Using it

Configure it

Disqus::defaults[:account] = "my_disqus_account"

Optional, only if you're using the API

Disqus::defaults[:api_key] = "my_disqus_api_key"

Options

:api_key         => "" # your api key
:account         => "", # your disqus account
:developer       => false, # allows threads to work on localhost
:container_id    => 'disqus_thread', # desired thread container
:avatar_size     => 48, # squared pixel size of avatars
:color           => "grey", # theme color
:default_tab     => "popular", # default widget tab
:hide_avatars    => false, # hide or show avatars
:hide_mods       => true, # hide or show moderation
:num_items       => 15, # number of comments to display
:show_powered_by => true, # show or hide powered by line
:orientation     => "horizontal" # comment orientation

Show the comment threads widget on a post page

# Loads the commenting system
disqus_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

Show the combo widget on a post page

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

Show the comment count on a permalink

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

Work with the Disqus API

See the Disqus::Api class for more info on the Disqus API. You can also read the Disqus developer info here.

Hack it

Github repository:

http://github.com/norman/disqus

Learn more about Disqus:

http://disqus.com

Thanks to the following contributors:

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-2010 Norman Clarke. Released under the MIT license

More Repositories

1

friendly_id

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.
Ruby
6,129
star
2

babosa

A library for creating slugs. Babosa is an extraction and improvement of the string code from FriendlyId, intended to help developers create similar libraries or plugins.
Ruby
529
star
3

telescope

A highly customizable test library for Lua that allows declarative tests with nested contexts.
Lua
159
star
4

haml-scaffold

Rails scaffold generator that outputs Haml and better functional tests.
Ruby
114
star
5

squirm_rails

Easily use and manage Postgres stored procedures with Active Record.
Ruby
72
star
6

friendly_id-globalize

Globalize support for FriendlyId
Ruby
66
star
7

ambry

Ambry is a database and ORM replacement for (mostly) static models and small datasets. It provides ActiveModel compatibility, and flexible searching and storage.
Ruby
56
star
8

lua-haml

Haml for Lua
Lua
53
star
9

hello-lua

A demo of how to make simple C modules for Lua
C
34
star
10

squirm

A library that simplifies working with Postgres stored procedures.
Ruby
18
star
11

grackle

A static blog generator written in Lua
Lua
18
star
12

luacov

LuaCov is a simple coverage analyzer for Lua code. (fork of official CVS repo)
16
star
13

lua-postgres

A basic Postgres driver for Lua
C
16
star
14

has_image

A lightweight and hackable library for attaching images to ActiveRecord models.
Ruby
16
star
15

phonenumber

Allows parsing and formatting of phone numbers
Ruby
16
star
16

hops

A lightweight, pluggable web framework for Lua
Lua
15
star
17

lua-devtools

An irb-workalike for Lua, and a command-line debugger with readline support.
Lua
15
star
18

tlua

A simple task runner for Lua - now abandoned because I think it's just easier to use plain old Makefiles.
Lua
14
star
19

spanish

Linguistic utilities for working with Spanish words.
Ruby
12
star
20

enc

Notes and slides from my Encodings talk at RubyConf Brasil 2010
Ruby
12
star
21

nearby

Quick and easy geocoding using Geonames.org data and TokyoCabinet.
Ruby
10
star
22

nt54

Argentine phone number parsing, validating, formatting and meta-info
Ruby
10
star
23

active_record_random

Monkey patch to ActiveRecord to allow :order => :random that works the same for MySQL, SQLite and Postgres.
9
star
24

fatalistic

Table locking for Active Record
Ruby
9
star
25

yourbugreportneedsmore.info

The yourbugreportneedsmore.info website
HTML
8
star
26

friendly_id_manual_slug_demo

A Rails 3 app showing how to manually control FriendlyId slugs
Ruby
7
star
27

mongrel2_wsapi

In-progress Lua WSAPI adapter for Mongrel2
Lua
6
star
28

base-site-generator

The current base layout and helpers I'm using to scaffold quick projects. Feel free to use if and as you wish.
Ruby
6
star
29

squirm_model

Model API for Squirm
Ruby
5
star
30

micro_factory

Minimal factories for Active Record.
Ruby
4
star
31

utf8_utils

Utilities for cleaning up UTF8 strings.
Ruby
4
star
32

phonology

Phonology utilities for Ruby
Ruby
3
star
33

dotfiles

My dotfiles
Vim Script
2
star
34

wsapi_test

Mock connector for unit testing WSAPI apps. TEMP. Go here instead: http://github.com/norman/wsapi
Lua
2
star
35

hash_formatter

Hash Formatter is a library that formats Ruby hashes for code editors.
Ruby
2
star
36

gem_init

My Ruby Gem initialization biolerplate
Ruby
2
star
37

luaargentina

luaargentina.org website
2
star
38

luadns-zones

My DNS zones hosted on LuaDNS.
Lua
1
star
39

friendly_id_join_test

Temporary debugging repo, don't follow
Ruby
1
star
40

haml_textarea_bug

Demonstrates a bug in Haml
Ruby
1
star
41

vim-files

My vim files
Vim Script
1
star
42

friendly_id_sequel

An adapter which allows you to use FriendlyId with Sequel::Model
Ruby
1
star