SparkFun Forums 

Where electronics enthusiasts find answers.

General suggestions or questions about the SparkFun Electronics website
By techtony
#169318
I have been using the SF site for about a month now. One thing that is extremely frustrating is the comment ordering. Not oldest to newest or newest to oldest, it doesnt seem to have an order at all. I see a comment posted 2 years ago, but a reply from 3 years ago, how this is possible I am not sure. Then you have comments from 6 months ago above a 1 year old post, but three posts later you see 1 from 3 days ago.

For the most part the site is awesome, but honestly the comment system is lacking usability. I read about the starred comments getting preference, but web users are not used to a jumbled filter like this, they are used to seeing numbers of thumbs up or down or number of helpful stars, not comments shown out of (or lack of) order.

Maybe a hightlighted comment that has the highest number of star ratings, but still in order, ordered from newest to oldest.
By motopic
#169320
wut?

top line, see "View New Posts"

Your Rant Score: 0/10
By techtony
#169321
I do not see anything in the comment section of the main site that says "View New Posts". Show me a screen shot.

* EDIT * I see you were thinking for some weird reason I was referring to the forums.... I am talking about the site. So your rant about rant rating - 0/10
User avatar
By Ross Robotics
#169325
https://forum.sparkfun.com/viewtopic.php?f=15&t=35854

I have brought up this point before. As far as I can see, nothing has been changed. Just going to have to get used to things being out of order on the site..
User avatar
By languer
#169326
I agree this is super confusing. But I think it is built into the software SFE is using. It does beg the question, what the heck was the person who wrote that section was thinking (or smoking) - maybe too many mushrooms.
By techtony
#169338
I used to build websites for a living. The scripts basically grab the comments out of the database and display them in html. The SQL Query can be modified to sort the results set as they see fit. I am betting the problem lies in priority. What is higher on their list. I understand that they are juggling a lot of projects, but holy cow it is irritating trying to match up responses and figure out who is talking to who.
By Brennen@SparkFun
#169367
It does beg the question, what the heck was the person who wrote that section was thinking (or smoking) - maybe too many mushrooms.
Hi there.

If anyone's looking to discuss whether mushrooms are generally smoked, Erowid is thataway. With that out of the way, comments are ordered first by number of stars, then by date descending. The code looks like this:
Code: Select all
      $filter = [
        "entity_table" => "blog_posts",
        "entity_id" => $this->req()->id,
        "visible" => true
      ];

      $sort = [
        "ratings_count" => -1,
        "ctime"         => -1
      ];

      $comments = $mongo->comments->find($filter)->sort($sort);
The theory is that this will bubble interesting (starred) stuff to the top, followed by the newest posts. Since the system is threaded, it should not usually be too confusing what people are responding to, although cross-thread chatter is to some extent inevitable.

Obviously this is all far from perfect. We have plans to feature or pin high-quality comments, expose sorting options, and add e-mail notification features for individual blog posts / products / tutorials / etc., all of which will hopefully help people make more sense of things. If you have other suggestions, we always appreciate feedback. Most "you guys should do this!" messages don't result directly in a change, but they all help inform our sense of what people are looking for.

Edit: As an addendum, there could of course be outright bugs with comment ordering. If you've got a specific place in mind where the order seems really arbitrary, hit me with a link and I'll investigate.