# 如何在插件商店数据的基础上扩展用户摘要

**URL:** https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856
**Category:** Development
**Created:** [2018年八月3日 16:59 UTC](https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856 "2018-08-03T16:59:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![timmch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timmch/32/109107_2.png) [@timmch](https://meta.discourse.org/u/timmch)
#### Post date: [2018年八月3日 16:59 UTC](https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856/1 "2018-08-03T16:59:16Z")

</div>

Hi, I’m trying to create a plugin that will enable users to endorse each other (writing a brief testimonial for someone else). The results I am going for is pictured below 👇

 ![endorsements](https://global.discourse-cdn.com/meta/original/3X/2/c/2c6fe4cb9a6b2888822cd01b28faacdb9b6570cb.png)

I am thinking to add a section to the user Summary page that houses a user’s endorsements and enables users to create new endorsements.

I am having trouble figuring out how to extend the user summary with Plugin Store data. If I could get the data loaded initially, it seems straightforward enough to use actions in the controller for other CRUD. The challenge right now is getting that data into the view initially. How might I go about this?

I have tried extending the Controller, which seems like the wrong place to be fetching that data.

It seems like extending the user\_summary.rb model is the place to be doing this, but I am confused as to how to get that data from the Plugin Store and serialize it (?) and get it into the view.

Can you help me?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年八月3日 18:37 UTC](https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856/2 "2018-08-03T18:37:04Z")

</div>

> <https://github.com/discourse/discourse-solved/blob/5b81cc92934f6cf4ca4a71fde206bd3e66c39452/plugin.rb#L229-L237>

#plugin:solved extends user\_summary page to display `solved_count` value. Here you can use `PluginStore` data instead of `UserAction`.

Also a similar plugin is already exist in GitHub  
[https://github.com/JafethDC/discourse-user-feedback](https://github.com/JafethDC/discourse-user-feedback)

---

<div class="post-metadata">

### Author: ![timmch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timmch/32/109107_2.png) [@timmch](https://meta.discourse.org/u/timmch)
#### Post date: [2018年八月3日 18:47 UTC](https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856/3 "2018-08-03T18:47:06Z")

</div>

Thanks for the quick reply @vinothkannans. This _#plugin:solved_ example is helpful and wow, I searched for plugins similar and failed to find @jafeth.diazc’s plugin, thanks for pointing that out!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年八月4日 01:45 UTC](https://meta.discourse.org/t/how-do-i-extend-the-user-summary-with-plugin-store-data/93856/4 "2018-08-04T01:45:15Z")

</div>

Wow that one star review is brutal. 🤣
