Sunday, February 12, 2012

For getting entry script file path in Yii

If you want to return entry script file path (www directory without index.php), you can use the following code. It works great.

dirname(Yii::app()->request->scriptFile);


This results in the full directory names of the web root.
e.g. /home/example.org/www/yii/protected

http://www.yiiframework.com/forum/index.php?/topic/536-basepath-url/page__hl__scriptFile%20__fromsearch__1

The one below returns " /yii/protected/ ".

<?php echo Yii::app()->request->baseUrl; ?>

Monday, February 06, 2012

Yii CListView AJAX filtering

When I was using zii widgets CListView, I came across some problems. When I click on a different page (e.g. page 4), I would get duplicate list views.

This has been fixed specifying the id for this widget. ^___^

See the code example here:
http://www.yiiframework.com/wiki/185/clistview-ajax-filtering/

Saturday, January 14, 2012

Testing TrackStar Application with YII

Chapter 5. Project CRUD
  • Design the database schema to support projects
  • Build the needed tables and all other database objects indentified in the schema
  • Create the Yii AR model classes needed to allow the application to easily interact with the created database table(s)
  • Create the Yii controller class(es) that will house the functionality to:
    a. Create new projects
    b. Fetch a list of existing projects for display
    c. Update metadata on existing projects
    d. Delete existing projects
  • Create the Yii view files and present their logic in a way that will:
    a. Display the form to allow for new project creation
    b. Display a list of all the existing projects
    c. Display the form to allow a user to edit an existing project
    d. Add a delete button to the project listing to allow for project deletion
Chapter 6. Project CRUD
  • Design the database schema to support projects
  • Build the needed tables and all other database objects indentified in the schema
  • Create the Yii AR model classes needed to allow the application to easily interact with the created database table(s)
  • Create the Yii controller class(es) that will house the functionality to:
    a. Create new projects
    b. Fetch a list of existing projects for display
    c. Update metadata on existing projects
    d. Delete existing projects
  • Create the Yii view files and present their logic in a way that will:
    a. Display the form to allow for new project creation
    b. Display a list of all the existing projects
    c. Display the form to allow a user to edit an existing project
    d. Add a delete button to the project listing to allow for project deletion
Source: Agile Web Application Development with Yii 1.1 and PHP5

Tuesday, January 10, 2012

Basic Setup to using Yii Framework

1. Install Yii Framework
2. Setup User-friendly URLs
http://www.yiiframework.com/doc/guide/1.1/en/topics.url
3. Using Gii for automatic code generation tool
http://www.yiiframework.com/doc/guide/1.1/en/topics.gii
4. Set DB information in localhost/your_project/protected/config/main.php

In running the command line, make sure to add
* path="c:\xampp\php" or path to php

Now basic preparation for web application is set in place. ^___^

Monday, January 09, 2012

Using MySQL Workbench

I am using MySQL Workbench for Entity-Relationship Diagramming (ERD) tool to plan and make blueprint of my new web project. It's a great tool for any database work with MySQL.

Friday, May 20, 2011

Setup for Yii

Here are some of things that I am working on now.

1. Web Server Stack (XAMPP) - upgraded PEAR, added APC and memcache extensions, installed PHPunit, xdebug extension
2. SDK - Software Development Kit (JDK - Java Development Kit)
3. IDE - Integrated Development Environment (NetBeans), added SeleniumRC and Mercurial (version control) by getting the NetBeans plugins

For your reference, APC and memcache extensions for PHP are here: http://downloads.php.net/pierre/

Monday, July 03, 2006

Conditional Comment in HTML

CSS Conditions (using if, less than & greater than)

http://www.quirksmode.org/css/condcom.html

Change css files according to the browser that the user is using.

The example shown above didn't work for me, so I used javascript to print appropriate css files.

Web Statistics and Trends

What is the trend in browser usage, operating systems and screen resolution?
Here is a link to web statistics by W3Schools.
http://www.w3schools.com/browsers/browsers_stats.asp

Web Statistics and Trends

Statistics are important information. What you can read from the statistics below is that Internet Explorer 6 is the dominating browser, XP is the most popular operating system, and most users are using a display with 1024x768 pixels or more, with a color depth of at least 65K colors.

June 2006

Saturday, August 20, 2005

Future Leaders' Must Have's

Do you want to be a good leader? What would be a few characteristics of future leaders?

Let's take a look at the untapped world of Internet.

First of all, we must utilize Internet as a tool for evangelism. Younger generations rely on Internet for their friendly source of information or for communication purposes. Nowadays, many young Christian leaders use Internet to gain knowledge for their churches, ministries, or their organizations. Now is the time for the word to enter the extensive network called Internet and provide young thirsty souls with the guidance that they need for their spiritual growth.

Good leaders must manage their websites' contents well. The website has to be constantly updated in order to bring in many readers. Then, the content in the website will be carried affectively.

Second of all, remember the world needs the message the most. As written in the Book of Amos, the time will come and has come when there is famine of not hearing the word of the Lord. People need the message of God. We must convey the message through the new medium, Internet.

Third, the website needs to be ascetically appealing to the readers. The leaders need artistic sense. Technology will advance and every one will catch up to the technology. However, we must draw attention through well-organized contents and appealing websites.

With this in mind, let us become leaders that can success in brining many back to Christ.

Friday, August 19, 2005

Church Growth Movement in the 21st century

I read very interesting article about the Church Growth Movement in the 21st century.

In former decades, the goal of the Church Growth Movement and its leaders was to build megachurches for the stated purpose of reaching the lost and impacting the community for Christ. But now speakers suggested that the church is to "go global"; and, as we shall see, this does not mean sending out missionaries to preach the Gospel and establish local, indigenous churches. Rather, this new global approach entails using the resources of the church to change societies through effecting social, economic and political justice—in other words, to further "establish God's kingdom on earth."

You can read the full article here.