Перейти к содержанию

avangcom

Актив
  • Постов

    489
  • Зарегистрирован

  • Посещение

  • Победитель дней

    1

Сообщения, опубликованные avangcom

  1. @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}} 

     

  2. 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}}

×
×
  • Создать...