[TW5] How to add comments to a wiki on tiddlyspot (without access to a server)

311 views
Skip to first unread message

Jed Carty

unread,
Jun 20, 2015, 12:24:19 PM6/20/15
to tiddl...@googlegroups.com
In the hangout Jeremy pointed out that I should probably let people know about what I got to work with other commenting systems on tiddlywiki, so here is my progress for putting DISQUS and IntenseDebate into a tiddlywiki. Nether of these require access to a server so they work on tiddlyspot.The same applies to the muut comments I showed before.

DISQUS comments

There are two problems with using DISQUS in a tiddlywiki:

1)You can only have one comment thread per page because the script used contains the comment thread id and there is no way that I have found to use two scripts (they have the same function names).
2)There is the same problem as with the muut comments where the tiddler with the comment thread needs to be open when the wiki is loaded for the comments to be displayed (or the wiki needs to be reloaded with the permalink to the tiddler).

Aside from those problems the comments work as expected. Here is a site showing the how it works with instructions.

IntenseDebate Comments:

This one is cheating because everything is put into a tiddler tagged with $:/tags/RawMarkup, but it is a way to get comments on a tiddlywiki without needing access to a server.

This one also has problems:

1)You can't put the comments inside a tiddler, so they are always at the very bottom of the wiki and you can't use wikitext to change anything about them.
2)You can only have one comment thread per wiki for the same reason as DISQUS, the thread id is in the script and I haven't found a way to change this.

This one doesn't ever require a reload. There is a demo with instructions here.

So, in summary:

muut comments allow you to put different comment threads in different tiddlers, but have some problems loading. Other than the loading problems it works as expected.
DISQUS only allows one thread per wiki (actually per html file, but it has the same effect). DISQUS requires a reload when opening a tiddler with the comments, but reloading works better than with muut.
IntenseDebate doesn't require a reload but it also can only have one comment thread per wiki. Also I cheated for this one and just put the raw html into the wiki so the comments are always at the bottom of the page and can't be affected using wikitext.

None of them require access to a server and all of them are simple to set up.

Devin Weaver

unread,
Jun 21, 2015, 9:09:01 PM6/21/15
to tiddl...@googlegroups.com
So DISQUS offers a way to use in single page apps: https://help.disqus.com/customer/portal/articles/472107

Seems to me the best approach is to have a coments tab on the sidebar and as the user scrolls to a tiddler it executes the  DISQUS.reset function and sets the page identifier to that tiddler.

Jed Carty

unread,
Jun 21, 2015, 11:48:21 PM6/21/15
to tiddl...@googlegroups.com
I had not seen that. If I can make that work than DISQUS should work than there shouldn't be any problems using it with tiddlywiki. I will look into it.

Jed Carty

unread,
Jun 22, 2015, 12:39:13 AM6/22/15
to tiddl...@googlegroups.com
Well, that sort of works. You can still only have a single comment thread, but you can use their reset function to change which comment thread is displayed. So you would have to have a button on each tiddler where you want comments and the user would have to click on the button to set disqus to display comments for that tiddler. If you open a tiddler and disqus loads without you pressing the button than the comments displayed will be whatever you set the default comment thread to be. So it works but it isn't perfect. I will put the new stuff up on the demo site and update the instructions.

If muut has something to force a reload like this than it would be ideal since you don't need to change the script to switch comment threads.

Jed Carty

unread,
Jun 22, 2015, 1:20:50 AM6/22/15
to tiddl...@googlegroups.com
There is progress with DISQUS comments, it is at a point where if you use the zoomin storyview the only problem is that you have to click a button to make the comments load in each tiddler.

The demo site is updated. This fix comes with its own new and unique problems!

Only one comment thread can be displayed on a page. So if you have two tiddlers open and each one should have a comment thread only one will actually load. If you click on the button to make the comments load for the second tiddler the comments will load, but they will load in place of the comments in the first tiddler and not in the second tiddler.
If you click on a button to load the comments and no comments have successfully loaded in your wiki yet than you will get a javascript error. Everything works, but you will get an error anyway (it is because you get the error since the script isn't loaded, but the button loads the script if it wasn't loaded so it works anyway).

