فرض الصفحة الرئيسية للجوال

Currently the default homepage settings found in the admin panel and user preferences apply to both desktop and mobile. This is a very simple theme component that will allow you to specify a different default homepage for the mobile view of your Discourse forum.

It is important to note that this will force mobile to navigate to the homepage you choose in this theme component. Your users will not be able to override the default homepage for mobile via their user preferences at this point.

Repository Link
https://github.com/tshenry/discourse-force-mobile-homepage

I don’t know if there’s anything to gain by including screenshots or putting a demo on theme-creator, but if anyone thinks otherwise, please speak up!

Theme Settings

There is one setting that allows you to set the mobile homepage as:

  • latest (default)
  • categories
  • new
  • unread
  • top

Installation

If you are new to installing theme components, check out @Johani’s excellent guide on theme components, particularly how to import a theme component and how to add the theme component to your main theme.

Future

  • Allow users to override the default we set in this component.

That’s it! Questions, comments, and suggestions are always welcome :slight_smile:

56 إعجابًا

Works like a charm. This is great mate!

4 إعجابات

Great little component, just what I needed for my community!

Many thanks.

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

Can you please integrate this into core settings.

Sitewide default in settings for mobile and desktop.

And user setting in user profile settings for mobile and desktop.

:wink:

9 إعجابات

+1 for having different home page capabilities for mobile and desktop in core.

10 إعجابات

Thank you for this useful component.
Could you please help? While showing “Latest” by default on mobile, there is no option to choose “Categories” in top drop-down menu above topic list.

Exactly what I was after - thank you for this little component!

3 إعجابات

ممتاز، شكراً لك :folded_hands::folded_hands::folded_hands::folded_hands:

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

شكرًا لإنشائك هذا! :handshake: ماذا عن التوافق المستقبلي مع استمرار تطور تطبيق Discourse الرئيسي وتحديثه؟ أم أن مكون السمة ودود للمستقبل إلى حد كبير في هذا الصدد؟

إعجابَين (2)

أعتقد أن مكون السمة هذا بسيط للغاية ومقاوم للانفجار! مجرد سطرين من CSS و HTML بدون إعدادات أو أي شيء فاخر.

3 إعجابات

ما زلت أشعر أنه يجب دمج هذا في النواة كإعداد إضافي، فهو مفيد للغاية!

10 إعجابات

مكون رائع وبسيط وصغير.

بالطبع، بدأت الطلبات فورًا من مستخدمينا المتقدمين بالسماح لهم بتعيين تفضيلاتهم الخاصة للتجاوز.

هذا يخدم الغالبية العظمى من المستخدمين العاديين، ولكن لا يزال هناك طلب من أفضل 1% من المستخدمين المتقدمين للقدرة على التجاوز شخصيًا.

أتفق. لم يتم تحديثه منذ 7 سنوات ولكنه لا يزال قيد الاستخدام من قبل مالكي Discourse.

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

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

أمل في تحديث

هذه واحدة من الإضافات التي يجب الحصول عليها والتي تحتاج إلى تحديث!:folded_hands:

لقد قمت بتحديثه في طلب سحب هنا: DEV: update to initializer by awesomerobot · Pull Request #3 · tshenry/discourse-force-mobile-homepage · GitHub

@tshenry هل يمكنك إلقاء نظرة ودمجه عندما تتاح لك الفرصة؟

6 إعجابات

تم الدمج! شكراً على طلب السحب!

7 إعجابات

لقد تلقيت إشعارًا بإيقاف الاستخدام لمكون السمة الرائع هذا في وحدة تحكم المطور للمتصفح:

[THEME 50 ‘Force Mobile Homepage’] إشعار بإيقاف الاستخدام: الوصول إلى site.mobileView أو site.desktopView أثناء تهيئة الموقع يمكن أن يؤدي إلى أخطاء وعدم اتساق عند تغيير حجم نافذة المتصفح. يرجى نقل هذه الفحوصات إلى مكون أو محول أو رد اتصال API ينفذ أثناء عرض الصفحة. [تم إيقافه منذ Discourse 3.5.0.beta9-dev] [معرف الإيقاف: discourse.static-viewport-initialization] [معلومات: Designing for Different Devices (Viewport Size, Touch/Hover, etc.)]

إعجابَين (2)

نعم نفس الشيء، أحد إشعارات الاستهلاك الوحيدة المتبقية بالنسبة لي…

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