PHP
  Home arrow PHP arrow Using Code Igniter to Enable Comments in a Blog Application
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Using Code Igniter to Enable Comments in a Blog Application
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 3
    2008-12-30


    Table of Contents:
  • Using Code Igniter to Enable Comments in a Blog Application
  • The application so far
  • Inserting comments with a Blogger controller class method
  • Redefining the blogs_comment_view.php file

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Using Code Igniter to Enable Comments in a Blog Application
    ( Page 1 of 4 )

    Welcome to the fourth episode of the series entitled “Building a Blogger with the Code Igniter PHP framework.” Comprised of seven approachable articles, this series steps you through the development of a blog application using this friendly – yet powerful -- PHP framework. We include copious code samples to demonstrate how to use the MVC pattern to develop a real-world program.

    Introduction

    If you have followed the series this far, then you know that the real-world application we're developing is a MySQL-driven blog application. Thanks to the Code Igniter PHP framework, we should be able to develop this application in a relatively short time, without having to spend long hours writing complex classes and functions.

    Now that you have been introduced to the main goal of this series, it's time to recapitulate what we covered in the last article. In that particular tutorial, I explained how to build a blog controller class that was charged with displaying on screen a bunch of blog entries, along with their corresponding comments, previously stored on a pair of MySQL tables.

    In truth, this last process was performed in a pretty simplistic way, since I recreated a hypothetical scenario in which a few comments were already inserted into one of these MySQL tables. I hope that helped to demonstrate how the controller in question embedded this data into a view file for display purposes.

    A decent blog application, however, must provide users with a mechanism that lets them post their comments easily, and the simplest way to do this is via an HTML form. Therefore, in the next few lines, I'll be explaining how to modify the controller class and the comments view file created in the preceding article to incorporate a basic web form that permits users to post comments on a particular blog entry.

    Now, it's time to get rid of the preliminaries and see how to improve the functionality of this blog application by letting users to submit their own comments. Let's jump in!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT