mbcahyono
(Muhlis Cahyono)
2017 年 8 月 29 日午後 10:35
1
「いいね!」 26
Mark_Wass
(Mark Wass)
2023 年 2 月 21 日午前 5:17
2
@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
Mark_Wass
(Mark Wass)
2023 年 2 月 21 日午前 6:44
3
@mbcahyono I finally got it working thank you for your help.
「いいね!」 1
thoka
(Thomas Kalka)
2023 年 3 月 7 日午後 4:09
4
Above repo is no longer available.
Would have been glad to be able to learn from it.
「いいね!」 1
Mark_Wass
(Mark Wass)
2023 年 3 月 7 日午後 9:14
5
@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.
@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