The best way to create aggregated metadata for a Topic based on its messages?

(Angel Raul Molina Muñoz) #1

I have an idea to my community and for a plugin but I’m starting as “discourse plugin developer” and there are too many things to learn yet.

I hope you can help me to see the best way to address my idea. Here we go:

Let’s say we have a Topic called “Review about the new Ford Fusion 2017”, with a normal text and some “fixed” metadata with a rating like:

  • Price: 6/10
  • Engine: 9/10
  • Confort: 8/10
  • CO2: 5/10

Then, the community can Reply the Topic with the same approach: normal text with its comments and fill the same metadata:

  • Price: 2/10
  • Engine: 4/10
  • Confort: 6/10
  • CO2: 6/10

At the end, I want to display at the top of the topic the average.

I hope I explained well, if not I can do a mockup with the feature that I want to create.

Any ideas?

Thank you!

(Rafael dos Santos Silva) #2

This is exactly the Ratings Plugin but with 4 ratings instead of one.

Use it as a base and extend from there.

(Angel Raul Molina Muñoz) #3

You are right! I’ll try with the plugin, but, the part of calculate and print the average at the top of the Topic?

Thank you so much!