|
|
|
Re:Get the Pagination hack for Manage Connections
|
|
Date: 2007/07/30 13:38
|
By: parth
|
Status:
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 53 |   | |
|
Hello there,
Sorry for replying so late!
I think it seems to be an item id issue. Did you check if the item id is getting appended properly in the pagination URLs? Php-Nuke to Mambo to Joomla... My Evolution goes on! Need Joomla Development? Drop me a mail!
|
|
The administrator has disabled public write access. |
|
|
|
Re:Get the Pagination hack for Manage Connections
|
|
Date: 2007/08/16 23:32
|
By: roverradio
|
Status:
|
|
|
Karma: 2  
|
|
Junior Joomlapolitan  | Posts: 30 |   | |
|
Itemid is not getting appended, but I just attempted to manually insert it into the URL in the browser's address bar (which should work), but no go - still displays first 4 only (even though limit and start are passed in url accordingly.
Post edited by: roverradio, at: 2007/08/16 23:35
|
|
The administrator has disabled public write access. |
|
|
|
Re:Get the Pagination hack for Manage Connections
|
|
Date: 2008/01/04 11:43
|
By: cymbios
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 2 |   | |
|
Has anyone managed to find a solution for this problem? I applied the hack and have the same problems as everyone else... "Its all fun and games until someone losses an eye!"
|
|
The administrator has disabled public write access. |
|
|
|
Re:Pagination in Manage Connections
|
|
Date: 2008/01/04 13:13
|
By: cymbios
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 2 |   | |
|
OK!!
I messed around with the code that parth had contributed, and got the pagination hack working. Well it works on my site anyway.
Follow the instructions as where defined before but use the following code instead:
| Code: | /****************** PREPARE PAGINATION START ********************/
// total number of connections
$total = count($connections);
// limitstart check
$limitstart = (int) cbGetParam( $_REQUEST, 'limitstart', 0 );
if (empty($limitstart)) {
$limitstart = 0;
}
$limit = 4; //Write number of connections per page here
if ($limit > $total) {
$limitstart = 0;
}
// modify array to contain only connections for this page
$connections = array_slice($connections, $limitstart, $limit);
/******************* PREPARE PAGINATION END *********************/
|
| Code: | /******************* PAGINATION LINKS START *********************/
// include standard Joomla page navigation class
require_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/pageNavigation.php' );
// create the object
$pageNav = new mosPageNav( $total, $limitstart, $limit );
// base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections";
// display pagination bar
echo $pageNav->writePagesLinks( $pagingLink );
/******************* PAGINATION LINKS END *********************/
|
Hope this helps someone out there!
Post edited by: cymbios, at: 2008/01/04 13:16 "Its all fun and games until someone losses an eye!"
|
|
The administrator has disabled public write access. |
|
|
|
Re:Pagination in Manage Connections
|
|
Date: 2008/04/06 21:34
|
By: roverradio
|
Status:
|
|
|
Karma: 2  
|
|
Junior Joomlapolitan  | Posts: 30 |   | |
|
Woo-hoo...that works! I got it displaying on 1.2beta6.
One SMALL problem however...
There are two tabs for the Manage Connections page. Tab 1 is is Connection Requests, Tab 2 is your Connections (which now paginates).
But when you go to the next page of connections on Tab 2, it defaults to displaying Tab 1 after the page load. Clicking tab 2 takes you back to your connections, and they are listed correctly.
Is there any way to make going to the next page of connections on the Connection tab default back to that tab? Make sense?
Any help appreciated!
Thanks!
|
|
The administrator has disabled public write access. |
|
|
|
Re:Pagination in Manage Connections
|
|
Date: 2008/04/06 23:14
|
By: roverradio
|
Status:
|
|
|
Karma: 2  
|
|
Junior Joomlapolitan  | Posts: 30 |   | |
|
SOLVED:
To keep it on the appropriate tab after going to the next page, change the following line in the above-mentioned hack:
| Code: | // base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections";
|
To:
| Code: | // base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections&tab=Connections";
|
If your tab is named something else, replace "Connections" with whatever your tab is called, such as "Friends" etc.
|
|
The administrator has disabled public write access. |
|
|