Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
IPBGallery.com Posted December 1, 2015 Posted December 1, 2015 Help to find the bug in my template for IP.Content (Record). And the error only appears when the page adds a comment. <!--Описание для урока--> <div id="video_description"> <!--<div id="follow"> <div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'> {template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followers()->count( TRUE )"} </div> </div>--> <div id="courses_title" class='ipsClearfix'> <div id="lessons"><!--{$record->customFieldDisplayByKey('courses_lessons_category')|raw} / Раздел {$record->customFieldDisplayByKey('courses_category_number')|raw} |--><i class="fa fa-folder"></i> Занятие {$record->customFieldDisplayByKey('courses_lesson_number')|raw}</div> <h1 class='ipsType_pageTitle ipsType_break' style="padding-bottom: 5px;margin-left: -3px;"> {{if $record->prefix()}} {template="prefix" group="global" app="core" params="$record->prefix( TRUE ), $record->prefix()"} {{endif}} {{if $record->locked()}}<i class='fa fa-lock'></i> {{endif}}{wordbreak="$record->_title"} {{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1}} {{if $record->isFutureDate()}} <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span> {{elseif $record->hidden() === -1}} <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span> {{elseif $record->hidden() === 1}} <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span> {{endif}} {{if $record->mapped('pinned')}} <span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span> {{endif}} {{if $record->mapped('featured')}} <span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span> {{endif}} {{endif}} </h1> </div> <div id="text_description_small"> <article class='ipsContained'> <div class='ipsClearfix' style="padding-bottom:0px;"> <section class="ipsType_richText ipsType_normal" style="font-size:17px!important;" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section> </div> <hr class="ipsHr ipsClear ipsClearfix"> <!--Параметры урока--> <div style="display:inline-block;padding-right:20px;"> <div class="courses_subtitle"><i class="fa fa-eye"></i> {$record->record_views|raw}</div> <div class="courses_subtitle"><i class="fa fa-graduation-cap"></i> {$record->customFieldDisplayByKey('courses_difficult')|raw}</div> <!--<div class="courses_subtitle"><i class="fa fa-calendar"></i> {datetime="$record->record_publish_date"}</div>--> <div id="author"> <div><i class="fa fa-microphone"></i> Автор - {$record->customFieldDisplayByKey('courses_speaker')|raw}</div> </div> </div> <!--Видят студенты и администратор--> {{if \IPS\Member::loggedIn()->inGroup(array(4))}} <div style="padding-top:20px;display:inline-block;"> {{if $record instanceof \IPS\Content\Reputation and settings.reputation_enabled}} <div class='ipsPos_right'> {template="reputation" app="core" group="global" params="$record"} </div> {{endif}} {{if $record->isFutureDate() or $record->canPin() or $record->canUnpin() or $record->canFeature() or $record->canUnfeature() or $record->canHide() or $record->canUnhide() or $record->canMove() or $record->canLock() or $record->canUnlock() or $record->canDelete()}} <a href='#elentryActions_menu' id='elentryActions' class='ipsButton ipsButton_light ipsButton_verySmall' data-ipsMenu>{lang="content_record_actions" sprintf="$record::database()->recordWord( 1, TRUE )"} <i class='fa fa-caret-down'></i></a> <ul id='elentryActions_menu' class='ipsMenu ipsMenu_auto ipsHide'> {{if $record->isFutureDate() and $record::canFuturePublish( NULL, $record->container() )}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'publish' ) )}' data-confirm title='{lang="publish_now"}'>{lang="publish"}</a></li> {{endif}} {{if $record->canFeature()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'feature' ) )}' title='{lang="feature_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="feature"}</a></li> {{endif}} {{if $record->canUnfeature()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unfeature' ) )}' title='{lang="unfeature_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unfeature"}</a></li> {{endif}} {{if $record->canPin()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'pin' ) )}' title='{lang="pin_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="pin"}</a></li> {{endif}} {{if $record->canUnpin()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unpin' ) )}' title='{lang="unpin_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unpin"}</a></li> {{endif}} {{if $record->canHide()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'hide' ) )}' title='{lang="hide_title_record" sprintf="$record::database()->recordWord(1)"}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li> {{endif}} {{if $record->canUnhide()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unhide' ) )}' title='{{if $record->hidden() === 1}}{lang="approve_title_record" sprintf="$record::database()->recordWord(1)"}{{else}}{lang="unhide_title_record" sprintf="$record::database()->recordWord(1)"}{{endif}}'>{{if $record->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li> {{endif}} {{if $record->canLock()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'lock' ) )}' title='{lang="lock_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="lock"}</a></li> {{endif}} {{if $record->canUnlock()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unlock' ) )}' title='{lang="unlock_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unlock"}</a></li> {{endif}} {{if $record->canMove()}} <li class='ipsMenu_item'><a href='{$record->url('move')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="move"}" title='{lang="move_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="move"}</a></li> {{endif}} {{if $record->canDelete()}} <li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'delete' ) )}' data-confirm title='{lang="delete_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="delete"}</a></li> {{endif}} {{if \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}} <li class='ipsMenu_sep'><hr></li> <li class="ipsMenu_item"><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li> {{endif}} </ul> {{endif}} {{if $record->canEdit()}} <a href='{$record->url('edit')->csrf()}' title='{lang="edit"}'>{lang="edit"}</a> {{endif}} <!--{{if !\IPS\Member::loggedIn()->group['gbw_no_report'] }} <a href='{$record->url('report')}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a> {{endif}}--> {{if $record->canManageRevisions()}} <a href='{$record->url('revisions')}' title="{lang="content_view_revisions"}">{lang="content_view_revisions"}</a> {{endif}} </div> {{endif}} </article> </div> <!--<div id="rating"> {{if $record::database()->options['reviews']}} <span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <meta itemprop='ratingValue' content='{$record->averageReviewRating()}'> <meta itemprop='reviewCount' content='{$record->record_reviews}'> {template="rating" group="global" location="front" app="core" params="'large', $record->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of"} <span class='ipsType_normal ipsType_light'>({lang="num_reviews" pluralize="$record->record_reviews"})</span> </span> {{elseif $record->container()->allow_rating}} <div>{$record->rating()|raw}</div> {{endif}} </div>--> </div> <!--<div id='errorm' style="text-align: center;background-color: #EA2626;padding: 20px;font-size: 18px;color: #FFF;">Обязательно проверьте все эти вкладки!</div>--> <!--Вкладки с описанием уроков--> <div id="video_tab"> <div class="courses_tab"> <input type="radio" name="courses1" id="courses1_1" checked ><label for="courses1_1"><i class="fa fa-video-camera"></i> Видеоурок</label ><input type="radio" name="courses1" id="courses1_2" ><label for="courses1_2"><i class="fa fa-graduation-cap"></i> Задание к уроку</label ><input type="radio" name="courses1" id="courses1_3" ><label for="courses1_3"><i class="fa fa-pencil-square-o"></i> Сдать задание</label ><input type="radio" name="courses1" id="courses1_4" ><label for="courses1_4"><i class="fa fa-list"></i> Тестирование</label ><input type="radio" name="courses1" id="courses1_5" ><label for="courses1_5"><i class="fa fa-file-text"></i> Содержание</label> <!--Содержимое вкладок--> <div id="courses_video" class="courses_tab_content"> {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_access')))}} {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_paid')))}} <div id="video_player"> <div id="player"> {$record->customFieldDisplayByKey('courses_youtube')|raw} </div> </div> {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Купите платную подписку</a>, чтобы смотреть этот видео урок</div> {{endif}} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Войдите на сайт</a>, чтобы смотреть этот видео урок</div> {{endif}} </div> <div id="courses_zadanie" class="courses_tab_content"> {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_access')))}} {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_paid')))}} <div class="materials"> <a style="margin-bottom:20px;" target="_blank" href="{$record->customFieldDisplayByKey('courses_materials')|raw}"><i class="fa fa-arrow-circle-down"></i> Скачать материалы к этому уроку</a> </div> {$record->customFieldDisplayByKey('courses_ticket')|raw} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Купите платную подписку</a>, чтобы получить доступ к этому заданию</div> {{endif}} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Войдите на сайт</a>, чтобы открыть доступ к этому заданию</div> {{endif}} </div> <div id="courses_change" class="courses_tab_content"> {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_access')))}} {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_paid')))}} <div class="courses_test_example true" style="padding:40px"> <b>Пример правильного выполнения задания</b> <div style="padding-top:20px;">{$record->customFieldDisplayByKey('courses_test_example')|raw}</div> </div> {template="comments" group="display" location="database" app="cms" params="$record"} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Купите платную подписку</a>, чтобы открыть доступ к сдаче заданий</div> {{endif}} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Войдите на сайт</a>, чтобы сдать задание по этому уроку</div> {{endif}} </div> <div id="courses_test" class="courses_tab_content"> {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_access')))}} {{if \IPS\Member::loggedIn()->inGroup(explode(',', $record->customFieldDisplayByKey('courses_paid')))}} <!--{template="reviews" group="display" location="database" app="cms" params="$record"}--> <form class="dm-js-form"> {$record->customFieldDisplayByKey('courses_test')|raw} <input class="courses_test_button" id="calc" type="button" value="Узнать результаты" onclick="calcForm();return false;"><br> <div class="courses_test_result true"> <span class="courses_test_coutdown">--</span> Правильных ответов </div> <div class="courses_test_result false"> <span class="courses_test_coutdown">--</span> Не правильных ответов </div> </form> {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Купите платную подписку</a>, чтобы пройти тестирование</div> {{endif}} {{else}} <div class="no_login"><i class="fa fa-ban"></i> <a target="_blank" href="/login/">Войдите на сайт</a>, чтобы пройти тестирование</div> {{endif}} </div> <div class="courses_tab_content"> {$record->customFieldDisplayByKey('courses_lesson_textversion')|raw} </div> </div> </div> <!--Прочий контент для уроков--> <div id="other_content"> <div id="share_batton"> {{if !$record->container()->disable_sharelinks}} <hr class='ipsHr' style="margin: 0px 0px 15px 0px;"> {template="sharelinks" app="core" group="global" params="$record"} {{endif}} </div> <div id="updateform"> <br> {{if $updateForm}} <div class='ipsAreaBackground_light ipsPad'> <h2 class='ipsType_sectionHead'>{lang="cms_front_update_fields" sprintf="$record::database()->recordWord( 1 )"}</h2> <ul class='ipsForm ipsForm_vertical'> {$updateForm|raw} </ul> </div> {{endif}} </div> </div>
Nathan Explosion Posted December 1, 2015 Posted December 1, 2015 2 hours ago, vinegredz said: Help to find the bug in my template for IP.Content (Record). And the error only appears when the page adds a comment. You might want to tell people what the bug is, and what the error is, so they can help more than just looking at a wall of code.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.