• هاست سان
  • با خرید اشتراک ویژه شما میتوانید جدیدترین آپدیت افزونه ها و قالب های زیبا و پرکاربرد زنفورو را دریافت کنید!

    هر ماه یک کد تخفیف 60 درصدی محصولات فروشگاه به کاربران منتخب بخش ویژه اهدا می‌شود

Items This Page

افزونه 2 Items This Page 1.1.0

دسترسی دریافت را ندارید
Items This Page
نمای کلی منبع
اضافه کردن متغیر $ xf.itemsThisPage برای تعداد پست ها / موارد رسانه ای/ منابع/و غیره در یک صفحه
King توسط King Stable
1.1.0 نسخه
0 دریافت‌ها
267 بازدیدها
— رتبه‌بندی
اولین انتشار
آخرین بروزرسانی
سازگاری
توسط نویسنده مشخص نشده است
توسعه‌دهنده
King
King
تاریخ عضویت: ارسالی‌ها: 1,528 واکنش‌ها: 1,809
پشتیبانی از نسخه های
  1. 2.1
  2. 2.2
نیاز به ویرایش مجوزهای گروه‌های کاربری
  1. نیست
Adds a new template variable $xf.itemsThisPage containing how many posts/media items/resources/etc. are shown on a page.

This is useful in templates if you want to adjust the display of some element based on how many posts or threads or media items there are displayed.

For example, you might want to hide an element from the sidebar on short threads (or on the last page of a thread where only one or two posts are shown), to prevent the sidebar from being much longer than the content.

Usage example:

The following code might be used in a sidebar ad placement to hide the advert on short thread pages.
HTML:
    <xf:if is="in_array($xf.reply.template, [
                'thread_view',
                'thread_view_type_article',
                'thread_view_type_poll',
                'thread_view_type_question',
                'thread_view_type_suggestion'
               ]) && $xf.itemsThisPage <= 1">
        <!-- show nothing -->
    <xf:else />
        <!-- show the item -->
    </xf:if>
An even easier way

If we combine this addon with the Template Parent addon, which gives us a shorthand way of referencing all of the various thread and forum types in template names using a new $xf.reply.templateParent template variable - we can simplify the above example even further:
HTML:
    <xf:if is="$xf.reply.templateParent == 'thread_view' && $xf.itemsThisPage <= 1">
        <!-- show nothing -->
    <xf:else />
        <!-- show the item -->
    </xf:if>
نویسنده
King
دریافت‌ها
0
بازدیدها
267
اولین انتشار
آخرین بروزرسانی

رتبه‌بندی‌ها

0.00 ستاره 0 رتبه‌بندی

فایل‌های بیشتری از King

فایل‌های مشابه

AndyB Profile page lite XFFA.IR Bot
حذف نوار پیمایش صفحه پروفایل و بلوک محتوا
دریافت‌ها
0
به‌روزرسانی شده
AndyB Remove page action buttons King
حذف دکمه های New Post و Post thread را در صفحات مختلف.
دریافت‌ها
0
به‌روزرسانی شده
SN Image Rating - Star Rating for Images in the Forum + Gallery Page King
امتیازدهی ستاره‌ای برای تصاویر در انجمن و صفحه گالری.
دریافت‌ها
0
به‌روزرسانی شده
Staff display (Automatic staff page) XF Father
دریافت‌ها
0
به‌روزرسانی شده
[cXF] Status update on What's new page King
دریافت‌ها
1
به‌روزرسانی شده
[OzzModz] Move Pagenav To Top Of Page In Q&A And Suggestion Forums King
منتقل کردن ناوبری صفحه به بالای صفحه در تالارهای پرسش و پاسخ و پیشنهادات.
دریافت‌ها
1
به‌روزرسانی شده
عقب
بالا