4 ms·
I've mentioned how to setup hndisq in my blog. <div id="hndisq" data-username="hndisq></div> You have to replace username with your username like this. And pl
by rajasimon 6y ago
I've mentioned how to setup hndisq in my blog.
<div id="hndisq" data-username="hndisq></div>
You have to replace username with your username like this. And place this in your blog website.
<div id="hndisq" data-username="ColinWright></div>
Once that done it will automatically fetch all of your hacker news submission. For example if you have a blog ColinWright.com and you created a new blog ColinWright.com/blog/my-new-blog.
And also you submitted the blog to Hacker News then the hacker news comment will automatically load.
I'm not good with explaining. Hope you understand the above context.
- ColinWright 6y agoNope, still doesn't make sense. I can include my username, fine, not a problem. But I've submitted multiple blog posts to HN, and many of them have comments here. How does a blog post know how to pick up the comments from the submission it relates to? Specific examples: Here's a blog post: https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te10hn https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te1... Here's the HN discussion: https://news.ycombinator.com/item?id=23131350 https://news.ycombinator.com/item?id=23131350 How would that blog post know to pick up that discussion? Here's another blog post: https://www.solipsys.co.uk/new/SellYourselfSellYourWork.html?te20hn https://www.solipsys.co.uk/new/SellYourselfSellYourWork.html... Here's the related HN discussion: https://news.ycombinator.com/item?id=23250289 https://news.ycombinator.com/item?id=23250289 How would that blog post know to pick up that discussion? I think it's potentially a great idea, but I don't see how to use it. You've described that I put in my HN username, and in the example you give I can't see why it's picking up the discussion about netflix. You didn't submit that, and you don't seem to name it anywhere. I don't know what you're actually doing, because what you say doesn't match what I see. Sorry, this might not be clear, but you've got me terribly confused about what it actually does. So let me ask some specific questions: That netflix discussion wasn't submitted by you, and doesn't seem to be related to your HN username. Why is that discussion being loaded in the blog post? If I submit a blog post to HN, what do I put in the blog post to include comments from that specific HN submission? I hope that's clear ... thanks.
- rajasimon 6y agoCurrently hndisq will load the comment posted by you only. When your blog post page loads it will send two things to hndisq. One is the username ( ColinWright ) Another one is href of the current blog page. (https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te10hn https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te1...) So I know your username now and I can get all the submission from HN based on your username. And I will use the href to identify the correct submission. Once it found the submission it will use the submission id to load the comment.
- ColinWright 6y ago> Currently hndisq will load the comment posted by you only. Well that doesn't seem to be the case, because on your blog post it's loading this discussion, including comments by us both. > When your blog post page loads it will send two things to hndisq. OK, so there is more going on than just the given parameters. You never mentioned that. > One is the username (ColinWright) Another one is href of the current blog page. (https ... /BeingSlowToCriticise.html?te1...) OK, so on page X you include the snippet. That snippet includes ones username. But when the snippet executes it sends that username and the referring page. OK. > So I know your username now and I can get all the submission from HN based on your username. Yes. > And I will use the href to identify the correct submission. What if the page has been submitted more than once? > Once it found the submission it will use the submission id to load the comment. Right. So the questions that remain are: * What if the submission has tracking information in the URL, so there isn't an exact match? * What if there's more than one submission?
- rajasimon 6y ago> What if the submission has tracking information in the URL, so there isn't an exact match? The program will look the path and it will not consider the query params for the identification. i.e) https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te10hn https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te1... Here new/BeingSlowToCriticise.html this will never change right. So it uses the path to identifies the submission. > What if there's more than one submission? Isn't that submitting the link more than once against the policy? Right now if that's the case then it will use the old one but I will write the program to take the last submitted one.