How does Disqus store the comments? - data-structures

I am just curious, how does Disqus store the comments. I mean, if I had to build some comment system for blog, I would create a table for comments and one for blog posts. Then I would create a one-to-many relationship between them so that each blog post would have many comments.
This is fine when we have one type of entity to comment on. But if we want to have comments on different types of entities like pages, blog posts, images, videos, and etc, Things get a little bit tricky. I can't think of a clean way to use something like the above solution.
One solution I can think of, is to use the URI of the page as a key to distinguish the comments.
So, what do you think? What do you think about Disqus? Any solutions?
(P.S: If you are going to down vote, please let me know the reason, in a comment).

Related

How to add Article's Custiomer Fields into Joomla4 Template?

Joomla4 is challenging me significantly. With a lack of almost any useful documentation and a day nearly wasted in trying all sorts of things, I am forced to ask:
How to add Article's Custom Fields into Joomla4 Template?
I have used:
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
And I have tried a significant number of tests with various code found splattered across the internet. I have looked this: https://joomla.stackexchange.com/questions/31489/how-to-get-call-joomla-4-custom-fields-into-module
And I have tried so many options, I have lost count of what I have and have not tested.
My only result is that I can list out the fields that are assigned to the article. But I can not, for the life of me, work out how to then get the value of those fields for that article ID.
I have looked at: \components\com_fields\layouts\fields\render.php
But I can't work out where/how/when the variable "$displayData" gets set. Or how to set it.
Thank you in advance.

Where do I find API docs for Angular CDK Collections SelectionModel?

I expected to find something about SelectionModel in the Angular CDK docs, but keep coming up short.
There are many API pages; for example, Angular Components docs for MatTable. Yes, the code for SelectionModel is on GitHub, but I would like to:
read the an overview" like the many such pages on **angular.io* while also
learning from examples like those on angular.io or from third-parties, and
reading the code.
What I seem to be missing is #1, but only for certain classes.
Some other non-component classes are documented at angular.io. MatTableDataSource can be found in right-hand column of the MatTable API documentation. Okay, that's not exactly obvious, but it is a useful location. I might have expected to find collections somewhere like CDK Collections page, but alas it is not there.
Is angular.io the official location for such stuff?
Have I missed a way to find API documentation for SelectionModel
class and maybe other classes in cdk\collection or am I really just reporting a website bug?
I THINK that this is another case of Google's lacklustre attitude towards documentation. Time and time again I come across situations where their docs are either incorrect, out-of-date or missing entirely. This is not specific to Angular, but to any of their products.
Yes, to the largest part the Angular docs are fantastic. The Material docs, however, often have holes like this and are inconsistent at times.
I don't think you're missing anything, Paul.
I know this is a year "late". I had the same question now and stumbled upon this unanswered reflection of my frustrations :-)
Here is document page
https://github.com/angular/components/blob/master/src/cdk/collections/collections.md
The collections package provides a set of utilities for managing collections.
SelectionModel
SelectionModel is a utility for powering selection of one or more options from a list. This model is used in components such as the selection list, table selections and chip lists.

Way to number and sort articles in articles plugin in TikiWiki

I'm using articles plugin for joining my articles into one wiki page, but i need a way to number them and sort them. I know, that article plugin have order param, but if you have 100 articles, it's not posible to write their id in good order.
I thing sort is better option. So, there is my question. Can you make addonal parameter for article, that is invisible and you can use it in sort atribute of articles plugin? Or maybe easier way, can you us heading of article for sort atribute of articles plugin?
I am worried, I do not 100% understand your question.
In the articles plugin you can filter the articles by topic, type, category.
Articles are sorted by publishing date - not by iD number.
You can use pagination, tags, search etc. to browse articles.
When you list articles in the admin dialogue, I am sure the list is sortable and aswell sortable by Id number.
Are you asking for another feature (parameter) to optionally sort articles in the wikiplugin by Id? If that is not existing, you might want to hire a coder who get you this for a low fee. You might have a chance to find contactto one of the coders in the developer list of the Tiki community. But I am not sure, it it made even sense to commit this in the upstream.
Sorry for saying this way, but as said, I am not sure, if I understand it right.
Anyway,
best regards,
Torsten

Joomla model associations

I have been working with CakePHP which has model associations such as hasMany, belongsTom etc...
Now I am working with Joomla and need this type of functionality.
All I need is a point the right direction such as a link describing it as I cannot seem to find something about it on Google.
take care,
lee
There' is a world of difference between the two, and goes far beyond a simple answer on SO. The API Docs are quite extensive, and there are many decent examples. Developing a Model-View-Controller (MVC) Component for Joomla!2.5 will likely also give you some good reference. Additionally, with 9000+ open source extensions available, it's usually quite easy to find one that comes close to what you want to do in order to have some sample code to work from.

Are users who include "Captcha: blah blah blah" in site comments devaluing captchas as a whole?

In the blog comments for SO and other blogs, I've noticed a trend in some users posting what the captcha was that they had to solve to get their post accepted.
Are they doing this in order to aid captcha-breaking bots?
If so, is there a way to programmatically (server-side) compare the users' input to the captcha to strip it out of the comment? Is that worth the effort?
It's just a meme.
It won't default the captcha (unless you use a poor one with a very small list of words).
For one, a bot won't be able to get the captcha image that goes with the text.
Definitely not worth trying to strip it out from comments (concentrate on those damn "first post"s!)
No. Captchas are only valid captchas if they can automatically generate new puzzles so posting the answer wouldn't help since the same puzzle won't ever be seen again.
I've always seen that practice (which I abhor, incidentally, because it adds nothing of value to the discussion) as an incidental note of coincidence between the topic of discussion and the CAPTCHA word.
If a captcha is correctly developed, then it should be pseudo-random for every user. So, this wouldn't help anybody, bot or otherwise. If the captcha is unique per blog post, then the users could be posting the captcha to help those users who are blind or have poor vision.
I don't see how it would aid the bots as they'll get a completely different captcha. The only way it would work is if a bot was somehow already attached to the user at the time of the posting, but then again, it would be able to store both the picture and the answer in some database instead of the comment body.

Resources