Welcome Guest, Not a member yet? Register   Sign In
Would anybody be interested in a comments library?
#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!


Messages In This Thread
Would anybody be interested in a comments library? - by El Forum - 08-22-2012, 01:13 PM
Would anybody be interested in a comments library? - by El Forum - 08-27-2012, 03:37 PM
Would anybody be interested in a comments library? - by El Forum - 08-27-2012, 04:26 PM
Would anybody be interested in a comments library? - by El Forum - 08-28-2012, 12:54 AM
Would anybody be interested in a comments library? - by El Forum - 08-28-2012, 11:44 AM
Would anybody be interested in a comments library? - by El Forum - 08-28-2012, 12:10 PM
Would anybody be interested in a comments library? - by El Forum - 08-28-2012, 12:48 PM
Would anybody be interested in a comments library? - by El Forum - 08-29-2012, 07:31 PM
Would anybody be interested in a comments library? - by El Forum - 09-05-2012, 10:13 PM
Would anybody be interested in a comments library? - by El Forum - 09-05-2012, 10:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB