Thanks for the explanations Yuri, and I am trying to understand it all. Let me summarise my understanding to see if you can elaborate or correct me.
a. Any extension can be made to talk to the database without needing a user so there must be a particular reason for yvComment (btw clever name) to do so as a user.
'to do as a user' is a logical matter. Technically, yvComment doesn't use 'Guest user account'...
Main reason for this is 'logical consistency of architecture'... yvComment should be integral part of Joomla! and not something, 'sitting near'...
b. I am not sure what special types of content are, but it seems the particular objective is to enable comments to be managed like an article.
I would say, 'be as close to articles as you can and you will benefit from everything done for articles' :)
this includes 'Management', Editors, Modules, Content plugins...
'Extending' articles and not duplicating it gives yvComment's user the ability to leverage everything, that is and will be done by the whole Joomla! community and not by yvComment's developer only 8)
c. I am still not sure why you want comments to be dealt with like articles but it seems this is to have corresponding sections and categories, enable editing by (super)admins, and have other features such as the use of some standard modules. But presumably that again could be achieved with a simple database table and without an author-level user. Am I right to think that part of the reason is also that in this way you did not need to make a backend comment editor?
No, there IS backend comment manager (list)/editor. It is in the menu->Components->yvComment->List of Comments (see more details here
). The same list may be created in the frontent as Menu Item.
d. As comments are treated like articles, they are put in sections and categories. As you wrote in the instructions: "To distinguish Comments (of Articles) from Articles themselves (and from other content, e.g. News etc.), you have to create Section and Category (in this Section) specially for comments (later you will select them in yvComment Plugin parameters). These Section and Category shouldn't be used for other content (for Articles) to avoid confusion. Articles (that are commented by yvComment) may belong to ANY section and category, except above mentioned." I am still sipping my morning coffee but it seems to me that by making a separate set of section & category the correspondence is lost with the section and category of the article commented upon.
No, the connection is still there. Look:
- yvComment even has parameter "List of Sections IDs which may, or may not, contain comments. e.g.: 1, 22, 15 (empty - All)" - this parameter hold SectionIDs of commented Articles!
e. To achieve that comments are treated like articles, a comment must be made by a user, and author is the lowest level user that can do so. You said that it is not the visitor but yvComment which acts as the 'Guest' user with Author access level. I take it that this means that therefore there should not be any particular security implication and that the process acting as 'Guest' is completely server side.
Yes, whole logic, that acts like 'Guest user' is completely on the server.
f. However this means that there will be an article item in the articles manager for each comment posted. If so I would have preferred keeping my articles manager for articles and having a separate manager for comments.
Looking into your extensive instructions I see that there is a "Use Content Table" option. Copying from your guide: "By default, yvComment uses the same storage (database table) to store comments, where Articles are stored. Change "Use Content Table" option to "No" (I don't recommend this!), if you want to have your comments in their own database table. Note, that in this case, you will lose some interesting features (read below...)."
If my understanding is correct with this option I could choose whether or not to have comments show up in my article manager.
g. These features as I understand it are the ability to edit comments like articles. That is, doing so in the front end, because when an article is edited in the backend the authorship will change to the user who edited the comment.
Not exactly so. If author is 'Guest user' and some admin edits the comment in Article manager, the authorship remain the same, but "due to the known bug in Joomla! core (see bug No. 8709
and Topic: Extending metadata of Articles (Poor implementation of content metadata saving)
) if you edit existing Comment from the backend using Joomla!'s "Article Manager", some data from the comment (guest's link to his site and email) would be erased. So don't use "Article Manager" in the backend to edit comments, made by guests, in conjunction with this option. We're lucky, that this bug doesn't exist for editing Comment with Joomla!'s Editor from frontend!".
h. So, basically, if I want to use the advantages of comments being dealt with as submitted by an author, I will have to accept that my article manager will be filled up with comments. I can filter the article manager view to see only comments, but there is no way to filter out comments and see only articles unless the only two authors I have are the guest author and one superadmin. If I don't want that, then I should not make use of the "Use Content Table" option.
j. Since there is no point in editing comments from the backend anyway due to the change of user issue, there also does not seem to be any point in having comments show up in the article manager.
So I perhaps should not make use of the "Use Content Table" option, but then I will not have the benefit of other features. I am not sure exactly which features these are, but I take it they include the use of existing modules. Moreover, if I understood your manual right then I will not be able to edit comments which would be a drawback for a comments extension.
As I wrote above: you may
edit/delete comments both from frontend and
backend using yvComment's editor.
k. I must have misunderstood something somewhere, but the bottom line seems to be that either in my articles manager I will have to scout for articles in a possibly list of comments or I wil not be able to edit comments or use other features that make yvComment a fully functional extension.
Of cause, not using content table, you loose some features. And visa versa: using it, you may use extensions, that know nothing about yvComment, but still work with (for) it!
l. If this is so, but I stand to be corrected, I think you should try very hard to convince the core team to enable exclusion filtering in the articles manager because that would solve it, or you could try and offer a patch doing this to allow filtering out comments.
Maybe you right. And I think, that this patch will be VERY simple (one 'Exclude' checkbox and processing it while building SQL query...)
There are many ways that lead to Rome so I am not trying to see if you went about it the right way, but you'll agree that you did something out of the ordinary. Perhaps it is actually a very clever way but I am just trying to see if the way you went about it is right for me. I know some of my questions might be answered if I tried the extension, but really I am just trying to understand the practical and security implications first.
BTW, does your uninstaller remove not only files but also database entries, i.e. a full cleanup?
No, uninstaller doesn't delete data. You have to do it yourself. But this is very easy with Article manager: filer comments, select all, delete...
Could I switch from "Use Content Table" and back?
Yes, anytime. Back and forward. Only take into account, that comments are not deleted, nor moved between the two tables.
Please start using yvComment - many questions will be answered! Good luck!