| 
Welcome, Guest

Pagination in Manage Connections
(1 viewing) (1) Guest

TOPIC: Pagination in Manage Connections

Re:Get the Pagination hack for Manage Connections 4 years, 6 months ago #41829

  • Posts:
  • Karma:
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 us mail! www.tekdi.net - This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Our CB extensions :
CB Adsense , CB User RSS, CB-Eventlist My Events & CB-Eventlist Attended Events, CB Network Suggest
-----------------------------------------------------------
Joomla Extensions, Training & Support
techjoomla.com/
-----------------------------------------------------------
Check Out our Joomla extensions at extensions.joomla.org/extensions/owner/tekdi/1
extensions.joomla.org/extensions/owner/techjoomla/1
The topic has been locked.

Re:Get the Pagination hack for Manage Connections 4 years, 6 months ago #43147

  • Posts:
  • Karma:
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 topic has been locked.

Re:Get the Pagination hack for Manage Connections 4 years, 1 month ago #53585

  • Posts:
  • Karma:
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 topic has been locked.

Re:Pagination in Manage Connections 4 years, 1 month ago #53593

  • Posts:
  • Karma:
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:

/****************** 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 *********************/


/******************* 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 topic has been locked.

Re:Pagination in Manage Connections 3 years, 10 months ago #60521

  • Posts:
  • Karma:
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 topic has been locked.

Re:Pagination in Manage Connections 3 years, 10 months ago #60523

  • Posts:
  • Karma:
SOLVED:

To keep it on the appropriate tab after going to the next page, change the following line in the above-mentioned hack:

// base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections";


To:

// 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 topic has been locked.
Time to create page: 1.03 seconds