Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
xDealer

Нумерация страниц в ip.content

Recommended Posts

Всех приветствую,

подскажите как в ip.content включить нумерацию старниц, т.е. сейчас у меня вместо номеров страниц перемещаться можно только по "< Предыдущая страница" и "Следующая страница>". Как вместо них сделать "1, 2, 3 ... 5 далее >"

Share this post


Link to post
Share on other sites
как в ip.content включить

Включить - никак.

 

Написать самостоятельно на базе темлейтов - можно.

Share this post


Link to post
Share on other sites

Понятно, а каких нибудь примеров у Вас нет?

Share this post


Link to post
Share on other sites

Так же интересует нумерация, есть решение?

Share this post


Link to post
Share on other sites

Ну хз... чтото вроде этого

 

 

<if test="$this->caches['ccs_frontpage']['paginate']">	
<div align="center" style="height:40px">	
       <php>
		if( $data['category']['category_id'] )
		{
			$_ttlPgs	= $data['category']['category_records'] ? ceil( $data['category']['category_records'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
		}
		else
		{
			$_ttlPgs	= $data['database']['_fp_count'] ? ceil( $data['database']['_fp_count'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
		}
		$_curPg		= $this->request['p'] ? $this->request['p'] : 1;
		$_nextPg	= $_curPg + 1;
           $_prevPg	= $_curPg - 1;
           $_curPg_m_1 = $_curPg - 1;
           $_curPg_m_2 = $_curPg - 2;
           $_curPg_m_3 = $_curPg - 3;
           $_curPg_m_4 = $_curPg - 4;
           $_curPg_m_5 = $_curPg - 5;
           $_curPg_p_1 = $_curPg + 1;
           $_curPg_p_2 = $_curPg + 2;
           $_curPg_p_3 = $_curPg + 3;
           $_curPg_p_4 = $_curPg + 4;
           $_curPg_p_5 = $_curPg + 5;
	</php>

<table style="width:250px;">
 <tr>
   <td><if test="$this->request['p'] > 1"><a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=1<else />?p=1</if><else />{$data['database']['base_link']}p=1</if>'>1</a> .....</if></td>
   <td><if test="$this->request['p'] AND $this->request['p'] > 1">
			<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=1<else />?p=1</if><else />{$data['database']['base_link']}p={$_prevPg}</if>'><<</a>
	</if></td>
   <td>

<div align="center">
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_5 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_1}<else />?p={$_curPg_m_1}</if><else />{$data['database']['base_link']}p={$_curPg_m_5}</if>'>{$_curPg_m_5}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_4 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_2}<else />?p={$_curPg_m_2}</if><else />{$data['database']['base_link']}p={$_curPg_m_4}</if>'>{$_curPg_m_4}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_3 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_3}<else />?p={$_curPg_m_3}</if><else />{$data['database']['base_link']}p={$_curPg_m_3}</if>'>{$_curPg_m_3}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_2 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_4}<else />?p={$_curPg_m_4}</if><else />{$data['database']['base_link']}p={$_curPg_m_2}</if>'>{$_curPg_m_2}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_1 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_5}<else />?p={$_curPg_m_5}</if><else />{$data['database']['base_link']}p={$_curPg_m_1}</if>'>{$_curPg_m_1}</a> 
</if>

<b style="font-size:14px; color:#060">{$_curPg}</b> 

<if test="$_ttlPgs AND $_curPg < $_ttlPgs">
<if test="$_curPg_p_1 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_1}<else />?p={$_curPg_p_1}</if><else />{$data['database']['base_link']}p={$_curPg_p_1}</if>'>{$_curPg_p_1}</a> 
</if>
<if test="$_curPg_p_2 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_2}<else />?p={$_curPg_p_2}</if><else />{$data['database']['base_link']}p={$_curPg_p_2}</if>'>{$_curPg_p_2}</a> 
</if>
<if test="$_curPg_p_3 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_3}<else />?p={$_curPg_p_3}</if><else />{$data['database']['base_link']}p={$_curPg_p_3}</if>'>{$_curPg_p_3}</a> 
</if>
<if test="$_curPg_p_4 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_4}<else />?p={$_curPg_p_4}</if><else />{$data['database']['base_link']}p={$_curPg_p_4}</if>'>{$_curPg_p_4}</a> 
</if>
<if test="$_curPg_p_5 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_5}<else />?p={$_curPg_p_5}</if><else />{$data['database']['base_link']}p={$_curPg_p_5}</if>'>{$_curPg_p_5}</a> 
</if>
</if> 
</div>     

   </td>
   <td>
   <if test="$_ttlPgs AND $_curPg < $_ttlPgs">
   <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=<else />?p=</if>{$_nextPg}<else />{$data['database']['base_link']}p={$_nextPg}</if>'>>></a>
   </if>
   </td>
   <td>
<if test="$this->request['p'] < $_ttlPgs">..... <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_ttlPgs}<else />?p={$_ttlPgs}</if><else />{$data['database']['base_link']}p={$_ttlPgs}</if>'>{$_ttlPgs}</a>
</if>
</td>
 </tr>
