![]() |
#8
|
|||
|
|||
![]()
Here's an explanation:
In myadopts.php the pagination class uses this to show "pagination" Code:
$total = $mysidia->db->select("owned_adoptables", array("aid"), "aid {$commandIn} AND owner = '{$mysidia->user->username}'")->rowCount(); $pagination = new Pagination($total, 10, "myadopts"); $pagination->setPage($mysidia->input->get("page")); //Sets CURRENT PAGE class input get method used in pagination. I edited styling. Debugging shown in Post #4. Code:
/** * The get method, returns a user input var stored in Input::$get property. * @param String $key * @access public * @return Object */ public function get($key = ""){ if(empty($key) and $this->get instanceof HashMap) { return $this->get; } else { return $this->get->get(new String($key)); } } In the class_userprofile.php, I duplicated what the FULL URL should look like without page #'s. Code:
$strz = $mysidia->path->getTempRoot() . "profile/view/{$mysidia->input->get("user")}/"; //duplicated URL, no page # Code:
$lenn = strlen($strz); Code:
if(strpos($_SERVER['REQUEST_URI'] ,"page-") == $lenn) Code:
$newStr = str_replace($strz . "page-", "", $_SERVER['REQUEST_URI']); Code:
$pagination->setPage($newStr); In USE: Code:
$newStr = ""; $strz = $mysidia->path->getTempRoot() . "profile/view/{$mysidia->input->get("user")}/"; $lenn = strlen($strz); if(strpos($_SERVER['REQUEST_URI'] ,"page-") == $lenn) { $newStr = str_replace($strz . "page-", "", $_SERVER['REQUEST_URI']); } //use pagination class. set URL. SET PAGE its on. Show pagination navigation. $pagination = new Pagination($total, 10, "profile/view/{$mysidia->input->get("user")}"); $pagination->setPage($newStr); $document->addLangvar($pagination->showPage());
__________________
|
|
|
What's New? |
What's Hot? |
What's Popular? |