Steps
0 Create account of firebase/wilddog, open Email auth. Add rule:
1 Copy comments.js to /js. Of course, you can do something like:
- Minify javascripts
- Translate error messages:
2 Create files such as comments.html and latest-comments.html and modify index.html and post.html as you like.
Example:
1) import js of firebase/wilddog and comment.js
if use firebase:
if use wilddog:
2) init
if use firebase
if use wilddog
3) Code your own js as you like using functions:
- Comments.handleError(error)
- Comments.errors
- Comments.comment.list(post, callback)
- Comments.comment.listCallback(post, callback)
- Comments.comment.add(name, email, post, comment, url, reply, callback)
- Comments.comment.recent.get(count, callback)
- Comments.comment.recent.updateCallback(count, callback)
- Comments.comment.recent.removeCallback()
- Comments.post.commentCount.get(post, callback)
- Comments.post.commentCount.set(post, count, callback)
- Comments.post.commentCount.updateCallback(post, callback)
Example:
comments.html
latest-comments.html