</table>
</div>
</if>

 

 

Код хоть и громоздкий, но работает... Времени на адаптирование нет. Если кто то Адаптирует, будет замечательно.

  • Upvote 1

Share this post


Link to post
Share on other sites

Ну хз... чтото вроде этого

 

 

<if test="$this->caches['ccs_frontpage']['paginate']">	
<div align="center" style="height:40px">	
       <php>
		if( $data['category']['category_id'] )
		{
			$_ttlPgs	= $data['category']['category_records'] ? ceil( $data['category']['category_records'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
		}
		else
		{
			$_ttlPgs	= $data['database']['_fp_count'] ? ceil( $data['database']['_fp_count'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
		}
		$_curPg		= $this->request['p'] ? $this->request['p'] : 1;
		$_nextPg	= $_curPg + 1;
           $_prevPg	= $_curPg - 1;
           $_curPg_m_1 = $_curPg - 1;
           $_curPg_m_2 = $_curPg - 2;
           $_curPg_m_3 = $_curPg - 3;
           $_curPg_m_4 = $_curPg - 4;
           $_curPg_m_5 = $_curPg - 5;
           $_curPg_p_1 = $_curPg + 1;
           $_curPg_p_2 = $_curPg + 2;
           $_curPg_p_3 = $_curPg + 3;
           $_curPg_p_4 = $_curPg + 4;
           $_curPg_p_5 = $_curPg + 5;
	</php>

<table style="width:250px;">
 <tr>
   <td><if test="$this->request['p'] > 1"><a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=1<else />?p=1</if><else />{$data['database']['base_link']}p=1</if>'>1</a> .....</if></td>
   <td><if test="$this->request['p'] AND $this->request['p'] > 1">
			<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=1<else />?p=1</if><else />{$data['database']['base_link']}p={$_prevPg}</if>'><<</a>
	</if></td>
   <td>

<div align="center">
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_5 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_1}<else />?p={$_curPg_m_1}</if><else />{$data['database']['base_link']}p={$_curPg_m_5}</if>'>{$_curPg_m_5}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_4 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_2}<else />?p={$_curPg_m_2}</if><else />{$data['database']['base_link']}p={$_curPg_m_4}</if>'>{$_curPg_m_4}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_3 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_3}<else />?p={$_curPg_m_3}</if><else />{$data['database']['base_link']}p={$_curPg_m_3}</if>'>{$_curPg_m_3}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_2 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_4}<else />?p={$_curPg_m_4}</if><else />{$data['database']['base_link']}p={$_curPg_m_2}</if>'>{$_curPg_m_2}</a> 
</if>
<if test="$this->request['p'] AND $this->request['p'] AND $_curPg_m_1 > 0">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_m_5}<else />?p={$_curPg_m_5}</if><else />{$data['database']['base_link']}p={$_curPg_m_1}</if>'>{$_curPg_m_1}</a> 
</if>

<b style="font-size:14px; color:#060">{$_curPg}</b> 

<if test="$_ttlPgs AND $_curPg < $_ttlPgs">
<if test="$_curPg_p_1 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_1}<else />?p={$_curPg_p_1}</if><else />{$data['database']['base_link']}p={$_curPg_p_1}</if>'>{$_curPg_p_1}</a> 
</if>
<if test="$_curPg_p_2 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_2}<else />?p={$_curPg_p_2}</if><else />{$data['database']['base_link']}p={$_curPg_p_2}</if>'>{$_curPg_p_2}</a> 
</if>
<if test="$_curPg_p_3 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_3}<else />?p={$_curPg_p_3}</if><else />{$data['database']['base_link']}p={$_curPg_p_3}</if>'>{$_curPg_p_3}</a> 
</if>
<if test="$_curPg_p_4 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_4}<else />?p={$_curPg_p_4}</if><else />{$data['database']['base_link']}p={$_curPg_p_4}</if>'>{$_curPg_p_4}</a> 
</if>
<if test="$_curPg_p_5 <= $_ttlPgs">
<a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_curPg_p_5}<else />?p={$_curPg_p_5}</if><else />{$data['database']['base_link']}p={$_curPg_p_5}</if>'>{$_curPg_p_5}</a> 
</if>
</if> 
</div>     

   </td>
   <td>
   <if test="$_ttlPgs AND $_curPg < $_ttlPgs">
   <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=<else />?p=</if>{$_nextPg}<else />{$data['database']['base_link']}p={$_nextPg}</if>'>>></a>
   </if>
   </td>
   <td>
