Posted by Johnly on December 22nd, 2008
Group Invitations widget for <a href=”http://elgg.org” title=”Elgg”>elgg1.0</a> is an excellent stuff for listing all the group joining invitations to a member. Group Invitation widget lists all the new invitations and members can click on them to join the groups. We created a widget that displays all the new group invitations a member has. This widget works with all versions elgg1.0. It can be configured to be private or to various degrees of public giving the user the privilege to determine the access of the widget.
To install a widget you can simply go to the widget display gallery on the right side, click on the four direction arrow on the group invitation widget and drag it to the main content area widgets.
Once the Group Invitations widget is in place, you can further customize it by clicking the edit button on the top right of it. When clicked, a configuration menu drops done from the widget header bar with your options. You can select your options and save them as your wish.
<!–download id=”1″–>
Posted by Johnly on December 22nd, 2008
This is an easy Pagination class for CodeIgniter PHP Framework.
I just wanted to implement a pagination script with Codeigniter Framework. I found the default pagination library file within CodeIgniter, but it returned the output as a string of links. But, I needed a different one which returns the out put as an array. I didn’t find anything in this category for CodeIgniter, so I wrote SctPagination.
SctPagination is a simple PHP class which is working together with CodeIgniter Pagination class. It extends the parent class and uses it variables for processing the data.
You can freely <a href=”http://www.surfscripts.com/wp-content/uploads/2007/07/sctpagination.zip” title=”CodeIgniter PaginationV1.0″>download CodeIgniter PaginationV1.0</a> and use it, modify it, delete it…………….
Usage:
step 1.
Download the latest version of sctPagination.
Step 2.
Extract it to your 'system/application/libraries' folder.
Step 3.
Load the pagination class to the application using the Load function of the CodeIgniter Framework.
<code>$this->load->library('sctPagination');</code>
The best way to load is to use it in the Controller constructor.
Step 4.
Define an array for the config varibales.
<code>
$config['base_url'] = site_url('controller/method');//The URL used in the pagination links
$config['total_rows'] = N;//The total number of results that has to be paginated
$config['per_page'] = M;//The number of items to be displayed in each page
//Initializes and loads the basic Pagination class
$this->sctpagination->initialize($config);</code>
/*
It will execute the statement and load the $paginationArray variable with the paginated URLs. You can use this array to display the pagination links in your site.
*/
$paginationArray = $this->sctpagination->getLinksArray();
You can contact me for more support and bugs at : support@surfscripts.com.
Please feel free to drop a comment if you need any modifications on it.
Recent Comments