Nervodx

IPB Feature Plan

81 posts in this topic

Posted (edited)

@Cookie Monster Thank you for answer. :)

 

P.S.: I tried with this:

{if settings.reputation_enabled == true}}

And it is working perfectly to me. Probably not perfect solution but it is working. :)

Edited by MrAlicard
1

Share this post


Link to post
Share on other sites
3 hours ago, R0rke said:

not your business.

No that's fine, I will then not publish my updated guide for 4.2 to get this working as I was working on it. (as this tutorial is a bit old) :thumbs_up:

Ungrateful people that talk to me like that when I simply ask a question I don't feel like helping sorry.

3

Share this post


Link to post
Share on other sites

Posted (edited)

recordRow with reputation for 4.2

{{$rowIds = array();}}
{{foreach $rows as $row}}
{{$idField = $row::$databaseColumnId;}}
{{$rowIds[] = $row->$idField;}}
{{endforeach}}
{{$iposted = ( $table AND method_exists( $table, 'container' ) AND $table->container() !== NULL ) ? $table->container()->contentPostedIn( null, $rowIds ) : array();}}

{{foreach $rows as $row}}
{{$idField = $row::$databaseColumnId;}}
<li class="ipsSpacer_bottom c4StatusRow ipsAreaBackground_light ipsPad" data-rowID='{$row->$idField}'>
    <div class='ipsColumns ipsColumns_collapsePhone'>
        <a href='#' class='c4StatusRow ipsAreaBackground_light {{if $row->fieldValues()['field_11'] == '4'}}ipsFaded{{endif}} ipsType_blendLinks {{if $row->hidden()}}ipsModerated{{endif}}' data-ipsDialog data-ipsDialog-title="{$row->_title}" data-ipsDialog-size='medium' data-ipsDialog-content='#el4StatusInfo_{$row->$idField}'>
            <h4 class='ipsType_sectionHead ipsType_break'>
                <strong>{{if $row->_title}}{$row->_title}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}</strong>
            </h4>
            {{if $row->isFutureDate() || $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
            <span>
                {{if $row->isFutureDate()}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
                {{elseif $row->hidden() === -1}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
                {{elseif $row->hidden() === 1}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
                {{endif}}                           
                {{if $row->mapped('pinned')}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
                {{endif}}
                {{if $row->mapped('featured')}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
                {{endif}}
            </span>
            {{endif}}

            <div class='ipsType_normal ipsType_break'>
                {$row->customFieldDisplayByKey('summary', 'listing')|raw}
            </div>
            {{if $table->container()->can('add')}}
            <div class='ipsType_normal ipsType_break'>
                <a href='{$row->url('edit')->csrf()}' title='{lang="edit_title"}'>{lang="edit"}</a>
            </div>
            {{endif}}
        </a>
        <div class='ipsColumn ipsColumn_medium'>
            <a href='#' class='c4StatusRow ipsAreaBackground_light {{if $row->fieldValues()['field_11'] == '4'}}ipsFaded{{endif}} ipsType_blendLinks {{if $row->hidden()}}ipsModerated{{endif}}' data-ipsDialog data-ipsDialog-title="{$row->_title}" data-ipsDialog-size='medium' data-ipsDialog-content='#el4StatusInfo_{$row->$idField}'>
                {$row->customFieldDisplayByKey('status2', 'listing')|raw}
            </a>
            {{if \IPS\IPS::classUsesTrait( $row, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
            <div class='ipsSpacer_top ipsSpacer_half ipsType_center'>
                {template="reputation" app="core" group="global" params="$row"}
            </div>
            {{endif}}
        </div>
    </div>
    <div id='el4StatusInfo_{$row->$idField}' class='ipsHide'>
        <div class='ipsPad ipsType_normal ipsType_break ipsType_contained ipsType_richText'>
            {$row->content()|raw}
        </div>
    </div>
</li>
{{endforeach}}

Make sure you change field_11 to your field ID for your status

Edited by Shay
Typo
0

Share this post


Link to post
Share on other sites
On 10/08/2017 at 0:24 PM, Shay said:

recordRow with reputation for 4.2


{{$rowIds = array();}}
{{foreach $rows as $row}}
{{$idField = $row::$databaseColumnId;}}
{{$rowIds[] = $row->$idField;}}
{{endforeach}}
{{$iposted = ( $table AND method_exists( $table, 'container' ) AND $table->container() !== NULL ) ? $table->container()->contentPostedIn( null, $rowIds ) : array();}}

{{foreach $rows as $row}}
{{$idField = $row::$databaseColumnId;}}
<li class="ipsSpacer_bottom c4StatusRow ipsAreaBackground_light ipsPad" data-rowID='{$row->$idField}'>
    <div class='ipsColumns ipsColumns_collapsePhone'>
        <a href='#' class='c4StatusRow ipsAreaBackground_light {{if $row->fieldValues()['field_11'] == '4'}}ipsFaded{{endif}} ipsType_blendLinks {{if $row->hidden()}}ipsModerated{{endif}}' data-ipsDialog data-ipsDialog-title="{$row->_title}" data-ipsDialog-size='medium' data-ipsDialog-content='#el4StatusInfo_{$row->$idField}'>
            <h4 class='ipsType_sectionHead ipsType_break'>
                <strong>{{if $row->_title}}{$row->_title}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}</strong>
            </h4>
            {{if $row->isFutureDate() || $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
            <span>
                {{if $row->isFutureDate()}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
                {{elseif $row->hidden() === -1}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
                {{elseif $row->hidden() === 1}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
                {{endif}}                           
                {{if $row->mapped('pinned')}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
                {{endif}}
                {{if $row->mapped('featured')}}
                <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
                {{endif}}
            </span>
            {{endif}}

            <div class='ipsType_normal ipsType_break'>
                {$row->customFieldDisplayByKey('summary', 'listing')|raw}
            </div>
            {{if $table->container()->can('add')}}
            <div class='ipsType_normal ipsType_break'>
                <a href='{$row->url('edit')->csrf()}' title='{lang="edit_title"}'>{lang="edit"}</a>
            </div>
            {{endif}}
        </a>
        <div class='ipsColumn ipsColumn_medium'>
            <a href='#' class='c4StatusRow ipsAreaBackground_light {{if $row->fieldValues()['field_11'] == '4'}}ipsFaded{{endif}} ipsType_blendLinks {{if $row->hidden()}}ipsModerated{{endif}}' data-ipsDialog data-ipsDialog-title="{$row->_title}" data-ipsDialog-size='medium' data-ipsDialog-content='#el4StatusInfo_{$row->$idField}'>
                {$row->customFieldDisplayByKey('status2', 'listing')|raw}
            </a>
            {{if \IPS\IPS::classUsesTrait( $row, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
            <div class='ipsSpacer_top ipsSpacer_half ipsType_center'>
                {template="reputation" app="core" group="global" params="$row"}
            </div>
            {{endif}}
        </div>
    </div>
    <div id='el4StatusInfo_{$row->$idField}' class='ipsHide'>
        <div class='ipsPad ipsType_normal ipsType_break ipsType_contained ipsType_richText'>
            {$row->content()|raw}
        </div>
    </div>
</li>
{{endforeach}}

 

is this the only change?

 

would love to see the updated guide cookie :D ( if possible could the bugs and suggestions guide be posted? )

much appreciated 

 

0

Share this post


Link to post
Share on other sites
On 8/15/2017 at 7:15 AM, dmx1 said:

is this the only change?

Yes

{template="reputation" app="core" group="global" params="$row"}

Is the new way to add in reputation.

On 8/15/2017 at 7:15 AM, dmx1 said:

( if possible could the bugs and suggestions guide be posted? )

I have copied the tutorial from IPS for the bug tracker. You can view it here

 

Edited by Shay
0

Share this post


Link to post
Share on other sites
1 hour ago, Shay said:

Yes


{template="reputation" app="core" group="global" params="$row"}

Is the new way to add in reputation.

I have copied the tutorial from IPS for the bug tracker. You can view it here

 

Oh you mean like these that still work and exsist?

Though the guide you have sounds nice how to create it. 

1

Share this post


Link to post
Share on other sites

What do you think? Remember the human.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.