• support[@]kurinchilion.com
  • +1 (888) 666-4252

Tags

cakePHP, codeIgniter: simple method to display array data

Jun 14, 2009 - by kurinchilamp / / Post Comment
var_dump(), print_r() are commonly used functions to display data that is passed across controllers or views when playing in MVC frameworks. As the printed data stretches as a long string, it may be difficult to manipulate the resultset in most cases. When programming in CakePHP or CodeIgniter or other MVC frameworks when you do not want to turn on the debugger routine and want to have a clean display of Array Data you can try adding a simple method in the Controller (appController in cakePHP) as follows (more…)
Continue Reading

cakePHP: Static page handling tips

Jun 12, 2009 - by kurinchilamp / / Post Comment
You can create static pages in cakePHP by adding .ctp files under /app/views/pages folder and can access it using the URI http://sitename/pages/pagename.ctp. Try creating two files page1.ctp and page2.ctp and add those files under /app/views/pages folder. page1.ctp
<h1>Page 1</h1>
<p>Static Content for page 1 goes here</p>
page2.ctp
<h1>Page 1</h1>
<p>Static Content for page 1 goes here</p>
(more…)
Continue Reading

cakePHP: Session enabled messages using Session->setFlash

Jun 09, 2009 - by kurinchilamp / HTML, UI, CSS / Post Comment
There are different ways to flash or publish the messages for a user action. Usability plays a major role in determining how the navigation pattern for a web application takes place.
  • publishing the outcome of user action on the same page
  • designing a single page to flash all success, error, warning, notice level messages
  • designing a separate page for each message that gets published for the user
(more…)
Continue Reading

CakePHP: Parsing RSS feed in Simple Steps

Jun 05, 2009 - by kurinchilamp / / Post Comment
How to read RSS feeds (XML file) and display contents in CakePHP? Parsing an XML feed can be done in simple steps as follows in CakePHP ... CakePHP Controller: /app/controllers/rss_controller.php
<?php
/**
*	CakePHP Controller to parse XML file
*/
class RssController extends AppController{
	var $name = "Rss";
	// As the RSS will not currently use a database
	var $uses = array();
	var $feed_url = "http://kurinchilamp.kurinchilion.com/feed";
	var $rss_item = array();
	
	function index(){
		App::import('Xml');
		$parsed_xml =& new XML($this->feed_url);
		// xml to array conversion
		$this->rss_item = $parsed_xml->toArray();
		$this->set('data', $this->rss_item['Rss']['Channel']['Item']);
	}
}
?>

CakePHP View: /app/views/rss/index.ctp



Continue Reading

CakePHP: Beginners installation hurdles – Errors and Solutions

Jun 04, 2009 - by kurinchilamp / / Post Comment
I thought to mention a few errors beginners into CakePHP might come across when configuring CakePHP and how to resolve Notice: this error is being rendered by the app/views/errors/missing_table.thtml view file, a user-customizable error page. This error occurs when the database is not configured in cakePhp. First create a database in MySQL or the database of your choice. Go to /app/config/ and make a copy of database.php.default and rename it to database.php. Open database.php and give the necessary settings of the new database created with the associated login credentials. Once that is done, refresh the page and see if that error is now resolved. (more…)
Continue Reading

CakePHP: To Check if Mod_rewrite is Disabled

Jun 02, 2009 - by kurinchilamp / / Post Comment
How to check if mod_rewrite is disabled in Apache when CakePHP is installed? Initially when CakePHP is downloaded from sourceforge and is installed in your localhost, you can test if it is working or not by going to the respective directory in your local host http://localhost/cake. If CSS styling is missing in the display page, then check apache server's httpd.conf file to see if mod_rewrite module is enabled. Remove the comment symbol to enable mod_rewrite in your localhost and restart Apache server for the change to take effect (more…)
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.