DiscPage: إضافة لإنشاء صفحات ثابتة وإدراج فقاعات نقاش في النص

:warning: تم إيقاف الدعم

لم يعد هذا الإضافة مُدعَمًا، ولا يعمل مع الإصدارات الحالية من Discourse.
نوصي بإزالته من المواقع الإنتاجية لتجنب مشاكل التحديث.
شكرًا لجميع من استخدموا وساهموا في هذا الإضافة على مر السنين. :folded_hands:

مع DiscPage، يمكنك إنشاء صفحات ثابتة عن طريق إضافة تصنيف “Page” إلى أي موضوع.

ثم يمكنك إدراج أيقونات بالونات للسماح للمستخدمين بمناقشة الأقسام الفرعية للصفحة.

اطّلع على النسخة التجريبية القديمة النسخة التجريبية الجديدة و المستودع.

41 إعجابًا

The discussion topics show up oddly in /latest - perhaps they should go in their own category, “Page Comments” or similar?

The use of structured tags is pretty neat :slight_smile:

5 إعجابات

Sure, you can use the discpage balloon category setting to set a category for the “balloon” discussions.

6 إعجابات

Amazing!!! My NGO will definitely have use for it!

6 إعجابات

Is there a way to show the categories/subcategories on the left?

Is there a way to show the categories/subcategories on the left?

There’s no automatic way to show categories on DiscPage static pages. However, you can add category links manually. You can then style those links to put them in a sidebar on the left (using a theme component).

P.S.: you probably know that, but remember you can access categories from the hamburger menu.

إعجابَين (2)

Thanks @syl for the great plugin :slight_smile:

Can you please also explain how is this plugin different from the following plugin?

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

The plugin you mention looks great. I haven’t tried it, but I’d say the differences are:

  • Page authoring is different: ProCourse provides a feature-rich backend, DiscPage only transforms a topic (so you’re limited by the usual markdown editing).
  • ProCourse doesn’t support discussion balloons within pages.
4 إعجابات

I have just discovered this plugin today and I am impressed! Thank you very much for your work @syl.

Just confirm, this functionality can be “contained” in a category, it doesn’t take over the entire forum, right? The (potential) idea we have in mind in our project is to write a collaborative guide using one category while retaining the rest of the forum (a plain Discourse) as is.

Yes, you are right.

Yes, it sounds like something DiscPage can do.

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

Thank you @syl!

Last question (for now): :slight_smile: How does the plugin define permissions? Who can create / modify / delete these static pages?

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

A DiscPage static page is nothing more than a topic with a specific predefined category. Let’s call it “Page”. Consequently:

  • Static pages can be created by whoever can create topics in the Page category. You need to set the Page category permissions according to your needs. The usual case is to restrict the “Create” permission to admins, as explained here, so that only admins can create static pages.

  • Static pages can be modified/deleted by the topic author and by staff users (like any normal topic).

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

Why does your plugin modify the hamburger icon? It turned it red and now I have to figure out how to overwrite the CSS back to normal. I like your plugin, but please fix this?

Hi @Erik_Manger, your issue is described here:

My hamburger menu has turned red, what should I do?

Hamburger Menu
A red hamburger menu means that DiscPage is off . This occurs:

  1. when an error has prevented DiscPage from starting (in that case, check the debug console for a DiscPage-related error), and
  2. when you manually turn DiscPage off (see below).

@syl، أواجه صعوبة كبيرة مع هذه الخطوات. آسف، أعلم أن هذه مشكلة مبتدئة جداً. لكن هل يمكنك توفير قالب جاهز للنسخ واللصق؟ أو فيديو توضيحي قصير؟ أو إذا قمت بإرشادي شخصياً، فسأقوم بإنشاء فيديو لـ YouTube لمساعدة الآخرين المبتدئين جداً.

  • لتحرير صفحة ثابتة، انقر على زر “القلم” في الزاوية العلوية اليمنى من الصفحة (يمكنك أيضاً إيقاف تشغيل DiscPage من قائمة الهامبرغر، ثم تحرير الموضوع بالطريقة المعتادة).
  • لتنسيق الصفحات الثابتة، استخدم الكلاس .dpg-page-content. لتنسيق صفحة فردية، استخدم سمة البيانات html[data-dpg-page-id]. على سبيل المثال، انتقل إلى الإعدادات > تخصيص > السمة الفاتحة > تحرير CSS/HTML وأدخل ما يلي في قسم عام > CSS:
إعجاب واحد (1)

هل يمكن للصفحة الثابتة استيراد ملف JavaScript أو الارتباط به؟

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

تُعرض الصفحة الثابتة مثل موضوع عادي في Discourse، لذا تنطبق قواعد سكريبتات JavaScript في المواضيع. أعتقد أن هناك عدة مناقشات حول هذا الأمر هنا في meta: وهذا يتطلب إنشاء مكون سمة وتخصيصه (هناك أيضًا إعداد في Discourse للسماح بالارتباط بسكريبتات خارجية).

قد ترغب أيضًا في الاطلاع على قسم “لتخصيص صفحة ثابتة” في هذه الصفحة ومشاهدة هذا المثال على JavaScript في صفحة ثابتة (قوائم منسدلة في الأعلى).

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

هل قمت بإنشاء صفحة ثابتة بالفعل؟ هل يمكنك رؤية زر القلم الرصاص؟

تنسيق صفحة ثابتة يشبه تنسيق صفحة موضوع قياسية في ديسكورس: تقوم بإنشاء مكون سمة (Theme Component) وتخصيصه. يوجد مثال هنا. يمكنك أيضًا البحث عن “مكونات السمات” هنا في ميتا. تسمح فئة .dpg-page-content بإنشاء قواعد CSS تطبق على الصفحات الثابتة فقط بدلاً من جميع صفحات المواضيع.

فيما يتعلق بهذا الموضوع، لنفترض أن لدي واجهة برمجة تطبيقات (API) تسترجع صورة بناءً على مدخلات المستخدم. في الرابط الذي أرسلته، توجد بعض القوائم المنسدلة في الأعلى. إذا اختار المستخدم شيئًا من القائمة المنسدلة، فستعرض الجافا سكريبت (JS) شيئًا بناءً على مدخلات المستخدم. هل هذا ممكن داخل صفحة ثابتة؟

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

أعتقد أن أداتك تعمل بشكل صحيح 100%. المشكلة تكمن في نقص معرفتي بكيفية استخدامها :frowning: سألقي نظرة على الرابط الذي زودتني به الخاص بـ .dpg-page-content

الصفحة: https://community.tigergraph.com/t/this-is-a-test-page/606

انقر على زر «تحرير». أدخل «كتلة من الكود». انقر على «الإعدادات». انتقل إلى «تخصيص». أدخل «كتلة من الكود» وستظهر لك صفحة ويب HTML أساسية. سيساعد ذلك شخصًا مبتدئًا جدًا مثلي هاها!

أقدر وقتك في الرد على سؤالي :slight_smile:

سأبقيك على اطلاع بتقدمي. آمل أن أستطيع جعل صفحتي تبدو مشابهة لصفحتك!

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