Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Replies 101
  • Просмотров 32,9k
  • Created
  • Последний ответ

Лучшие авторы в теме

Most Popular Posts

  • В общем так:  1. добавить (source/../Category.php) параметр в функцию, должно быть так: public function getLastCommentTime( \IPS\Member $member = NULL ) 2. В заголовке класса добавить посл

  • @avangcom а я что? я ничего. 

  • Что сразу Desti?? Редактировать файл sources/Category/Category.php Добавить      use \IPS\Node\Statistics; после строки (15)       use \IPS\Node\Colorize;  

Posted Images

Ты любишь брата😉

После создания учебника при входе в тот же раздел учебника возникает ошибка, проверьте, потому что более новая версия недоступна.

Error :

Template tutorials/front/browse/rows is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
 

please Send Fix error

template code :

 

{{$rowIds = array();}}
{{foreach $articles as $row}}
    {{$idField = $row::$databaseColumnId;}}
    {{$rowIds[] = $row->$idField;}}
{{endforeach}}
{{$iposted = ( method_exists( $table, 'container' ) AND $table->container() !== NULL ) ? $table->container()->contentPostedIn( null, $rowIds ) : array();}}
{{if \count( $articles )}}
    {{$rowCount=0;}}
    {{foreach $articles as $row}}
        {{if $rowCount == 1 AND $advertisement = \IPS\core\Advertisement::loadByLocation( 'ad_tutorial_listing' )}}
            <li class="ipsDataItem">
                {$advertisement|raw}
            </li>
        {{endif}}
        {{$rowCount++;}}
            <li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}' itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
                {{if member.member_id}}
                    <div class='ipsDataItem_icon ipsPos_top'>
                        {{if $row->unread()}}
                            {{if \in_array( $row->$idField, $iposted )}}
                                <a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
                                    <span class='ipsItemStatus'><i class="fa fa-star"></i></span>
                                </a>
                            {{else}}
                                <a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
                                    <span class='ipsItemStatus'><i class="fa fa-circle"></i></span>
                                </a>
                            {{endif}}
                        {{else}}
                            {{if \in_array( $row->$idField, $iposted )}}
                                <span class='ipsItemStatus ipsItemStatus_read ipsItemStatus_posted'><i class="fa fa-star"></i></span>
                            {{else}}
                                &nbsp;
                            {{endif}}
                        {{endif}}
                    </div>
                {{endif}}
                <div class='ipsDataItem_main'>
                    <h4 class='ipsDataItem_title ipsContained_container'>
                        {{if $row->mapped('locked')}}
                            <span><span class="ipsBadge ipsBadge_small ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="locked"}'><i class='fa fa-lock'></i></span></span>
                        {{endif}}
                        {{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
                            {{if $row->hidden() === -1}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
                            {{elseif $row->hidden() === 1}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
                            {{endif}}                            
                            {{if $row->mapped('pinned')}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
                            {{endif}}
                            {{if $row->mapped('featured')}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
                            {{endif}}
                        {{endif}}
                        {{if $row->prefix()}}
                            <span>{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}</span>
                        {{endif}}
                        <span class='ipsType_break ipsContained'>
                            <a href='{$row->url()}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}}  {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->canEdit()}} data-role="editableTitle"{{endif}} {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}>
                                <span>
                                    {{if $row->mapped('title') or $row->mapped('title') == 0}}{$row->mapped('title')}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
                                </span>
                            </a>
                        </span>
                    </h4>
                    <div class='ipsDataItem_meta ipsType_reset ipsType_light ipsType_blendLinks'>
                        {{if \IPS\Settings::i()->tutorials_formatnames}}{lang="by_ucfirst"} {template="userLinkFromData" group="global" app="core" params="$row->author()->member_id, $row->author()->name, $row->author()->members_seo_name, $row->author()->member_group_id"}, {{else}}{lang="byline" htmlsprintf="$row->author()->link()"}{{endif}}{datetime="$row->__get( $row::$databaseColumnMap['date'] )"}
                        {{if !\in_array( \IPS\Dispatcher::i()->controller, array( 'tutorials', 'index' ) )}}
                            {lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
                        {{endif}}
                        {{if \count( $row->tags() )}}
                            &nbsp;&nbsp;
                            {template="tags" group="global" app="core" params="$row->tags(), true, true"}
                        {{endif}}
                    </div>
                </div>

                {{if $row->container()->allow_reviews}}
                    <ul class='ipsDataItem_stats'>
                        {template="rating" group="global" location="front" app="core" params="'large', $row->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $row->memberReviewRating()"}<br><span class='ipsType_small ipsType_center ipsType_light'>({lang="num_reviews" pluralize="$row->reviews"})</span>
                    </ul>
                {{endif}}
                <ul class='ipsDataItem_stats'>
                    {{if !$row->container()->allow_comments}}
                        <li class='ipsType_light'>
                            <span class='ipsDataItem_stats_number'>{number="$row->views"}</span>
                            <span class='ipsDataItem_stats_type'>{lang="tutorials_num_views" pluralize="$views"}</span>
                        </li>
                    {{else}}
                        {{foreach $row->stats(TRUE) as $k => $v}}
                            <li {{if $k == 'num_views'}}class='ipsType_light'{{endif}}>
                                <span class='ipsDataItem_stats_number'>{number="$v"}</span>
                                <span class='ipsDataItem_stats_type'>{lang="tutorials_{$k}" pluralize="$v"}</span>
                            </li>
                        {{endforeach}}
                    {{endif}}
                </ul>
                <ul class='ipsDataItem_lastPoster ipsDataItem_withPhoto'>
                    <li>
                        {{if $row->mapped('num_comments')}}
                            {template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
                        {{else}}
                            {template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
                        {{endif}}
                    </li>
                    <li>
                        {{if $row->mapped('num_comments')}}
                            {{if \IPS\Settings::i()->tutorials_formatnames}}{template="userLinkFromData" group="global" app="core" params="$row->lastCommenter()->member_id, $row->lastCommenter()->name, $row->lastCommenter()->members_seo_name, $row->lastCommenter()->member_group_id"}{{else}}{$row->lastCommenter()->link()|raw}{{endif}}
                        {{else}}
                            {{if \IPS\Settings::i()->tutorials_formatnames}}{template="userLinkFromData" group="global" app="core" params="$row->author()->member_id, $row->author()->name, $row->author()->members_seo_name, $row->author()->member_group_id"}{{else}}{$row->author()->link()|raw}{{endif}}
                        {{endif}}
                    </li>
                    <li class="ipsType_light">
                        <a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>
                            {{if $row->mapped('last_comment')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
                        </a>
                    </li>
                </ul>
                {{if $table->canModerate()}}
                    <div class='ipsDataItem_modCheck'>
                        <input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
                    </div>
                {{endif}}
            </li>
    {{endforeach}}
{{else}}
    <li>{lang="tutorials_no_results"}</li>
{{endif}}

Edited by avangcom

@SlawkAЯ не понял что ты сказал

 {{$rowIds = array();}}
{{foreach $articles as $row}}
    {{$idField = $row::$databaseColumnId;}}
    {{$rowIds[] = $row->$idField;}}
{{endforeach}}
{{$iposted = ( method_exists( $table, 'container' ) AND $table->container() !== NULL ) ? $table->container()->contentPostedIn( null, $rowIds ) : array();}}
{{if \count( $articles )}}
    {{$rowCount=0;}}
    {{foreach $articles as $row}}
        {{if $rowCount == 1 AND $advertisement = \IPS\core\Advertisement::loadByLocation( 'ad_tutorial_listing' )}}
            <li class="ipsDataItem">
                {$advertisement|raw}
            </li>
        {{endif}}
        {{$rowCount++;}}
            <li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}' itemprop="itemListElement" itemscope itemtype="http://schema.org/Article">
                {{if member.member_id}}
                    <div class='ipsDataItem_icon ipsPos_top'>
                        {{if $row->unread()}}
                            {{if \in_array( $row->$idField, $iposted )}}
                                <a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
                                    <span class='ipsItemStatus'><i class="fa fa-star"></i></span>
                                </a>
                            {{else}}
                                <a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
                                    <span class='ipsItemStatus'><i class="fa fa-circle"></i></span>
                                </a>
                            {{endif}}
                        {{else}}
                            {{if \in_array( $row->$idField, $iposted )}}
                                <span class='ipsItemStatus ipsItemStatus_read ipsItemStatus_posted'><i class="fa fa-star"></i></span>
                            {{else}}
                                &nbsp;
                            {{endif}}
                        {{endif}}
                    </div>
                {{endif}}
                <div class='ipsDataItem_main'>
                    <h4 class='ipsDataItem_title ipsContained_container'>
                        {{if $row->mapped('locked')}}
                            <span><span class="ipsBadge ipsBadge_small ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="locked"}'><i class='fa fa-lock'></i></span></span>
                        {{endif}}
                        {{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
                            {{if $row->hidden() === -1}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
                            {{elseif $row->hidden() === 1}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
                            {{endif}}                            
                            {{if $row->mapped('pinned')}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
                            {{endif}}
                            {{if $row->mapped('featured')}}
                                <span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
                            {{endif}}
                        {{endif}}
                        {{if $row->prefix()}}
                            <span>{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}</span>
                        {{endif}}
                        <span class='ipsType_break ipsContained'>
                            <a href='{$row->url()}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}}  {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->canEdit()}} data-role="editableTitle"{{endif}} {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}>
                                <span>
                                    {{if $row->mapped('title') or $row->mapped('title') == 0}}{$row->mapped('title')}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
                                </span>
                            </a>
                        </span>
                    </h4>
                    <div class='ipsDataItem_meta ipsType_reset ipsType_light ipsType_blendLinks'>
                        {{if \IPS\Settings::i()->tutorials_formatnames}}{lang="by_ucfirst"} {template="userLinkFromData" group="global" app="core" params="$row->author()->member_id, $row->author()->name, $row->author()->members_seo_name, $row->author()->member_group_id"}, {{else}}{lang="byline" htmlsprintf="$row->author()->link()"}{{endif}}{datetime="$row->__get( $row::$databaseColumnMap['date'] )"}
                        {{if !\in_array( \IPS\Dispatcher::i()->controller, array( 'tutorials', 'index' ) )}}
                            {lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
                        {{endif}}
                        {{if \count( $row->tags() )}}
                            &nbsp;&nbsp;
                            {template="tags" group="global" app="core" params="$row->tags(), true, true"}
                        {{endif}}
                    </div>
                </div>

                {{if $row->container()->allow_reviews}}
                    <ul class='ipsDataItem_stats'>
                        {template="rating" group="global" location="front" app="core" params="'large', $row->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $row->memberReviewRating()"}<br><span class='ipsType_small ipsType_center ipsType_light'>({lang="num_reviews" pluralize="$row->reviews"})</span>
                    </ul>
                {{endif}}
                <ul class='ipsDataItem_stats'>
                    {{if !$row->container()->allow_comments}}
                        <li class='ipsType_light'>
                            <span class='ipsDataItem_stats_number'>{number="$row->views"}</span>
                            <span class='ipsDataItem_stats_type'>{lang="tutorials_num_views" pluralize="$views"}</span>
                        </li>
                    {{else}}
                        {{foreach $row->stats(TRUE) as $k => $v}}
                            <li {{if $k == 'num_views'}}class='ipsType_light'{{endif}}>
                                <span class='ipsDataItem_stats_number'>{number="$v"}</span>
                                <span class='ipsDataItem_stats_type'>{lang="tutorials_{$k}" pluralize="$v"}</span>
                            </li>
                        {{endforeach}}
                    {{endif}}
                </ul>
                <ul class='ipsDataItem_lastPoster ipsDataItem_withPhoto'>
                    <li>
                        {{if $row->mapped('num_comments')}}
                            {template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
                        {{else}}
                            {template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
                        {{endif}}
                    </li>
                    <li>
                        {{if $row->mapped('num_comments')}}
                            {{if \IPS\Settings::i()->tutorials_formatnames}}{template="userLinkFromData" group="global" app="core" params="$row->lastCommenter()->member_id, $row->lastCommenter()->name, $row->lastCommenter()->members_seo_name, $row->lastCommenter()->member_group_id"}{{else}}{$row->lastCommenter()->link()|raw}{{endif}}
                        {{else}}
                            {{if \IPS\Settings::i()->tutorials_formatnames}}{template="userLinkFromData" group="global" app="core" params="$row->author()->member_id, $row->author()->name, $row->author()->members_seo_name, $row->author()->member_group_id"}{{else}}{$row->author()->link()|raw}{{endif}}
                        {{endif}}
                    </li>
                    <li class="ipsType_light">
                        <a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>
                            {{if $row->mapped('last_comment')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
                        </a>
                    </li>
                </ul>
                {{if $table->canModerate()}}
                    <div class='ipsDataItem_modCheck'>
                        <input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
                    </div>
                {{endif}}
            </li>
    {{endforeach}}
{{else}}
    <li>{lang="tutorials_no_results"}</li>
{{endif}} 

 

Что сразу Desti??

Редактировать файл sources/Category/Category.php

Добавить 

    use \IPS\Node\Statistics;

после строки (15) 

     use \IPS\Node\Colorize;
 

Edited by Desti

Есть еще одна мелкая ошибка:

Редактировать файл sources/Category/Category.php

Найти:

    public function getLastCommentTime()

Заменить на:

    public function getLastCommentTime( \IPS\Member $member = NULL )

Ошибку можно увидеть, если сгенерить dev папку и переключиться в dev-mode. 

Да и просто по правилам переопределяемая функция в чилде должна иметь те же аргументы, что и родительская. В 4.4 была getLastCommentTime(), в 4.6 уже getLastCommentTime(\IPS\Member $member = NULL).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.