PDA

View Full Version : WPThemeScript pagination


felit0
05-22-2009, 07:51 PM
The pagination that comes with the WPThemeScript gets a bit messy when you have added hundreds of themes to the database, see http://dinothemes.com/browse.php.

Can you guys help me replace the code:

{foreach from=$pagination item=link}
{$link}
{/foreach}

with a new code that shows something like <First ... 40, 41, 42, 43, 44 ... Last>

Thank You

felit0
05-27-2009, 11:03 AM
Can I get some help regarding this issue? I see you guys purchased this script from the original developer last month, are you planning to continue support for the script?

Thank You

SlickEddie
05-27-2009, 12:14 PM
this is taken from the templating on another script. It just needs to be adapted to wpthemescript


<!-- Page Navigation -->

{if $pages}

<div class="pagenav">

{if $Currentpage== $pages|@count}
{assign var="istart" value=$Currentpage-10}
{/if}

{if $Currentpage== $pages|@count-1}
{assign var="istart" value=$Currentpage-9}
{/if}

{if $Currentpage== $pages|@count-2}
{assign var="istart" value=$Currentpage-8}
{/if}

{if $Currentpage== $pages|@count-3}
{assign var="istart" value=$Currentpage-7}
{/if}

{if $Currentpage < $pages|@count-5}
{assign var="istart" value=$Currentpage-6}
{/if}


{if $Currentpage==1}
{assign var="istop" value=$Currentpage+9}
{/if}

{if $Currentpage==2}
{assign var="istop" value=$Currentpage+8}
{/if}

{if $Currentpage==3}
{assign var="istop" value=$Currentpage+7}
{/if}

{if $Currentpage==4}
{assign var="istop" value=$Currentpage+6}
{/if}

{if $Currentpage==5}
{assign var="istop" value=$Currentpage+5}
{/if}

{if $Currentpage > 5}
{assign var="istop" value=$Currentpage+5}
{/if}


{if $Currentpage > 1}
<span class="prev"><a href="?page={$Currentpage-1}{if $ASBY}&amp;by={$ASBY}{/if}">&laquo; Prev</a></span><span class="seperate">..</span>
<span class="first"><a href="?page=1{if $ASBY}&amp;by={$ASBY}{/if}">1</a></span><span class="seperate">..</span>
{/if}

{section name=number loop=$pages step=1 max=$istop }
{if $smarty.section.number.iteration > $istart}
{if $Currentpage != $smarty.section.number.iteration}<span class="num"><a href="?page={$smarty.section.number.iteration}{if $ASBY}&amp;by={$ASBY}{/if}">{/if}{if $Currentpage == $smarty.section.number.iteration}<span class="current">{/if}{$smarty.section.number.iteration}{if $Currentpage != $smarty.section.number.iteration}</a>{/if}</span>
{/if}
{/section}

{if $Currentpage < $pages|@count}
<span class="seperate">..</span><span class="last"><a href="?page={$pages|@count}{if $ASBY}&amp;by={$ASBY}{/if}">{$pages|@count}</a></span>
<span class="seperate">..</span><span class="next"><a href="?page={$Currentpage+1}{if $ASBY}&amp;by={$ASBY}{/if}">Next &raquo;</a></span>
{/if}

</div>
{/if}

<!-- END -->

felit0
05-28-2009, 09:57 AM
Curiously my license has stopped working after your reply, see http://dinothemes.com

Did you do something to reset or change my license? Please help me get the site back up a.s.a.p.

P.S. I will try your new pagination code once I get the site working again.

SlickEddie
05-28-2009, 11:29 AM
we're going to sort this out.

felit0
05-28-2009, 10:15 PM
The script is working again, the license issue was fixed somehow.

I tried replacing the current pagination code with the one you posted above but it did not work. I assume there are variables which need to be changed for WPThemeScript. Any help modifying the code to work would be appreciated.

SlickEddie
05-28-2009, 11:02 PM
in reviewing this further, we will need to make further mods to the script to enable this feature. We are putting together a list of features for the next "upgrade" of the script and we will certainly include this. The first step is for us to convert you and the other script users to the new licensing.

felit0
08-25-2009, 08:19 PM
A few weeks ago I sent in a support request stating that I'm willing to pay for your programmers to code this feature, I have yet to receive a response. If you do not plan on supporting/developing this script any longer, could you provide the source so I can hire a programmer to code this fix for me?

Thanks

SlickEddie
08-25-2009, 10:30 PM
sent you a PM