Open cebe opened 10 years ago
I can handle it. Have a good idea on how comments should be implemented and will need it for my blog.
I'll also need it in one of my projects so who ever comes first ;)
Join your efforts! :) That's another purpose of this repo.
Von meinem iPhone gesendet
Am 26.03.2014 um 14:03 schrieb Carsten Brandt notifications@github.com:
I'll also need it in one of my projects so who ever comes first ;)
— Reply to this email directly or view it on GitHub.
If you'll do it first make sure you're using simple id-parent_id storage. That's more than enough for fast recursive rendering with only a single DB query. Also It will allow using noSQL backends.
will do.
And as an AR behavior it would be awesome ;) https://github.com/phundament/yii2-extension-requests/issues/7
@schmunk42 which part? Traversing?
Yes, roots()
, descendants()
, children()
, ...
I am unsure about this one: https://github.com/creocoder/yii2-nested-set-behavior#getting-the-whole-tree
and insertAfter(), prependTo(), ... if possible, but you'd need an additional rank column.
Well, for comments there's no need for rank column and I'm not sure all these extras are needed as well. It may build upon such behavior but public API should not depend on it.
IMHO The rank column for a comments table would be the create date, it's just about ordering the descendants. This should just be configurable in the behavior. Maybe some methods are not available in certain configs.
We can do this step-by-step.
Von meinem iPhone gesendet
Am 26.03.2014 um 20:29 schrieb Alexander Makarov notifications@github.com:
Well, for comments there's no need for rank column and I'm not sure all these extras are needed as well. It may build upon such behavior but public API should not depend on it.
— Reply to this email directly or view it on GitHub.
In case of comment you can safely order by id
.
pls add anonymous comments if possible...
Wish list:
cebe/yii2-gravatar
signatures in comments? It's not a forum...
@samdark - possibly yes... but its a good option to have for applications where user/community participation is large ... which may lead to a question why not use a forum for that? We then are talking about a totally different (forum) extension for such a small need then...
I think ability to use custom data source/view for comments will cover it (and much more) well.
A widget displaying comments can work with interface such as:
interface CommentInterface
{
public function getId();
public function getParentId();
public function getTimestamp();
public function getUserName();
public function getUserEmail();
public function getUserUrl();
public function getHtml();
public function getSource();
}
It will allow you to implement such an interface for any model.
May port this one if I have time: https://github.com/yiiext/comment-module