Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
NaisA- Posted March 22, 2016 Posted March 22, 2016 Hello, so right now I am attempting to edit the Post Feed Block to display only the poster and when they posted. This is the original code for the block - {{if !empty( $comments ) }} <h3 class='ipsType_reset ipsWidget_title'>{$title}</h3> {{if $orientation == 'vertical'}} <div class='ipsWidget_inner ipsPad_half'> <ul class='ipsDataList ipsDataList_reducedSpacing'> {{foreach $comments as $comment}} <li class='ipsDataItem'> <div class='ipsDataItem_icon ipsPos_top'> {template="userPhoto" group="global" app="core" params="$comment->author(), 'tiny'"} </div> <div class='ipsDataItem_main'> <a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsType_medium ipsType_break'>{wordbreak="$comment->item()->title"}</a><br> <p class='ipsType_reset ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} · <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' class='ipsType_blendLinks'>{$comment->dateLine()|raw}</a></p> <div class='ipsType_medium ipsType_textBlock ipsType_richText ipsType_break ipsContained ipsSpacer_top ipsSpacer_half' data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='{{if $orientation == 'vertical'}}6 lines{{else}}2 lines{{endif}}'> {$comment->truncated( true )|raw} </div> </div> </li> {{endforeach}} </ul> </div> {{else}} <div class='ipsWidget_inner'> <ul class='ipsDataList'> {{foreach $comments as $comment}} <li class='ipsDataItem ipsClearfix'> <div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_mini'> {template="userPhoto" app="core" group="global" params="$comment->author(), 'mini', $comment->warningRef()"} <div> <p class='ipsPos_right ipsType_reset ipsType_blendLinks'> <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' data-ipsTooltip title='{lang="share_this_comment"}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$comment->pid}' data-role='shareComment'><i class='fa fa-share-alt'></i></a> </p> <h3 class='ipsComment_author ipsType_blendLinks'> <strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef()"}</strong> {template="reputationBadge" group="global" app="core" params="$comment->author()"} </h3> <p class='ipsComment_meta ipsType_light ipsType_medium'> <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' class='ipsType_blendLinks'>{$comment->dateLine()|raw}</a> {{if $comment->editLine()}} ({lang="edited_lc"}) {{endif}} {{if $comment->hidden()}} · {$comment->hiddenBlurb()} {{endif}} {{if $comment instanceof \IPS\Content\ReportCenter and !\IPS\Member::loggedIn()->group['gbw_no_report'] and $comment->hidden() !== 1 }} · <a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'>{lang="report"}</a> {{endif}} </p> {{if member.modPermission('mod_see_warn') and $comment->warning}} {template="commentWarned" group="global" app="core" params="$comment"} {{endif}} </div> </div> <div class='ipsPad ipsClearfix'> <a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$comment->item()->title"}</a><br> <div data-role='commentContent' class='ipsType_normal ipsType_richText ipsType_break ipsContained' data-controller='core.front.core.lightboxedImages'> {{if $comment->hidden() === 1 && $comment->author()->member_id == \IPS\Member::loggedIn()->member_id}} <strong class='ipsType_medium ipsType_warning'><i class='fa fa-info-circle'></i> {lang="comment_awaiting_approval"}</strong> {{endif}} {$comment->content()|raw} {{if $comment->editLine()}} {$comment->editLine()|raw} {{endif}} </div> {{if $comment->hidden() !== 1 && $comment instanceof \IPS\Content\Reputation and settings.reputation_enabled}} {template="reputation" group="global" app="core" params="$comment, 'ipsPos_right ipsResponsive_noFloat'"} {{endif}} </div> </li> {{endforeach}} </ul> </div> {{endif}} {{endif}} This is the edited code for the block - {{if !empty( $comments ) }} <h3 class='ipsType_reset ipsWidget_title'>{$title}</h3> {{if $orientation == 'vertical'}} <div class='ipsWidget_inner ipsPad_half'> <ul class='ipsDataList ipsDataList_reducedSpacing'> {{foreach $comments as $comment}} <li class='ipsDataItem'> <div class='ipsDataItem_icon ipsPos_top'> {template="userPhoto" group="global" app="core" params="$comment->author(), 'tiny'"} </div> <div class='ipsDataItem_main'> <a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsType_medium ipsType_break'>{wordbreak="$comment->item()->title"}</a><br> <p class='ipsType_reset ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} · <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' class='ipsType_blendLinks'>{$comment->dateLine()|raw}</a></p> <div class='ipsType_medium ipsType_textBlock ipsType_richText ipsType_break ipsContained ipsSpacer_top ipsSpacer_half' data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='{{if $orientation == 'vertical'}}6 lines{{else}}2 lines{{endif}}'> {$comment->truncated( true )|raw} </div> </div> </li> {{endforeach}} </ul> </div> {{else}} <div class='ipsWidget_inner'> <ul class='ipsDataList'> {{foreach $comments as $comment}} <li class='ipsDataItem ipsClearfix'> <div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_mini'> {template="userPhoto" app="core" group="global" params="$comment->author(), 'mini', $comment->warningRef()"} <div> <p class='ipsPos_right ipsType_reset ipsType_blendLinks'> <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' data-ipsTooltip title='{lang="share_this_comment"}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$comment->pid}' data-role='shareComment'><i class='fa fa-share-alt'></i></a> </p> <h3 class='ipsComment_author ipsType_blendLinks'> <strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef()"}</strong> {template="reputationBadge" group="global" app="core" params="$comment->author()"} </h3> <p class='ipsComment_meta ipsType_light ipsType_medium'> <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->pid ) )}' class='ipsType_blendLinks'>{$comment->dateLine()|raw}</a> {{if $comment->editLine()}} ({lang="edited_lc"}) {{endif}} {{if $comment->hidden()}} · {$comment->hiddenBlurb()} {{endif}} {{if $comment instanceof \IPS\Content\ReportCenter and !\IPS\Member::loggedIn()->group['gbw_no_report'] and $comment->hidden() !== 1 }} · <a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'>{lang="report"}</a> {{endif}} </p> {{if member.modPermission('mod_see_warn') and $comment->warning}} {template="commentWarned" group="global" app="core" params="$comment"} {{endif}} </div> </div> <div class='ipsPad ipsClearfix'> <a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$comment->item()->title"}</a><br> <div data-role='commentContent' class='ipsType_normal ipsType_richText ipsType_break ipsContained' data-controller='core.front.core.lightboxedImages'> {{if $comment->hidden() === 1 && $comment->author()->member_id == \IPS\Member::loggedIn()->member_id}} <strong class='ipsType_medium ipsType_warning'><i class='fa fa-info-circle'></i> {lang="comment_awaiting_approval"}</strong> {{endif}} {$comment->content()|raw} {{if $comment->editLine()}} {$comment->editLine()|raw} {{endif}} </div> {{if $comment->hidden() !== 1 && $comment instanceof \IPS\Content\Reputation and settings.reputation_enabled}} {template="reputation" group="global" app="core" params="$comment, 'ipsPos_right ipsResponsive_noFloat'"} {{endif}} </div> </li> {{endforeach}} </ul> </div> {{endif}} {{endif}} However when I input the edited code into a custom block and add it to the site, it still shows the comments. Any suggestions?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.