1. Приветствуем Вас на неофициальном форуме технической поддержки XenForo на русском языке. XenForo - новый и перспективный форумный движок от бывших создателей vBulletin.

Jaxel's Sub Forum Grid Listings...

Тема в разделе "Запросы на плагины и стили с оф. форума", создана пользователем becdelbnik, 8 окт 2013.

Загрузка
  1. becdelbnik

    becdelbnik Местный

    Регистрация:
    21.07.12
    Сообщения:
    133
    Симпатии:
    19
    Версия XF:
    1.3.0
    Jaxel's Sub Forum Grid Listings...


    Тема на оф. сайте:
    HTML:
    http://xenforo.com/community/threads/jaxels-sub-forum-grid-listings.56599/
    Автор:Jaxel
    Версия плагина:Aug 4, 2013
    Описание:
    Almost 2 years ago, I wrote a guide on how to add sub forum grids to your forum listings. The template modification has been insanely popular on XF forums in that other people have made their own addons based on it... (some of them for $$, which pisses me off since I made this available for free). Now in XF1.2, Kier has recently put his own...

    Установка:
    1. Залить файлы.
    2. Импортировать XML-файл плагина.
    3. Настроить права группам пользователей.
    --- добавлено : Oct 8, 2013 5:41 AM ---
    ------------------------------------------------------
    Скачайте и выложите плиз....
     
    Последнее редактирование модератором: 16 окт 2013
  2. Lex

    Lex Dura Lex

    Регистрация:
    27.11.10
    Сообщения:
    802
    Симпатии:
    152
    Версия XF:
    1.5.1
    А что за плагин такой?
     
  3. becdelbnik

    becdelbnik Местный

    Регистрация:
    21.07.12
    Сообщения:
    133
    Симпатии:
    19
    Версия XF:
    1.3.0
    как я понял не только из названия, но из миниатюры в той теме, он для настройки под форумов.
     
    Lezgin нравится это.
  4. infis

    infis Местный Команда форума

    Регистрация:
    27.06.11
    Сообщения:
    5.448
    Симпатии:
    3.271
    Версия XF:
    1.5.9
    Издеваетесь?
    Там даже картинок нет, чтобы скачивать.

    Я, конечно, понимаю, что у Вас, наверное, нет доступа к скачиванию на офе, но придумывать шаги установки там, где их просто нет - это уже слишком.

    Almost 2 years ago, I wrote a guide on how to add sub forum grids to your forum listings. The template modification has been insanely popular on XF forums in that other people have made their own addons based on it... (some of them for $$, which pisses me off since I made this available for free). Now in XF1.2, Kier has recently put his own implementation into the stock.

    Unfortunately, I don't like Kier's version. I prefer my version, and I imagine many forum admins feel the same since my version shows nested sub forums as well. However, my version has up until now did not follow responsive design. So this new guide is for how to make a responsive sub forum grid.

    An example of my grid listing can be found here: http://8wayrun.com/forums/


    CSS
    -----

    The first step, is to create the css template for your grid... I called mine EWRcustom_forum_list.css
    Code:
    Код:
    .subForumsContainer { padding: 5px; }
    
    .subForumsGrid .blockLinksGrid { width: 100%; display: inline-block; padding: 0px; margin: 0px; }
    .subForumsGrid .fullWidth { width: 100% !important; padding-bottom: 4px; }
    
    .subForumsGrid .node { width: 200px; float: left; }
    .subForumsGrid .node ol { padding-left: 15px; }
    .subForumsGrid .node  a { padding: 5px 10px 5px 18px; }
    .subForumsGrid .node .node a { padding: 0px 10px 1px 18px; }
    .subForumsGrid .node .nodeTitle { font-size: 11px; white-space: nowrap; overflow: hidden; }
    .subForumsGrid .node div.unread,
    .subForumsGrid .node div.unread a:hover
    {
        background-image: url('@imagePath/xenforo/widgets/unread.png');
        background-repeat: no-repeat;
        background-position: 0px 50%;
    }
    There are options here, but generally you don't have to change much. The most people may want to change is the first line and the padding for .subForumsContainer. Change this to how you wish to style your forum; on my forum, I gave it a padding-left of 50px.

    You'll notice that subforum entries have a fixed width of 200px. This really determines how many entries you are going to get per row and you can change this as you see fit. You can also customize this on a per forum basis. For instance, if you want to change the fixed width for subforums under forum #4, you could do this:
    Код:
    .node4 .subForumsGrid .node, .grid_4 .subForumsGrid .node { width: 115px; }
    HTML
    -----

    Next, you simply need to add the HTML template... I called mine EWRcustom_node_level_2
    Код:
    <xen:require css="EWRcustom_forum_list.css" />
    
    <xen:if is="{$level} == 2 AND {$renderedChildren}">
    <li class="subForumsContainer secondaryContent {xen:if '{$category.node_id}', 'grid_{$category.node_id}'} {xen:if '{$forum.node_id}', 'grid_{$forum.node_id}'}">
        <div class="subForumsGrid">
            <ol class="blockLinksList blockLinksGrid">
            <xen:foreach loop="$renderedChildren" value="$child">
                {xen:raw $child}
            </xen:foreach>
            </ol>
        </div>
    </li>
    </xen:if>

    Not much to change, just leave it as it is; except for fixing the link tot he name of your css template.


    Template Modifications
    -----

    Now thankfully, because of the new Template Modification system in XF1.2, the rest of this is easy and you don't have to manually edit templates for each one of your skins!

    First, create a new template modification on node_forum_level_2
    I gave mine the modification key of EWRcustom_node_forum_level_2

    Search Type:
    Regular expression

    Find:
    Код:
    #$#
    Replace:
    Код:
    <xen:include template="EWRcustom_node_level_2" />
    Now, we create a second template modification on node_forum_level_n
    I gave mine the modification key of EWRcustom_node_forum_level_n

    Search Type:
    Simple Replacement

    Find:
    Код:
    <li class="node forum level-n node_{$forum.node_id}">
    Replace:
    Код:
    <li class="node forum level-n node_{$forum.node_id} {xen:if $renderedChildren, 'fullWidth'}">
    Optional Template Modifications
    -----

    The template modifications we made above give sub forum grid listings to forum nodes. However, there are also category nodes, page nodes and link nodes. If you use any of those types of nodes, just repeat the modifications process for those other templates, making sure to replace the word "forum" with the appropriate node type.

    P.S. Как я понял, этим он добивается такого отображения подфорумов:
    Screen Capture #032.png
     
    becdelbnik нравится это.
  5. becdelbnik

    becdelbnik Местный

    Регистрация:
    21.07.12
    Сообщения:
    133
    Симпатии:
    19
    Версия XF:
    1.3.0
    тема закрыта
     

Поделиться этой страницей