mbcahyono
(Muhlis Cahyono)
29 أغسطس 2017، 10:35م
1
26 إعجابًا
Mark_Wass
(Mark Wass)
21 فبراير 2023، 5:17ص
2
@mbcahyono
شكرًا لتزويدي بمثال المكون الإضافي الخاص بك. أحاول القيام بشيء مشابه، أحتاج إلى استبدال/تجاوز الملف /app/views/embed/comments.html.erb بالملف الموجود في المكون الإضافي الخاص بي.
هذا هو المستودع الخاص بي:
https://github.com/OptDev/optuma-discourse-custom-embed
لست متأكدًا لماذا لا يعمل هذا، كنت أعتقد أن EmbedController سيكون الفئة الصحيحة للاستخدام ولكن من الواضح أنني مخطئ. هل لديك أي اقتراحات؟
إعجاب واحد (1)
Mark_Wass
(Mark Wass)
21 فبراير 2023، 6:44ص
3
@mbcahyono لقد نجحت أخيرًا، شكرًا لك على مساعدتك.
إعجاب واحد (1)
thoka
(Thomas Kalka)
7 مارس 2023، 4:09م
4
المستودع أعلاه لم يعد متاحًا.
كنت سأكون سعيدًا بالقدرة على التعلم منه.
إعجاب واحد (1)
@thoka كان هذا المستودع الخاص بي، وانتهى به الأمر في مساحتنا الخاصة على GitHub.
لقد كان تغييرًا أساسيًا جدًا ولكن يمكن رؤية جوهره هنا.
@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 إعجابات