Author Topic: section "Аnswer"  (Read 543 times)

Offline azsxsaz13

  • Hero Member
  • *****
  • Posts: 44
  • Karma: +0/-0
section "Аnswer"
« on: January 17, 2014, 02:31:20 AM »
Is there any restriction on display answers in this section and how to limit 5 example. now becomes a long list.

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 493
  • Karma: +7/-1
Re: section "Аnswer"
« Reply #1 on: January 17, 2014, 04:46:59 AM »
Hello,

On which page?

Offline azsxsaz13

  • Hero Member
  • *****
  • Posts: 44
  • Karma: +0/-0
Re: section "Аnswer"
« Reply #2 on: January 17, 2014, 05:19:51 AM »
Hi, Alexa
in resolved.php


Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 493
  • Karma: +7/-1
Re: section "Аnswer"
« Reply #3 on: January 17, 2014, 05:27:16 AM »
resolved.php

replace this code:

Code: [Select]
SmartyPaginate::setLimit(15);

with e.g. this code:

Code: [Select]
SmartyPaginate::setLimit(8);


Offline azsxsaz13

  • Hero Member
  • *****
  • Posts: 44
  • Karma: +0/-0
Re: section "Аnswer"
« Reply #4 on: January 17, 2014, 05:38:16 AM »
I tried this, but the section "Answers" which is located in right block does not reduce the numbers

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 493
  • Karma: +7/-1
Re: section "Аnswer"
« Reply #5 on: January 17, 2014, 05:45:36 AM »
answers block

themes/default/resolved.php


replace this code:

Code: [Select]
{foreach from=$reviews item=comm}
{if $comm.ctexte eq true}
<div id="ha5">
{if $comm.comimage neq '0'}
<img src="{$sitepath}/minthumb/{$comm.comimage}" alt="{$comm.commid}" height="25px" width="25px" border="0px" />
{else}
<img src="themes/{$themes}/styles/images/noavatar25.png" alt="{$comm.commid}" width="25px" height="25px" border="0px" />
{/if}
{if $rewritemod == 1}
<span class="ha3"><a href="{$comm.comrev}-{$comm.chelper}.html">{$comm.commid}</a></span>
{/if}
{if $rewritemod == 2}
<span class="ha3"><a href="article.php?name={$comm.comrev}">{$comm.commid}</a></span>
{/if}
{$comm.ctexte|stripslashes|truncate:230|bbcode3html|wordwrap:26:"\n":true}<br />
<div id="realysmall">{$comm.cdate|date_format:"%A, %B %e, %Y, %H:%M:%S"}</div>
</div>
{/if}
{/foreach}


with this code:


Code: [Select]
{foreach from=$reviews item=comm}
{if $comm@index < 5}
{if $comm.ctexte eq true}
<div id="ha5">
{if $comm.comimage neq '0'}
<img src="{$sitepath}/minthumb/{$comm.comimage}" alt="{$comm.commid}" height="25px" width="25px" border="0px" />
{else}
<img src="themes/{$themes}/styles/images/noavatar25.png" alt="{$comm.commid}" width="25px" height="25px" border="0px" />
{/if}
{if $rewritemod == 1}
<span class="ha3"><a href="{$comm.comrev}-{$comm.chelper}.html">{$comm.commid}</a></span>
{/if}
{if $rewritemod == 2}
<span class="ha3"><a href="article.php?name={$comm.comrev}">{$comm.commid}</a></span>
{/if}
{$comm.ctexte|stripslashes|truncate:230|bbcode3html|wordwrap:26:"\n":true}<br />
<div id="realysmall">{$comm.cdate|date_format:"%A, %B %e, %Y, %H:%M:%S"}</div>
</div>
{/if}
{/if}
{/foreach}

Offline azsxsaz13

  • Hero Member
  • *****
  • Posts: 44
  • Karma: +0/-0
Re: section "Аnswer"
« Reply #6 on: January 17, 2014, 06:01:45 AM »
thank Alexa. it works  :)