يأخذ هذا المكون سمة موضوعًا ما ويطبقه كشريط جانبي لقائمة مواضيع فئة أو وسم معين. هذه الأشرطة الجانبية مرئية فقط عندما يكون عرض المتصفح 767 بكسل أو أكثر (معظم الأجهزة اللوحية والشاشات).
اختر موضوعًا وعرض محتواه كشريط جانبي لفئة أو وسم معين.
تعيين شريط جانبي للعرض على صفحات /latest، و/new، و/unread، و/top باستخدام all كاسم للفئة في إعداداتك.
اختر ظهور الأشرطة الجانبية على يسار أو يمين قائمة المواضيع.
بشكل افتراضي، سيظهر شريط جانبي لفئة ما أيضًا لجميع فئاتها الفرعية ما لم يكن لدى الفئة الفرعية شريط جانبي خاص بها محدد (يمكنك تعطيل ذلك بإلغاء تحديد إعداد inherit parent sidebar).
كيف أقوم بإعداده؟
اختر فئاتك ووسومك، وأضف معرف الموضوع (مثل example.com/t/example-topic/57) الذي ترغب في استخدامه لتعبئة محتوى الشريط الجانبي.
أنصح بإنشاء مواضيع الأشرطة الجانبية في فئاتها/وسومها المقابلة، وإغلاق الموضوع بحيث لا توجد ردود، وإخفاؤه من القائمة (حتى لا يظهر في قائمة المواضيع).
لاحظ أنه لا يمكنك استخدام موضوع في فئة خاصة كشريط جانبي في فئة عامة (يمكنك تقنيًا ذلك، لكن المستخدمين الذين لا يملكون صلاحية الوصول إلى ذلك الموضوع الخاص سيشاهدون شريطًا جانبيًا فارغًا!).
الإعدادات
الاسم
الوصف
sidebars
إضافة وإزالة الأشرطة الجانبية
sidebar side
اختر بين اليسار أو اليمين
inherit parent sidebar
إذا تم تحديده، فإن الفئات الفرعية ترث الشريط الجانبي لفئتها الأصلية (ما لم يكن للفئة الفرعية شريط جانبي خاص بها محدد).
عند إلغاء التحديد، ستعرض الفئات الفرعية شريطًا جانبيًا فقط إذا تم تحديده.
stick on scroll
عند التحديد، يكون للشريط الجانبي موقع ثابت أثناء التمرير
ملاحظات للمطورين
يُحاط كل شريط جانبي لفئة بفئة تحتوي على اسم الفئة (slug)، لذا بالنسبة لفئة الموظفين سيكون ذلك .category-sidebar-staff. يمكنك استخدام هذه الفئات لتنسيق الأشرطة الجانبية الفردية.
يحتوي وسم body في الصفحات التي تحتوي على أشرطة جانبية أيضًا على فئة مضافة حتى تتمكن من استخدام body.custom-sidebar لتطبيق أنماط على جميع الصفحات التي تحتوي على شريط جانبي.
شكرًا وتقديرًا
شكرًا خاصًا لـ @xrav3nz لوضع الأسس التي جعلت هذا المكون ممكنًا!
مُستضاف بواسطةنا؟ تتوفر مكونات السمة للاستخدام في خططنا Standard وBusiness وEnterprise.
Since I am using the header submenu plugin, A part of the text is covered by my header bar. It would be great if it was possible to add extra margin/offset or whatever it’s called for the case when additional elements before the header are covering the sidebar’s content.
Also: is there any way to keep the category drop down menu above the sticky sidebar’s content? that would make it easy for users to jump between categories quickly.
altogether I think the category sidebar is a great plugin and has huge potential to add useful information to the forum structure!
I have a few questions/suggestions that I hope you can help with…
1 - Is it possible to make this so that when a user browses the forum, going from page to page the sidebar always checks for the latest version of the post that it contains? At the moment I think the content of the sidebar only updates on a page refresh? Unfortunately content that rarely changes begins to appear stale to users (particularly active users) and so I’d like to update the topic associated with the sidebar frequently if I can. (Similarly, if the ID of the topic in the options for that page is changed, it would pick it up on the next page-view). I’m quite happy for the additional load per page/view but if you’re worried others may not be perhaps you could add a “cache post contents” option which would make it work like it does now.
2 - Is it possible to associate/pick up content from more than one topic per sidebar please? So for example on the Latests page you might want the content from topics 33,55 (and in that order). This would be great to allow different content per page while also include common info/links that you might want to appear at the bottom of every sidebar.
3 - Is it possible to expand the plugin so it can be used site-wide please? At the moment I think it can only be used on certain pages? Ideally I’d like to use this across the whole forum on all main sections/pages. (Perhaps your tags sidebar plugin could be used in conjunction with this for finer control - eg for individual tags and/or Topics - I think both combined could become a very power sidebar package!!)
4 - Is it possible to add a sidebar width option as well as a configurable cut-off/display-none point please? This isn’t a biggie as it can be done via css changes but think it would be nice to have in the options.
5 - Last but not least… could you get polls to work please? I think allowing users to vote in polls right out of the sidebar would be awesome!!! I find dynamic content like this in sidebars can make them interesting to users, and so less likely that they’ll automatically ignore them.
I think with all the above this plugin would make a very good candidate to be included in core or an official DC plugin - imo it could help people put an individual stamp on their forums and I’m sure people would use them in fun and interesting ways!
قد يكون من الجريء بعض الشيء أن نطلب ذلك، نظرًا لأنه يسمى _ الشريط الجانبي _، ولكن: هل سيكون من الممكن إضافة خيار لوضع المحتوى ليس بجانب قائمة الموضوعات، ولكن دائمًا _ فوقها _؟
نحن نستخدم Discourse كشبكة إنترانت اجتماعية، وبالنسبة لبعض الفئات، نحتاج إلى منطقة يمكن صيانتها جيدًا للروابط وقوائم الأشخاص وما إلى ذلك - ستكون هذه الآلية رائعة لذلك، ولكن هناك مساحة قليلة جدًا في الشريط الجانبي.
تعد حيل CSS موضع ترحيب أيضًا.
لقد جربت بالفعل لافتات الفئات، لكنها تقتصر على الفقرة الأولى، لذا فهذا ليس خيارًا.
كنت أتساءل عما إذا كان يمكن تعديل هذا أو إضافة خيار لنقله من الشريط الجانبي إلى الشريط العلوي أسفل رأس الموقع أو ربما أسفل شعار الفئة مباشرة؟
أو إذا كان بإمكاني الحصول على إرشادات حول إضافة CSS مخصص لنقله، وأيضًا جعله يظهر للجوال كشريط علوي، هل هو شريط لاصق؟ مثبت أسفل الشريط الرئيسي للموقع مباشرة؟
قد أكون أسأت فهم كيفية عمل مكون السمة هذا، ولكن هل يمكن استخدامه لعرض قائمة المواضيع على اليسار، والنقر على موضوع في القائمة، وعرض المشاركات على اليمين (والاحتفاظ بقائمة المواضيع مثبتة على اليسار)؟ لا أحتاج إلى رؤية الفئات. سيبدو الأمر مثل Flarum.
يجب أن تنتقل الإعدادات الحالية تلقائيًا عند التحديث… ما لم يكن الاسم المختصر الخاص بك مختلفًا عن اسم الفئة، فستحتاج إلى تحديث الإعدادات يدويًا.
على سبيل المثال، سيتم ترحيل site-feedback بشكل صحيح إلى Site Feedback ولكن لا توجد طريقة لترحيل الأسماء المختصرة التي لا تتوافق مع الأسماء (على سبيل المثال، الاسم المختصر الخاص بك لـ Site Feedback هو hamburgers بدلاً من site-feedback).
من المحتمل أن أغير اسم مكون السمة هذا وألغي دعم أشرطة التمرير الخاصة بالعلامات لتعكس الوضع الجديد.