mbcahyono
(Muhlis Cahyono)
29 Agosto 2017, 10:35pm
1
26 Mi Piace
Mark_Wass
(Mark Wass)
21 Febbraio 2023, 5:17am
2
@mbcahyono
Grazie per aver fornito il tuo plugin di esempio. Sto cercando di fare qualcosa di simile, ho bisogno di sostituire/sovrascrivere il file /app/views/embed/comments.html.erb con quello del mio plugin.
Questo è il mio repository:
https://github.com/OptDev/optuma-discourse-custom-embed
Non sono sicuro del perché questo non funzioni, pensavo che EmbedController fosse la classe corretta da usare ma ovviamente mi sbaglio. Hai qualche suggerimento?
1 Mi Piace
Mark_Wass
(Mark Wass)
21 Febbraio 2023, 6:44am
3
@mbcahyono Finalmente ci sono riuscito, grazie per il tuo aiuto.
1 Mi Piace
thoka
(Thomas Kalka)
7 Marzo 2023, 4:09pm
4
Il repository sopra non è più disponibile.
Sarei stato felice di poter imparare da esso.
1 Mi Piace
@thoka Era il mio repository, è finito nel nostro spazio privato su GitHub.
È stata una modifica molto basilare ma il succo può essere visto qui.
@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 Mi Piace