Jump to content
WebFlake
  • 0

Modify Post feed block


HighDef

Question

Hey guys! 

I have installed nulled version of 4.4.3 IPB. I was checking the blocks and I don't like how the post feed block looks like image.png.40d82b7fe283215d31384e8eda8e1f8c.png

I would really like the post feed to show everything except the content of the post. 

Would really appreciate if someone could modify the code for me! 

Spoiler

 

{{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'>
                            <div class='ipsType_break ipsContained'><a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsType_medium ipsTruncate ipsTruncate_line'>{$comment->item()->title}</a></div>
                            <p class='ipsType_reset ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} &middot; <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}}' data-ipsTruncate-watch='false'>
                                {$comment->truncated( TRUE, NULL )|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'>
                                    {{if $comment->canReportOrRevoke() === TRUE}}
                                        <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> &middot; 
                                    {{endif}}

                                    <a class='ipsType_blendLinks' 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()}}
                                        &middot; {$comment->hiddenBlurb()}
                                    {{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'>
                            <div class='ipsType_break ipsContained'><a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsDataItem_title ipsTruncate ipsTruncate_line'>{wordbreak="$comment->item()->title"}</a></div>
                            <div data-role='commentContent' class='ipsType_normal ipsType_richText 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 && \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
                                <div class='ipsItemControls'>
                                    {template="reputation" group="global" app="core" params="$comment"}
                                </div>
                            {{endif}}
                        </div>
                    </li>
                {{endforeach}}
            </ul>
        </div>
    {{endif}}
{{endif}}

 

 

Edited by HighDef
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

First, I would like to say thank you for posting code you want edited. Most users ask for us to edit code we do not know/have access to. Here is your edited code:

{{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'>
                            <div class='ipsType_break ipsContained'><a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsType_medium ipsTruncate ipsTruncate_line'>{$comment->item()->title}</a></div>
                            <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>
                    </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'>
                                    {{if $comment->canReportOrRevoke() === TRUE}}
                                        <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}}

                                    <a class='ipsType_blendLinks' 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}}
                                </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'>
                            <div class='ipsType_break ipsContained'><a href="{$comment->url()}" title='{lang="view_this_topic" sprintf="$comment->item()->title"}' class='ipsDataItem_title ipsTruncate ipsTruncate_line'>{wordbreak="$comment->item()->title"}</a></div>
                            <div data-role='commentContent' class='ipsType_normal ipsType_richText 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}}
                            </div>
                            
                            {{if $comment->hidden() !== 1 && \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
                                <div class='ipsItemControls'>
                                    {template="reputation" group="global" app="core" params="$comment"}
                                </div>
                            {{endif}}
                        </div>
                    </li>
                {{endforeach}}
            </ul>
        </div>
    {{endif}}
{{endif}}

Using the existing code, it will show everything that you have asked for.

bc75fe9a19e9f466272ee3e3337dd212.png

  • Like 1
  • Support Team - September 9th, 2017 - June 8, 2018
  • Junior Moderator - December 14th 2018 - November 16th, 2019
  • Designer - November 16th, 2019 - June 5th, 2020
  • Moderator - June 5th, 2020 - August 28th, 2020
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...