Welcome Guest, Not a member yet? Register   Sign In
Would anybody be interested in a comments library?
#1

[eluser]ZachWills[/eluser]
Hey community! This is my first post in the forums and I wanted to see if anybody would benefit from a comments library. I want to make a library for people to easily add comments to any part (or parts) of their website. Whether you need it for blog post comments, or profile comments, or photos, etc. What do you think?
#2

[eluser]kingnutter[/eluser]
Hi Zach,

Interestingly, I'm looking for something exactly like this right now.

I think what would make it useful to as many members of the community as possible is the flexibility of what you can add the comments to.

For example, I would want users to be able to start a thread to any item in a list (imagine a track listing of a new album, whereby you can comment on any song on the album).

Also, heirarchical threading within a thread (like the comments on Reddit) would be desirable as would providing the ability to hide any (or all) threads on a page.

Anyhow, very keen to hear how you are thinking of moving foward on this and I'll keep an eye on developments.

Feel free to ask me anything else from a user's point of view.

Cheers.
Gary (kingnutter)
#3

[eluser]ZachWills[/eluser]
Thanks for your interest! I will create a GitHub for it as soon as I have enough features to release a v1.0.

As of right now I have the functions made for adding and deleting comments. I also have 2 functions for showing them... one returns an array filled with all the comments for you to loop through and output however you want and one that returns an unordered list that you can just echo out on the page and style with CSS.

I have a good question for you as a user- would you want to be able to specify what is included in the comments? For example, right now when you use the library it creates a database table that holds your comments with the fields name, email, comment, date, etc. This should work for most comments... would you be missing the ability to hold more information for each comments? Or would that make it to complex and turn users of this library off?

Thanks for your interest again! It's nice to know somebody might benefit from this thing.
#4

[eluser]kingnutter[/eluser]
Sounds great.

I can't think of any other field that would be needed in a comments table, other than the "item" to which the comment is associated. Faceboook have a follow / unfollow thread and (as I discovered this morning) this forum notifies when a reply has been made so that might be an option worth considering. This would probably be something the user checkboxes as part of their profile options ("Receive notifications of replies to your comments?") but there would have to be a trigger within the comment system to send it. I wonder how other sites do this?

One feature I have considered is "flag" to highlight inappropriate comments to admin, but perhaps flagging is a separate layer which you add to all user generated content.
#5

[eluser]ZachWills[/eluser]
Yeah, I have the "item" field you're talking about. Without that.. the comments wouldn't work! Tongue

Your idea for the "Follow" is interesting and not one that I though of. I wonder if including that in this library would be making it more than it should be... perhaps I can just include some functions that users of this library can hook into to get email notifications or something.

I think it might get a bit messy... how would I know what specifically they commented on? All I would have access through via the library is the ID... it would be up to the user of the library to specify the other things. I think I will just include the basic "get emails" function and let people do with what they want.

What do you think?
#6

[eluser]kingnutter[/eluser]
You're absolutely right. Keep it simple.

I've looked into Flag / Report Abuse type libraries but can't find one. I'm pretty sure it would be a separate thing though.

Can't wait to see what you do!

Keep running stuff by me as and when you think of it if you like!
#7

[eluser]ZachWills[/eluser]
Perhaps when I am finished with v1 of this library I will create flag/report abuse kind of library Tongue

Right now I am working on threaded comments. I want users to be able to reply to specific comments and see those replies threaded right underneath it. I will keep you posted... so far so good!
#8

[eluser]ZachWills[/eluser]
Quick question about usability Gary,

If you were to use this library, would you want to control what happens when there are no comments? Currently the function will return false.. giving you the control to do whatever you want if there are no comments yet. Is this a good thing, or should I just return a "No comments found" message? I guess it would depend based on each individual's preferences.

For example, right now if you wanted to get comments this is what it looks like:

Code:
//make a variable to hold the comments query
$commentsArray = $this->comments->get($which, "asc");

if ($commentsArray) {
//make a variable to display comments
$data["comments"] = $this->comments->show($commentsArray);
} else {
$data["comments"] = "No comments yet.";
}

Is that too messy? Would you, as a user of this library, not want to have to write if else statements?

If anybody else wants to chime in, feel free!
#9

[eluser]CI-Newb[/eluser]
why not just code a global "no comments found" in a language file, then if the user wanted it's easy to change what it says and will not have to write the else statement keep code clean and organized. How's the progress on this anyways?
#10

[eluser]Vaibhav132[/eluser]
I guess you guys should take a look at this
http://disqus.com/




Theme © iAndrew 2016 - Forum software by © MyBB