<if test="$this->request['p'] < $_ttlPgs">..... <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p={$_ttlPgs}<else />?p={$_ttlPgs}</if><else />{$data['database']['base_link']}p={$_ttlPgs}</if>'>{$_ttlPgs}</a>
</if>
</td>
 </tr>
</table>
</div>
</if>

 

 

Код хоть и громоздкий, но работает... Времени на адаптирование нет. Если кто то Адаптирует, будет замечательно.

 

Вроде работает, но не тот вид.

 

Никто за это время другого Варианта не нашел?

 

Вот Оригинал

 


<if test="$this->caches['ccs_frontpage']['paginate']">
       <div class='pagelinks clear clearfix'>
               <php>
                       if( $data['category']['category_id'] )
                       {
                               $_ttlPgs        = $data['category']['category_records'] ? ceil( $data['category']['category_records'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
                       }
                       else
                       {
                               $_ttlPgs        = $data['database']['_fp_count'] ? ceil( $data['database']['_fp_count'] / $this->caches['ccs_frontpage']['limit'] ) : 0;
                       }
                       $_curPg         = $this->request['p'] ? $this->request['p'] : 1;
                       $_nextPg        = $_curPg + 1;
               </php>
               <if test="$_curPg > 1">
                       <div class='left'>
                               <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=<else />?p=</if><else />{$data['database']['base_link']}p=</if>{parse expression="intval($_curPg-1)"}'>{$this->lang->words['frontpage_previouspage']}</a>
                       </div>
               </if>

               <if test="$_ttlPgs AND $_curPg < $_ttlPgs">
                       <div class='right'>
                               <a href='<if test="$data['category']['category_id']">{$data['category']['category_link']}<if test="!$this->settings['use_friendly_urls']">&p=<else />?p=</if>{$_nextPg}<else />{$data['database']['base_link']}p={$_nextPg}</if>'>{$this->lang->words['frontpage_nextpage']}</a>
                       </div>
               </if>
       </div>
</if>

Share this post


Link to post
Share on other sites

Кто нибудь решил данный вопрос для себя?

Share this post


Link to post
Share on other sites

а где находится этот код? может решился вопрос с нумерацией страниц?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...