Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
January 13, 20205 yr You'd have to use a clever CSS selector, or edit the recordFeed widget template in the theme system.
January 27, 20205 yr {{foreach $row->stats(FALSE) as $k => $v}} <li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}> <span class='ipsDataItem_stats_number'>{number="$v"}</span> <span class='ipsDataItem_stats_type'>{lang="{$k}" pluralize="$v"}</span> {{if ( $k == 'forums_comments' OR $k == 'answers_no_number' ) && \IPS\forums\Topic::modPermission( 'unhide', NULL, $row->container() ) AND $unapprovedComments = $row->mapped('unapproved_comments')}} <a href='{$row->url()->setQueryString( 'queued_posts', 1 )}' class='ipsType_warning ipsType_small ipsPos_right ipsResponsive_noFloat' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$row->topic_queuedposts"}'><i class='fa fa-warning'></i> <strong>{$unapprovedComments}</strong></a> {{endif}} </li> {{endforeach}} if( $k != 'views' ).... inside the loop
January 28, 20205 yr Author What template is that? Mine looks differed. {{if !empty( $records ) }} <h3 class='ipsWidget_title ipsType_reset'>{$title}</h3> {{if $orientation == 'vertical'}} <div class='ipsPad_half ipsWidget_inner'> <ul class='ipsDataList ipsDataList_reducedSpacing ipsContained_container'> {{foreach $records as $record}} <li class='ipsDataItem'> <div class='ipsDataItem_icon ipsPos_top'> {template="userPhoto" group="global" app="core" params="$record->author(), 'tiny'"} </div> <div class='ipsDataItem_main cWidgetComments'> <div class="ipsCommentCount ipsPos_right {{if ( $record->record_comments ) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="num_replies" pluralize="$record->record_comments"}'>{expression="$record->record_comments"}</div> <div class='ipsType_break ipsContained'> <a href="{$record->url()->setQueryString( 'do', 'getLastComment' )}" title='{lang="view_this_cmsrecord" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'content_db_lang_sl_' . $record::$customDatabaseId, FALSE ), $record->_title"}' class='ipsDataItem_title'>{$record->_title}</a> </div> <p class='ipsType_reset ipsType_medium ipsType_blendLinks'> <span>{lang="byline_nodate" htmlsprintf="$record->author()->link()"}</span><br> <span class="ipsType_light">{datetime="$record->mapped('date')"}</span> </p> </div> </li> {{endforeach}} </ul> </div> {{else}} <div class='ipsWidget_inner'> <ul class='ipsDataList ipsContained_container'> {template="recordRow" group="listing" location="database" app="cms" themeClass="IPS\cms\Theme" params="null, null, $records"} </ul> </div> {{endif}} {{endif}}
January 28, 20205 yr Yours is a horizontal record feed, isn't it? If so, those details are coming from this line: {template="recordRow" group="listing" location="database" app="cms" themeClass="IPS\cms\Theme" params="null, null, $records"} So you need to track down the relevant bit of code in the recordRow template which your database is using for its listing.
January 28, 20205 yr 1 hour ago, Owdy said: That isnt template="recordRow". There arent any "views" It's in this bit here: {{foreach $row->stats(TRUE) as $k => $v}} <li {{if \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}> <span class='ipsDataItem_stats_number'>{number="$v"}</span> <span class='ipsDataItem_stats_type'>{lang="content_records_stat_{$k}" pluralize="$v"}</span> </li> {{endforeach}} But I've got some bad news for you. To test it, I edited a line to read <span class='ipsDataItem_stats_type'>xx{lang="content_records_stat_{$k}" pluralize="$v"}</span> and this was the result: So if you want to remove views, you'll lose the comments as well.
January 29, 20205 yr I was showing the topicRow template (sorry, it wasn't clear from the screenshot what you were looking at specifically but I see you clarified in the topic title now). You would change the bit Meddysong showed to {{foreach $row->stats(TRUE) as $k => $v}} {{if $k != 'views'}} <li {{if \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}> <span class='ipsDataItem_stats_number'>{number="$v"}</span> <span class='ipsDataItem_stats_type'>{lang="content_records_stat_{$k}" pluralize="$v"}</span> </li> {{endif}} {{endforeach}}
Archived
This topic is now archived and is closed to further replies.