Someone asked me about this so here it is. I realized that adding comments to your Tumblr is not as straightforward as it may seem. Here is how you want to do it.:
- Sign up for a Haloscan account
- Go to the Install tab and choose Other/Manual to get the javascript code to paste on your site
- Switch your Tumblr to a custom layout so that you can edit the code
- Paste the first Haloscan snippet somewhere in the head
- Edit and paste the second snippet in your post blocks
The last point is the confusing one to some. Let me explain. Tumblr uses special tags to define blocks of code that do something different. For example take the following block:
{block:Regular}
{block:Title}
{Title}
{/block:Title}
{Body}
{/block:Regular}
It tells Tumblr how to display a single post (here we are looking at a regular text post). Note that all the stuff in braces is treated as special Tumblr tag. For example {Permalink} will expand to the full permalink URL of this given post, and {Title} will expand to it’s title.
Haloscan requires that you somehow create a unique identifier for each of the pages for which you want comments and pass it into their javascript calls. There are different ways to do it, but we can exploit Tumblr’s dynamic tags to automatically get a unique post ID for Haloscan. I simply chose to use the {Permalink} tag for this purpose.
My edited regular block looks like this:
{block:Regular}
{block:Title}
{Title}
{/block:Title}
{Body}
|
{/block:Regular}
Note how I’m plugging the {Permalink} in all the places where Haloscan requires you to put the unique post ID. At runtime it will expand to the full URL which will be unique for each post. You can actually just copy and paste this snippet to your Tumblr – it does not include any account specific info. Repeat this for every block that you want to enable comments for. Tumblr defines different blocks for regular posts, links, conversations, videos, images and etc..
Anyway, this is all there is to it. I hope you find this helpful. :)
very useful, works a treat – thanks a lot!
Glad I could help. :)
Thank you for this. The solution worked perfectly.
Just what I’ve been looking for. Thanks!
I’ve been going mad trying to sort comments out this morning, before finding this advice. Thank you so much.
cheers
Thanks! Much appreciated!
Very nice, pretty usefull. Going to try that out right now.
appreciated!!!
hi there – i’m trying to install haloscan code into tumblr; i can’t find anywhere in tumblr that gives me the option to switch it to “custom,” or a place to enter code manually. do you know anything else about this?
@gijyun – from the Dashboard pull down the Account menu and go to Themes. You can choose the Custom HTML option in the right pane.
Since the HTML textbox is so small I recommend copying it into a text editor, adding the haloscan code and then pasting it back in.
:mrgreen:
This post saved my ass…thank you Luke!
How do I get comments and rating stars on one line?
Can’t thank you enough.
I just can’t figure this out, I’ve tried it so many ways. I don’t know the first thing about code so it’s kind of blowing my mind.
Am I missing a step between copying the code from Heloscan to posting it in between the {block:regular} part?
Thanks for the help!
hi luke maciak,
this definitely looks like a good tool. how does it compare with disqus?
thanks…
[quote comment=”9981″]how does it compare with disqus?[/quote]
Disqus is better. I have since switched to it and I’m very happy with it. I’d recommend Disqus over Haloscan.
It works … however, it doesn’t update the comment post count — mine remains at “0” comments even though I already have comments on there.
@Mae: Yeah, it is a flaw that I noticed too.
I have switched over to Disqus which is all in all a better system. I recommend you doing the same.
thank you for that… i totally pimped my tumblg with comments. w00t.
hey Luke,
I’m new to all of this and i’ve tried to us disqus, but the comments link takes me to a search engine with links to “permalinks”. how do i fix this problem?
thanks for the help!
maggs
Pingback: Twitted by _biscrok
hi, can you give us instructions on how to do this with disqus?
how to Sign up for a Haloscan account?
I don’t see “Sign Up”.
Please help me!
@ Mario:
Hey, as mentioned earlier you should rather use Disqus rather than HaloScan.