mbcahyono
(Muhlis Cahyono)
29 Agosto , 2017 22:35
1
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:
The main purpose of this plugin is to show how to override default .erb templates on Discourse.
I hope this helpful for someone.
26 Curtiram
Mark_Wass
(Mark Wass)
21 Fevereiro , 2023 05:17
2
@mbcahyono
Obrigado por fornecer seu plugin de exemplo. Estou tentando fazer algo semelhante, preciso substituir/sobrescrever o arquivo /app/views/embed/comments.html.erb pelo do meu plugin.
Este é o meu repositório:
https://github.com/OptDev/optuma-discourse-custom-embed
Não tenho certeza por que isso não está funcionando, pensei que EmbedController seria a classe correta para usar, mas obviamente estou errado. Você tem alguma sugestão?
1 Curtiu
Mark_Wass
(Mark Wass)
21 Fevereiro , 2023 06:44
3
@mbcahyono Finalmente consegui, obrigado pela sua ajuda.
1 Curtiu
thoka
(Thomas Kalka)
7 Março , 2023 16:09
4
O repositório acima não está mais disponível.
Teria ficado feliz em poder aprender com ele.
1 Curtiu
@thoka Esse era o meu repositório, acabou indo para o nosso espaço privado no GitHub.
Foi uma mudança muito básica, mas a essência dela pode ser vista aqui.
@Canapin Yes! Got it all working. Here is what the plugin.rb ended up looking like. Turned out I just had a path issue where I was putting the custom version of the file.
I ended up putting it in a folder /custom_views/embed/comments.html.erb
# frozen_string_literal: true
# name: optuma_discourse_custom_embed
# about: A simple plugin to used to customise the template in the forum embeds
# version: 1.0.0
# authors: Optuma Pty Ltd
# url: https://github.com/OptDev/optuma-discourse-custom-embed
#…
3 Curtiram