Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter line47

    (@line47)

    I have this pasted in my page but paging did not work.

    <?php $bookmarks = wp_list_bookmarks('orderby=name&category=8&order=DESC');
    if ($bookmarks) :
       $limit = 20;
       if (isset($_GET['page'])) {
          $page = $_GET['page'];
       } else {
          $page = 1;
       }
       $start = ($page - 1) * $limit;
       $range = 5;
       echo '<ul>';
       for ($i=$start;$i<($start + $limit);++$i) {
          if ($i < sizeof($bookmarks)) {
             echo $bookmarks[$i];
          }
       }
       echo '</li></ul>';
       echo '<br /><br />';
       echo _gur_paginate(sizeof($bookmarks),$limit,$range);
    else:
       echo '<h2>There are no Bookmarks to list</h2>';
    endif;?>
    
    <?php function _gur_paginate($numrows,$limit=10,$range=7) {
    
    	$pagelinks = "<div class=\"pagelinks\">";
       if(isset($_GET['page'])){
          $page = $_GET['page'];
       } else {
          $page = 1;
       }
       // If query_string exists, use &page=, else use ?page= .
       $currpage = $_SERVER['REQUEST_URI'];
       $qstring = preg_replace('/page=\d+/','',$_SERVER['QUERY_STRING']);  // Get rid of previous page=
       if ($qstring) {
          $paramsep = '&';
       } else {
          $paramsep = '?';
       }
    	if ($numrows > $limit) {
    		$currpage = str_replace("&page=".$page,"",$currpage); // Use this for non-pretty permalink
      		$currpage = str_replace("?page=".$page,"",$currpage); // Use this for pretty permalink
    		if($page == 1){
    			$pagelinks .= "<span class=\"pageprevdead\">&laquo; PREV </span>";
    		}else{
    			$pageprev = $page - 1;
    			$pagelinks .= "<a class=\"pageprevlink\" href=\"" . $currpage .
    					"{$paramsep}page=" . $pageprev . "\">&laquo; PREV </a>";
    		}
    		$numofpages = ceil($numrows / $limit);
    		if ($range == "" or $range == 0) $range = 7;
    		$lrange = max(1,$page-(($range-1)/2));
    		$rrange = min($numofpages,$page+(($range-1)/2));
    		if (($rrange - $lrange) < ($range - 1)) {
    			if ($lrange == 1) {
    				$rrange = min($lrange + ($range-1), $numofpages);
    			} else {
    				$lrange = max($rrange - ($range-1), 0);
    			}
    		}
    		if ($lrange > 1) {
    			$pagelinks .= "<a class=\"pagenumlink\" " .
    				"href=\"" . $currpage . "{$paramsep}page=" . 1 .
    				"\"> [1] </a>";
    			if ($lrange > 2) $pagelinks .= "&nbsp;...&nbsp;";
    		} else {
    			$pagelinks .= "&nbsp;&nbsp;";
    		}
    		for($i = 1; $i <= $numofpages; $i++){
    			if ($i == $page) {
    				$pagelinks .= "<span class=\"pagenumon\"> [$i] </span>";
    			} else {
    				if ($lrange <= $i and $i <= $rrange) {
    					$pagelinks .= "<a class=\"pagenumlink\" " .
                            "href=\"" . $currpage . "{$paramsep}page=" . $i .
                            "\"> [" . $i . "] </a>";
    				}
    			}
    		}
    		if ($rrange < $numofpages) {
    			if ($rrange < $numofpages - 1) $pagelinks .= "&nbsp;...&nbsp;";
    				$pagelinks .= "<a class=\"pagenumlink\" " .
    					"href=\"" . $currpage . "{$paramsep}page=" . $numofpages .
    					"\"> [" . $numofpages . "] </a>";
    		} else {
    			$pagelinks .= "&nbsp;&nbsp;";
    		}
    		if(($numrows - ($limit * $page)) > 0){
    			$pagenext = $page + 1;
    			$pagelinks .= "<a class=\"pagenextlink\" href=\"" . $currpage .
                        "{$paramsep}page=" . $pagenext . "\"> NEXT &raquo;</a>";
    		} else {
    			$pagelinks .= "<span class=\"pagenextdead\"> NEXT &raquo;</span>";
    		}
    
       }
    $pagelinks .= "</div>";
    return $pagelinks;
    }
    ?>
    Thread Starter line47

    (@line47)

    I can get the pagination working for posts but I’m not sure how to tell it to pull from the bookmarks, can you help?

    This is what I was using before:

    <?php wp_list_bookmarks('title_li=&categorize=0&category=8&before=<li>&after=</p></li>&show_images=1&orderby=name&order=desc&show_description=1&between=<p class="discogNavTitle">'); ?>

    Thread Starter line47

    (@line47)

    It appears that everything did not upload. I uploaded wp-admin folder again and that fixed the issue thanks!

    Thread Starter line47

    (@line47)

    Thanks! I got it working now! Cheers!

    Thread Starter line47

    (@line47)

    Im actually looking to display the description of the category and show_description is not working for the description of the category but instead for the links inside the category.

    Thread Starter line47

    (@line47)

    Still have not figured a way to resolve this, if anyone has an idea or a post to point me to that would be great!

    Thanks!

    it’s making it though all the scripts but the last it’s getting stalled on

    $panels is null on line 13 of slider.js…
    any ideas?

    I’m having an issue getting a jquery plugin to work.
    I have tried replacing the $ with jquery in all the javascript files without any luck.

    Here is the page I’m trying to get working…
    http://www.line47.com/discography/

    any help would be greatly appreciated.
    Thanks!
    Scott

    I’m using the same slider jquery script as you and I’m having trouble here is the page, http://www.line47.com/discography/

    Any help would be lovely!

    Thanks in advance!

Viewing 9 replies - 1 through 9 (of 9 total)