How to properly integrate DISQUS with client-side dynamic pages

399 views
Skip to first unread message

Sergey Ilinsky

unread,
Sep 14, 2010, 2:39:09 PM9/14/10
to Disqus Developers
Hi,

I am trying to integrate DISQUS on http://www.amplesdk.com/reference/
page where content is loaded dynamically leaving URL intact. My
question is: how should I reload comments? What variable
(disqus_identifier or disqus_url) should I use to identify the
generated page for DISQUS? (Internally I use pseudo URLs like
http://www.amplesdk.com/reference/?/ample/runtime/AMLUIEvent.xml for
Google Aalytics ets)

Intuitively I would expect to write something like:

function loadComments(url) {
disqus_url = url;
DISQUS.reload();
}

and then call whenever needed like loadComments(url) with my pseudo-
urls.

This however doesn't seem to work.

Sergey/

Anton Kovalyov

unread,
Sep 18, 2010, 4:14:26 PM9/18/10
to disqu...@googlegroups.com
Hi Sergey,

I would delete #disqus_thread's contents from DOM, delete DISQUS global variable, change disqus_url (or disqus_identifier, depending on what are you using) and then reload the script that loads Disqus on the page.

Anton


Sergey Ilinsky

unread,
Sep 22, 2010, 4:30:26 AM9/22/10
to disqu...@googlegroups.com
Anton, thanks for your reply.

This would work indeed, but for your service this would create unnecessary traffic - maybe you could consider adding a JavaScript API function to reload comments in some of the future versions?

Sergey/



Anton Kovalyov

unread,
Sep 22, 2010, 4:44:41 AM9/22/10
to disqu...@googlegroups.com

Yeah. We are working on something like this.

Sent from mobile phone.

On Sep 22, 2010 1:30 PM, "Sergey Ilinsky" <ser...@ilinsky.com> wrote:

Anton, thanks for your reply.

This would work indeed, but for your service this would create unnecessary traffic - maybe you could consider adding a JavaScript API function to reload comments in some of the future versions?

Sergey/

On 18 September 2010 22:14, Anton Kovalyov <an...@kovalyov.net> wrote:

>
> Hi Sergey,
>
> I would delete #disqus_thread's contents from DOM, delete DISQUS global variable,...


--

--
http://groups.google.com/group/disqus-dev?hl=en

Reply all
Reply to author
Forward
0 new messages