I don't think that it is possible to make this work better because it doesn't look like DISQUS can support having multiple comment threads displayed on a single page. All of the identifying information is in the script, not in the code used to place the comments. You may be able to use the part of what Felix showed during the last hangout that causes things to happen based on scrolling events to make comments for a tiddler automatically load when you scroll to that tiddler, but that would have other problems.

Alex Hough

unread,
Jun 22, 2015, 3:18:01 AM6/22/15
to TiddlyWiki
Just an idea from the top of my head... could a google spreadsheet form be used for comments

alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e19c8d5e-8ab6-437e-8c55-0891d0fc0480%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Richard Smith

unread,
Jun 22, 2015, 4:00:28 AM6/22/15
to tiddl...@googlegroups.com
Hi Alex,

The point of using something like disqus is that people must have credentials to leave a comment, which stops a lot of spam.

Regards,
Richard

Alex Hough

unread,
Jun 22, 2015, 4:42:57 AM6/22/15
to TiddlyWiki
I see...i forget about spam....
Are comments on their way out anyway? I mean people point at it and tweet their comments now don't they?

Alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

Birthe C

unread,
Jun 22, 2015, 7:54:02 AM6/22/15
to tiddl...@googlegroups.com
Hi Alex,

Twitter is not equally popular all over the word. It is very popular in USA and UK a lot less here in Denmark.

Danish papers have had a lot of articles on people having their lives ruined after a tweet - very often totally misunderstood.


Birthe

Devin Weaver

unread,
Jun 22, 2015, 8:00:10 AM6/22/15
to tiddl...@googlegroups.com
Jed, put the comment stream in a side bar tab. I did something similar with Mocha testing because the framework required only one element on the page and I could not embed it into each tiddler. I instead embedded it into the sidebar as a tab. Then in the tab tiddler I used a widget that would copy (appendChild) the one element into it. I saved a reference in memory to the original element so it was easy to appendChild each time it rendered. Here is my implementation to that sort of thing: https://github.com/sukima/promise-tutorial  and see it in action: http://sukima.github.io/promise-tutorial/#Welcome

Jed Carty

unread,
Jun 22, 2015, 10:08:19 AM6/22/15
to tiddl...@googlegroups.com
Alex,

Yes, I have a google form embedded on the wiki reference wiki for people to use to leave comments, it works but you couldn't have social media type comments using that.

Devin,

Yes, sorry I see now that you had suggested that. That would work well enough. Combined with what Felix made I may be able to make the comments switch to a tiddler when it scrolls into view if the button is a problem. Thank you for your help, I wouldn't have thought of either of your suggestions and they solve the biggest problems with disqus and tiddlywiki.

Jed Carty

unread,
Jun 22, 2015, 3:26:33 PM6/22/15
to tiddl...@googlegroups.com
I put what is needed to use the DISQUS comments in a plugin. Because the $:/tags/WikifiedMarkup tag hasn't been implemented yet you have to edit one of the shadow tiddlers to set the script up properly. For some reason it will give you a javascript error when you try to load a comment thread the first time, and you may have to click the button to load the thread twice. Once you have done it once there shouldn't be any problems until you reload the wiki at which point the same thing will happen.

For the initial setup you need to go to the DISQUS tab in the control panel and enter the site url or nothing will work.

I don't know why, and at the moment I am angry at this so I don't care. If it is ever going to be fixed than someone else is going to have to figure out how to do it.

It is up on the [[demo site|http://ooktech.com/jed/ExampleWikis/DISQUS%20Demo/]].

Måns

unread,
Jun 22, 2015, 7:54:55 PM6/22/15
to tiddl...@googlegroups.com
Hi Jed

I understand your frustration very well.
Thank you for making and sharing this proof of concept -
It's quite a task and I apreciate that you even managed to write a setup manual which I was able to follow :-)

I've setup your plugin with my own disqus user here: http://xn--mns-ula.dk/kinabog/#thing1 
If you scroll up a little you'll see that I was able to implement etherpad as a chat tool (pr tiddler - no spam control though)


Cheers Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages