From 5cdab92a4bdf7bb793ce7f3e2114cb6886394344 Mon Sep 17 00:00:00 2001 From: Jocelyn Delande Date: Sat, 25 Jan 2014 22:22:11 +0100 Subject: [PATCH 1/2] Documentation on comment counter. --- docs/docs/advanced-integration.rst | 23 +++++++++++++++++++++++ docs/docs/quickstart.rst | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 docs/docs/advanced-integration.rst diff --git a/docs/docs/advanced-integration.rst b/docs/docs/advanced-integration.rst new file mode 100644 index 0000000..cfbe1b7 --- /dev/null +++ b/docs/docs/advanced-integration.rst @@ -0,0 +1,23 @@ +Advanced integration +==================== + +Comment counter +---------------- + +If you want to display a comment counter for a given thread, simply +put a link to that comments thread anchor: + +.. code-block:: html + + Comments + +The *isso js client* willl replace the content of this tag with a human readable +counter like *"5 comments"*. + +Alternatively, if guessing from `href` is not relevant, you could use a +`data-isso-id` attribute on the `` to indicate which thread to count for. + +Make sure you have `embed.min.js` included in your page (see :doc:`quickstart`). + +You can have as many comments counters as you want in a page but be aware that it +implies one `GET` request per counter. diff --git a/docs/docs/quickstart.rst b/docs/docs/quickstart.rst index 12850a1..49179d7 100644 --- a/docs/docs/quickstart.rst +++ b/docs/docs/quickstart.rst @@ -132,6 +132,9 @@ Note, that `data-isso` is optional, but when a website includes a script using That's it. When you open your website, you should see a commenting form. Leave a comment to see if the setup works. If not, see :doc:`troubleshooting`. + +For further integration, look at :doc:`advanced-integration`. + .. _Nginx: http://nginx.org/ .. _CORS: https://developer.mozilla.org/en/docs/HTTP/Access_control_CORS From b94329fc66fc17383a47cb6053d112d081e76d10 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sat, 25 Jan 2014 22:56:55 +0100 Subject: [PATCH 2/2] also mention count.min.js --- docs/docs/advanced-integration.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/advanced-integration.rst b/docs/docs/advanced-integration.rst index cfbe1b7..0deaceb 100644 --- a/docs/docs/advanced-integration.rst +++ b/docs/docs/advanced-integration.rst @@ -17,7 +17,9 @@ counter like *"5 comments"*. Alternatively, if guessing from `href` is not relevant, you could use a `data-isso-id` attribute on the `` to indicate which thread to count for. -Make sure you have `embed.min.js` included in your page (see :doc:`quickstart`). +Now, either include `count.min.js` if you want to show only the comment count +(e.g. on an index page) or `embed.min.js` for the full comment client (see +:doc:`quickstart`); do not mix both. You can have as many comments counters as you want in a page but be aware that it -implies one `GET` request per counter. +implies one `GET` request per comment anchor.