Support Forums - Classified Ads Script Osclass
Osclass theme support => Zara Osclass Responsive Theme => Topic started by: Daniel PM on May 02, 2017, 10:44:07 PM
-
Hi frosticek, I would like to know wich file can I modify in order to add the city to the inferior part of each 'latest item' shown in main page, just in case the user don't select 'location' filter. Let me send you an image to explain myself better.
Thanks in advance ;D
(http://i.imgur.com/6uuPPH1.jpg)
-
@DanielPM
Listings are generated in:
loop-single.php
loop-single-premium.php
-
This is the answer I was expecting....Try adding it up to the next Zara theme update as an option, it will increase the theme value.
loop-single.php
locate
<?php if(osc_count_item_resources()) { ?>
<?php if(osc_count_item_resources() == 1) { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>"><img class="lazy" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_item_title()); ?>" alt="<?php echo osc_esc_html(osc_item_title()); ?>" /></a>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>">
<?php for ( $i = 0; osc_has_item_resources(); $i++ ) { ?>
<?php if($i <= 1) { ?>
<img class="lazy link<?php echo $i; ?>" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_item_title()); ?>" alt="<?php echo osc_esc_html(osc_item_title()); ?>" />
<?php } ?>
<?php } ?>
</a>
<?php } ?>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>"><img class="lazy" src="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" data-original="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" title="<?php echo osc_esc_html(osc_item_title()); ?>" alt="<?php echo osc_esc_html(osc_item_title()); ?>" /></a>
<?php } ?>
and replace for
<?php if(osc_count_item_resources()) { ?>
<?php if(osc_count_item_resources() == 1) { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>"><img class="lazy" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html
(osc_item_title()); ?>" alt="<?php echo osc_esc_html(osc_item_title()); ?>" /></a>
<span><?php echo osc_item_city(); ?></span>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>">
<?php for ( $i = 0; osc_has_item_resources(); $i++ ) { ?>
<?php if($i <= 1) { ?>
<img class="lazy link<?php echo $i; ?>" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_item_title()); ?>" alt="<?php
echo osc_esc_html(osc_item_title()); ?>" />
<?php } ?>
<?php } ?>
</a>
<span><?php echo osc_item_city(); ?></span>
<?php } ?>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_item_url(); ?>"><img class="lazy" src="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" data-original="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>"
title="<?php echo osc_esc_html(osc_item_title()); ?>" alt="<?php echo osc_esc_html(osc_item_title()); ?>" /></a>
<span><?php echo osc_item_city(); ?></span>
<?php } ?>
************************************************************************************************
loop-single-premium.php
locate
<?php if(osc_count_premium_resources()) { ?>
<?php if(osc_count_premium_resources() == 1) { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>"><img class="lazy" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html
(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>">
<?php for ( $i = 0; osc_has_premium_resources(); $i++ ) { ?>
<?php if($i <= 1) { ?>
<img class="lazy link<?php echo $i; ?>" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php
echo osc_esc_html(osc_premium_title()); ?>" />
<?php } ?>
<?php } ?>
</a>
<?php } ?>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>"><img class="lazy" src="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" data-original="<?php echo osc_current_web_theme_url('images/no-image.png'); ?
>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
<?php } ?>
and replace for this:
<?php if(osc_count_premium_resources()) { ?>
<?php if(osc_count_premium_resources() == 1) { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>"><img class="lazy" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html
(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
<span><?php echo osc_premium_city(); ?></span>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>">
<?php for ( $i = 0; osc_has_premium_resources(); $i++ ) { ?>
<?php if($i <= 1) { ?>
<img class="lazy link<?php echo $i; ?>" src="<?php echo osc_resource_thumbnail_url(); ?>" data-original="<?php echo osc_resource_thumbnail_url(); ?>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php
echo osc_esc_html(osc_premium_title()); ?>" />
<?php } ?>
<?php } ?>
</a>
<span><?php echo osc_premium_city(); ?></span>
<?php } ?>
<?php } else { ?>
<a class="img-link" href="<?php echo osc_premium_url(); ?>"><img class="lazy" src="<?php echo osc_current_web_theme_url('images/no-image.png'); ?>" data-original="<?php echo osc_current_web_theme_url('images/no-image.png'); ?
>" title="<?php echo osc_esc_html(osc_premium_title()); ?>" alt="<?php echo osc_esc_html(osc_premium_title()); ?>" /></a>
<span><?php echo osc_premium_city(); ?></span>
<?php } ?>
Works like a charm.
Courtesy of Magnettoo (Osclass Full Member)