|
|
|
Get the Pagination hack for Manage Connections
|
|
Date: 2007/03/10 06:56
|
By: parth
|
Status: User
|
|
|
Karma: 1  
|
|
Junior Joomlapolitan  | Posts: 48 |   | |
|
Hello Everyone.
Didnt get time to work on it myself as the main CB project i was working on had a large no of modifications in itself. So finally i got it done from a freelancer called Andrej (Russia). You can get him at Joomlancers. Definitely recommended.
Posting it here. I hope it will be added to next release of CB. Small fix.
Instructions are as follows, for modified comprofiler.html.php files. For unmodified ones, patched file is attached.
To enable pagination in CommunityBuilder, you need to edit the comprofiler.html.php file located at '/components/com_profiler'. Find the following code around line 1542 ('---' separates code here):
--- <th style='text-align:center;'><?php echo _UE_CONNECTION; ?></th> <th style='text-align:center;'><?php echo _UE_CONNECTIONTYPE; ?></th> <th style='text-align:center;'><?php echo _UE_CONNECTIONCOMMENT; ?></th> </tr></thead> <tbody> <?php ---
Exactly after '<?php' tag insert this:
--- /*** PREPARE PAGINATION START ***/ // number of connections per page define('P_CONNECTIONS_PER_PAGE', 4); global $Itemid, $limitstart, $limit; // total number of connections $total = count($connections); // index of the first displayed connection $limitstart = $limitstart ? $limitstart : 0; $limit = $limit ? $limit : P_CONNECTIONS_PER_PAGE; // modify array to contain only connections for this page $connections = array_slice($connections, $limitstart, $limit); /*** PREPARE PAGINATION END ***/ ---
Then scroll down till you find the following code (around line 1600 after first edit):
--- echo "n</tr>"; $i= ($i==1) ? 2 : 1; } echo "</tbody>"; echo "</table><br />"; ---
After 'echo "</table><br />";' insert this:
--- /*** 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 $link = "index.php?option=com_comprofiler&Itemid=$itemid&task=manageConnections"; // display pagination bar echo '<center>' . $pageNav->writePagesLinks( $link ) . '</center>'; /*** PAGINATION LINKS END ***/ ---
Save the file. Enjoy.
Hope this will be helpful.
Regards
Parth Lawate 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/03/10 06:58
|
By: parth
|
Status: User
|
|
|
Karma: 1  
|
|
Junior Joomlapolitan  | Posts: 48 |   | |
|
You can see the site along with a lot of CB profile view enhancements at visacismag.com You can also see a preview of the pagination links there. 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/03/28 03:25
|
By: tonymillan
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 20 |   | |
|
The code does not work properly.
It does give you 4 connections per page, or whatever number you define, but when you click on the next page, to see the next 4 connections, you are taken to the same page and still see the first 4 connections.
I tried manually hacking comprofile.html.php and also tried uploading the file with no luck.
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:Get the Pagination hack for Manage Connections
|
|
Date: 2007/03/28 04:00
|
By: parth
|
Status: User
|
|
|
Karma: 1  
|
|
Junior Joomlapolitan  | Posts: 48 |   | |
|
Thats funny, A it works on all the sites i tried it on. Have you put in the Pagination menu ( page links) in the correct place? 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/03/30 02:46
|
By: roverradio
|
Status:
|
|
|
Karma: 2  
|
|
Junior Joomlapolitan  | Posts: 30 |   | |
|
|
Same result here. Paginates correctly, but navigation buttons (next, page numbers, etc.) just display the first connections.
|
|
The administrator has disabled public write access. |
|
|
|
Re:Get the Pagination hack for Manage Connections
|
|
Date: 2007/07/15 04:46
|
By: dartagnan
|
Status: User
|
|
|
Karma: -1  
|
|
Junior Joomlapolitan  | Posts: 46 |   | |
|
Ok this patch works fine but, I disabled most of my modules on cb profiles and when I click on some of my friends on the first page, no problem, but If I go on the last page of friends for example and click on one profile, I get all the modules like in the frontpage....
why's that?
thanks a lot for any help Planet Asia Asian tradition culture and community
|
|
The administrator has disabled public write access. |
|
|