(#1)
c0rrupt Offline
Administrator
 
Posts: 192
Join Date: Mar 2010
Location: Canada
Pagination First Last (one more version) - 11-07-2010, 10:38 AM

by jomasaco on Sun Jun 13, 2010



Code:
    <?php
    /*BEGIN_INFO
    Show the First,Previews,Next,Last on Pagination
    Stugas-ddl.org
    END_INFO*/
    if(!defined("WCDDL_GUTS"))
        exit;
        $modEnabled = true; //Change to false if don't use
        if($modEnabled) {    
        $add = array('site' => 'index.php?page=[PAGE]&site=[SITE]',);
        $core->pageURLs = array_merge($core->pageURLs, $add);    
        function firstlast($html) {
        global $core;
           $start = ''; $prev =''; $next =''; $end = '';
            if ($core->page > 11) {
           $start = '<a href="index.php?page=1';
           if(isset($core->type) && $type != "All"){ $start .= '&type='.$core->type; }
           if(isset($core->q)){ $start .= '&search='.urlencode(strip_tags($core->q)); }
           if(isset($core->site)){ $start .= '&site='.$core->site; }
           $start .= '">«First</a>';
           }
            if ($core->page > "1") {
           $prev = '<a href="index.php?page='.($core->page-1).'';
           if(isset($core->type) && $type != "All"){ $prev .= "&type=".$core->type; }
           if(isset($core->q)){ $prev .= "&search=".urlencode(strip_tags($core->q)); }
           if(isset($core->site)){ $prev .= "&site=".$core->site; }
           $prev .= '">‹Previous</a>';
           }
           if ($core->page < $core->maxPages) {
           $next = '<a href="index.php?page='.($core->page+1).'';      
           if(isset($core->type) && $type != "All"){ $next .= "&type=".$core->type; }
           if(isset($core->q)){ $next .= "&search=".urlencode(strip_tags($core->q)); }
           if(isset($core->site)){ $next .= "&site=".$core->site; }
           $next .= '"> Next›</a>';
           }
           if ($core->page < ($core->maxPages-10)) {
           $end = '<a href="index.php?page='.$core->maxPages;      
           if(isset($core->type) && $type != "All"){ $end .= "&type=".$core->type; }
           if(isset($core->q)){ $end .= "&search=".urlencode(strip_tags($core->q)); }
           if(isset($core->site)){ $end .= "&site=".$core->site; }
           $end .= '"> Last»</a>';
           }
           if(!empty($core->numRows)){
        $html = $start.$prev.$html.$next.$end;
        if($core->maxPages > 1) {
      $html.='
Page['.$core->page.'] of ['.$core->maxPages.']'; }}
        return $html;
        }
      }
        $core->attachDataHook("pageHTMLData","firstlast")
    ?>


Before doing any edits to your DDL Site always make a BACKUP first.

Bookmarks

Tags
pagination, version

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin


Content Relevant URLs by vBSEO