Answer the question
In order to leave comments, you need to log in
Display banner in smarty?
Hello, please tell me, there is a template code that displays a banner between blocks, but it now counts exactly half of the blocks, i.e. if there are 20 blocks on the page, then it divides them in half and displays between 10 and 11 blocks, I don’t understand where to change it, to output, for example, between 5 and 6 or 15 and 16 ...
PHP, as far as I know, has nothing to do with this, at least it is not written in the code and the template is responsible for the output
{if $no_listings>0}
{if $post_array.show=="list"}
{foreach name="listings" from=$listings_array item=v}
{include file="short_listing.html"}
{if ($smarty.foreach.listings.index+1)==$appearance.ads_per_page/2|ceil && $smarty.foreach.listings.index!=$listings_array|@count-1}
{* ------ listings4 banners ------- *}
{if in_array('listings4',$banners_positions)}
{banner->getTemplateBanners p1='listings4' p2=$section p3=$cat p4=$bloc assign='array_banners'}
{if $array_banners|@count}<div class="clearfix mt10 mb10"></div><div class="dcenter">{/if}
{foreach from=$array_banners item=v}
<div class="center">{include file="banner.html" bclass="btypelp_rc"}</div><div class="clearfix"></div>
{/foreach}
{if $array_banners|@count}</div><br/>{/if}{/if}
{* ------- end listings4 banners ------- *}
{/if}
{/foreach}
Answer the question
In order to leave comments, you need to log in
COUNT(DISTINCT `IP`)
Only the number of unique IPs in the general case is not equal to the number of unique visitors.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question