![]() |
Pagination Help..
I am having trouble getting the pagination class to work in class_profile.php
I have the following code: Code:
$total = $mysidia->db->select(DUMMY_TEXT")->rowCount(); http://www.afangame.com/dirty/pagination.png It navigates the to the page; url = www.dummyurl.com/profile/view/siminator/page-5 I can't fetch page #5 for some reason =0... Any ideas. |
Nobody has any ideas?
|
I don't know how to use the pagination class, sorry. =/ I'd love to have it work on the profiles, too. I ended up using an iframe and I hate my solution.
|
It seems like the problem lies in the class_input.php file
In class_userprofile.php I got this line Code:
$mysidia->input->get("page") Code:
/** Output: Quote:
Page is always blank... I must be missing something. |
I guess I am going to try a little work-a-round. Going to add a line or two to mod-rewrite.
Will keep ya'll posted especially you @kyttias |
I came up with a workable solution without I-frames or mod rewritting. Not much code needed. Here it is for profile pages:
The first three lines are just incase a user has a name with "page-" in it. It would totally screw up the script. Code:
$strz = $mysidia->path->getTempRoot() . "profile/view/{$mysidia->input->get("user")}/"; |
Hmm... so what are all the steps we need to go through?
It'd be awesome if you could post your findings as an actual mod! :usedusedused: |
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(); class input get method used in pagination. I edited styling. Debugging shown in Post #4. Code:
/** 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 = ""; |
Where should this code go inside what file? I'm still not clear on how to use this information to paginate the user pets on the profile. :desudesudesu:
|
Quote:
|
All times are GMT -5. The time now is 10:15 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.