[pLog-svn] r3871 - plog/trunk/class/template/smarty/plugins

Oscar Renalias oscar at renalias.net
Mon Aug 14 08:41:48 GMT 2006


Oh sorry, I remember fixing all this but I must have forgotten to
commit the changes...

On 8/14/06, mark at devel.lifetype.net <mark at devel.lifetype.net> wrote:
> Author: mark
> Date: 2006-08-14 07:45:21 +0000 (Mon, 14 Aug 2006)
> New Revision: 3871
>
> Modified:
>    plog/trunk/class/template/smarty/plugins/function.pager.php
> Log:
> Fixed the pager bug.
>
> Modified: plog/trunk/class/template/smarty/plugins/function.pager.php
> ===================================================================
> --- plog/trunk/class/template/smarty/plugins/function.pager.php 2006-08-13 18:48:11 UTC (rev 3870)
> +++ plog/trunk/class/template/smarty/plugins/function.pager.php 2006-08-14 07:45:21 UTC (rev 3871)
> @@ -62,11 +62,11 @@
>         $add_prevnext_text = true;
>         $on_page = $pager->getCurrentPage();
>
> +       $page_string = '';
>         if( $style == "links" ) {
>                 if ( $total_pages == 1 )
>                         return '';
>
> -               $page_string = '';
>                 if ( $total_pages > 10 )
>                 {
>                         $init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages;
> @@ -117,7 +117,7 @@
>
>                 if ( $add_prevnext_text ) {
>                         if ( $on_page > 1 ) {
> -                               $page_string = ' <a class="pagerLinkPrevPage" href="'.$base_url.( $on_page - 1 ).'">'.$prevText.'</a>&nbsp;&nbsp;'.$page_string;
> +                               $page_string .= ' <a class="pagerLinkPrevPage" href="'.$base_url.( $on_page - 1 ).'">'.$prevText.'</a>&nbsp;&nbsp;'.$page_string;
>                         }
>
>                         if ( $on_page < $total_pages ) {
> @@ -129,7 +129,6 @@
>         elseif( $style == "list" ) {
>                 $page_string .= "
>                 <script type=\"text/javascript\">
> -                       {literal}
>                         function onPagerListChange(list)
>                         {
>                                 var index = list.selectedIndex;
> @@ -137,7 +136,6 @@
>                                 top.location.href = value;
>                                 return true;
>                         }
> -                       {/literal}
>                 </script>
>                 <span class=\"pager\">";
>                 if( !$pager->isFirstPage() && !$pager->isEmpty()) {
> @@ -145,7 +143,7 @@
>                            <a href=\"".$pager->getPrevPageLink()."\"><img src=\"imgs/admin/icon_left-16.png\" alt=\"$prevText\" /></a>
>                          </span>";
>                 }
> -               $page_string = "<select name=\"plogPager\" id=\"plogPager\" onChange=\"onPagerListChange(this)\"";
> +               $page_string .= "<select name=\"plogPager\" id=\"plogPager\" onChange=\"onPagerListChange(this)\"";
>                 if( $pager->isEmpty()) {
>                         $page_string .= "disabled=\"disabled\"";
>                 }
> @@ -168,12 +166,12 @@
>         }
>         elseif( $style == "prevonly" ) {
>                 if (!$pager->isFirstPage() && !$pager->isEmpty()) {
> -                  $page_string = "<a class=\"pagerLinkPrevPage\" href=\"".$pager->getPrevPageLink()."\">$prevText</a>&nbsp;";
> +                  $page_string .= "<a class=\"pagerLinkPrevPage\" href=\"".$pager->getPrevPageLink()."\">$prevText</a>&nbsp;";
>                 }
>         }
>         elseif( $style == "nextonly" ) {
>                 if (!$pager->isLastPage() && !$pager->isEmpty()) {
> -                  $page_string = "<a class=\"pagerLinkNextPage\" href=\"".$pager->getPrevPageLink()."\">$nextText</a>&nbsp;";
> +                  $page_string .= "<a class=\"pagerLinkNextPage\" href=\"".$pager->getPrevPageLink()."\">$nextText</a>&nbsp;";
>                 }
>         }
>         else {
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list