PDA

View Full Version : Listing field strikethrough



Chris Brown
September 9, 2014, 09:53 PM
Hi guys

Anyone know how to remove the field values for the auto classified fields such as comfort, interior, windows etc which have the strikethrough so it only shows the ticked options

Chris

Curtis
September 10, 2014, 07:06 AM
Hi guys

Anyone know how to remove the field values for the auto classified fields such as comfort, interior, windows etc which have the strikethrough so it only shows the ticked options

Chris

Hello Chris,

It could be done hardcoded only.
If you want i can change it for you.

Chris Brown
September 10, 2014, 08:35 AM
That would be great, please do to my motoradsuk website. Do you need FTP. Also please let me know which files were changed :)

Erik Botha
April 7, 2015, 08:16 AM
Please let me know how this was done, would like to do this for my own site too.

Curtis
April 8, 2015, 05:06 AM
Please let me know how this was done, would like to do this for my own site too.

Hi Erik,

You need change the field_out.tpl file.
It located: /templates/auto_flatty/tpl/blocks/field_out.tpl

Open it and replace all code to following:



<!-- field output tpl -->
<div class="table-cell clearfix{if $small} small{/if}{if ($item.Type == 'checkbox' && $item.Opt1) || $item.Type == 'textarea'} wide-field{if $item.Type == 'textarea'} textarea{/if}{/if}" id="df_field_{$item.Key}"> {if $item.Type == 'image' && $small}{else} <div class="name" title="{$item.name}">{if !$small}<div><span>{$item.name}</span></div>{else}{$item.name}{/if}</div> {/if} <div class="value{if $item.Type == 'image'} image{/if}"> {if $item.Type == 'checkbox' && is_array($item.Values)} <ul class="checkboxes clearfix"> {foreach from=$item.Values item='tile' name='checkboxF'} {if !empty($item.Condition)} {assign var="tit_source" value=$tile.Key} {else} {assign var="tit_source" value=$tile.ID} {/if} {if $item.Opt1 || $tit_source|in_array:$item.source} <li title="{$lang[$tile.pName]}" class="{if $tit_source|in_array:$item.source}active{/if}"> <img src="{$rlTplBase}img/blank.gif" alt="" />{$lang[$tile.pName]} </li> {/if} {/foreach} </ul> {else} {$item.value} {/if} </div></div>
<!-- field output tpl end -->

Curtis
April 8, 2015, 05:11 AM
Or you can remove this fields in php via listing_details.inc.php file (/includes/controllers/listing_details.inc.php)

1. open file and find row (~145):



$listing = $rlListings -> getListingDetails( $category_id, $listing_data, $listing_type );


2. add following code after it:



foreach ($listing as $g_key => $g_value) { foreach ($g_value['Fields'] as $f_key => $f_values) { if ($f_values['Type'] == 'checkbox' && $listing_data[$f_values['Key']]) { $all_values = $f_values['Values']; $source_values = $f_values['source'];
if ($all_values && $source_values) { foreach ($source_values as $key1 => $value1) { if ($all_values[$value1]) { $exist_values[$value1] = $all_values[$value1]; } } }
if ($exist_values) { $listing[$g_key]['Fields'][$f_key]['Values'] = $exist_values; } } }}