Pagination in Manage Connections

14 years 2 months ago #41829 by parth
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 - sales@tekdi.net
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

Please Log in to join the conversation.

14 years 2 months ago #43147 by roverradio
Replied by roverradio on topic Re:Get the Pagination hack for Manage Connections
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

Please Log in to join the conversation.

13 years 9 months ago #53585 by cymbios
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!"

Please Log in to join the conversation.

13 years 9 months ago #53593 by cymbios
Replied by cymbios on topic Re:Pagination in Manage Connections
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:1]/****************** 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:1]

[code:1]/******************* PAGINATION LINKS START *********************/
// include standard Joomla page navigation class
require_once( $GLOBALS . '/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 *********************/[/code:1]

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!"

Please Log in to join the conversation.

13 years 6 months ago #60521 by roverradio
Replied by roverradio on topic Re:Pagination in Manage Connections
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!

Please Log in to join the conversation.

13 years 6 months ago #60523 by roverradio
Replied by roverradio on topic Re:Pagination in Manage Connections
SOLVED:

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

[code:1]// base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections";[/code:1]

To:

[code:1]// base link
$pagingLink = "index.php?option=com_comprofiler&task=manageConnections&tab=Connections";[/code:1]

If your tab is named something else, replace "Connections" with whatever your tab is called, such as "Friends" etc.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.182 seconds

Facebook Twitter LinkedIn