Example Plugin: Custom Activity Summary Template

Hey everyone,

I have created an example plugin to override default Activity Summary (digest) template:

https://github.com/muhlisbc/discourse-custom-activity-summary-template

Screenshot:

https://github.com/muhlisbc/discourse-custom-activity-summary-template/raw/master/custom-digest1.jpg

https://github.com/muhlisbc/discourse-custom-activity-summary-template/raw/master/custom-digest2.jpg

The main purpose of this plugin is to show how to override default .erb templates on Discourse.
I hope this helpful for someone.

26 إعجابًا

@mbcahyono

Thanks for supplying your example plugin. I’m trying to do something similar, I need to replace/override the /app/views/embed/comments.html.erb file with the one in my plugin.

This is my repo:

I’m not sure why this is not working, I thought EmbedController would be the correct class to use but I’m obviously wrong. Do you have any suggestions?

إعجاب واحد (1)

@mbcahyono I finally got it working thank you for your help.

إعجاب واحد (1)

Above repo is no longer available.
Would have been glad to be able to learn from it.

إعجاب واحد (1)

@thoka That was my repo, it ended up in our private space on GitHub.

It was a very basic change but the gist of it can be seen here.

3 إعجابات