Posted in API Libraries on December 7th, 2011 by admin – Be the first to comment
EasyGoogleMaps is a free library that you can download and use to ease the use of Google Maps in your PHP applications. This PHP class can also be used in CodeIgniter by loading it as a CodeIgniter Library.
require'EasyGoogleMap.class.php';
$key ="XXX";
$maps = & new EasyGoogleMap($key);
$maps->SetMapZoom(10);
$maps->SetAddress("rambla, montevideo, uruguay");
$maps->SetInfoWindowText("First address");
Pass your $maps object to the view and then in your view or HTML page you can use it in this way:
<html>
<head>
<title>Google Maps example using EasyGoogleMaps</title>
<?php echo $maps->GmapsKey(); ?>
</head>
<body>
<?php echo $maps->MapHolder(); ?>
<?php echo $maps->InitJs(); ?>
<?php echo $maps->UnloadMap(); ?>
</body>
</html>
In CodeIgniter you can place the EasyGoogleMaps library in your libraries folder and then use $this->load->library(‘EasyGoogleMaps’, $key); to load it.
Download EasyGoogleMaps
Posted in Articles on November 17th, 2011 by admin – Be the first to comment
jParallax is a great jQuery library that we can use to convert a selected element into a window or viewport. All its children into absolutely positioned layers that can be seen through the viewport with a nice effect as an outcome.

http://webdev.stephband.info/parallax.html
Posted in Articles on October 28th, 2011 by admin – Be the first to comment
A Vanity URL is a URL approach used in many websites to make shorter URLs for example to access user’s profiles.
You can create personalized Vanity URL in CodeIgniter applications in different ways. In CodeIgniter 1.7.x and 2 you can override the routes class to include a custom code, as pointed here.
SosInformatico extended the Route class to support vanity URL under a project using HMVC. You can learn more about this approach here, despite the webpage is in Spanish.
What is the advantage of using Vanity URL in CodeIgniter or any other application?
Some application architects and also SEO experts use the vanity URL for username like in Social networking sites like MySpace, Twitter, Facebook and many other to avoid the /user/ segment in the URL and make them shorter.
This may have some benefits if you want for example avoid someone to run a site:<yoursite>/user/ and get a big list of users indexed in the search engine but also to uniform the URLs making them more clear to the end user and easier to remember. One of the major benefits of vanity URL in twitter is that easily you can access the Twitter page for a given user by just adding the username after the domain name.
Posted in Articles on September 13th, 2011 by admin – Be the first to comment
Damian from gostomski.co.uk posted an interesting example about how to use hooks to collect simple stats in a CodeIgniter application. The example shows us how to collect stats from a website using our own stats database table to track things like project Id, session Id, etc. instead of using Google Analytics or other web analysis or reporting tool.
He used this approach to track stats in a project management tool but this idea can also be used to track any other variables in your own CI application using hooks, for example if you have a job listing project and want to keep track of number of views for a particular listing or under a given session you can also use an approach like this one.
Of course, you can also try to use Google Analytics, in particular the Event Tracking and Custom variable tracking that helps you adding more analytics tracking support to your GA reports.
Posted in Articles on August 22nd, 2011 by admin – Be the first to comment
This problem with error message You did not select a file to upload is originally caused by the fact that you are trying to upload multiple files but do_upload() without parameters is used in the controlled. If this is the case, try specifying the name of your input, in the following way.
if you are using:
$this->upload->do_upload();
replace it by:
$this->upload->do_upload("input_field_name");
Then, try again.