Diving in the code of Joomla

26
@package Joomla.Administrator @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights * @license GNU General Public License version 2 or later; see LICENSE.tx */ // Set flag that this is a parent file define(‘_JEXEC’, 1); define(‘DS’, DIRECTORY_SEPARATOR); if (file_exists(dirname(__FILE__) . ‘/defines.php’)) { include_once dirname(__FILE__) . ‘/defines.php’; } if (!defined(‘_JDEFINES’)) { define(‘JPATH_BASE’, dirname(__FILE__)); require_once JPATH_BASE.’/includes/defines.php’; } require_once JPATH_BASE.’/includes/framework.php’; require_once JPATH_BASE.’/includes/helper.php’; require_once JPATH_BASE.’/includes/toolbar.php’; // Mark afterLoad in the profiler. JDEBUG ? $_PROFILER->mark(‘afterLoad’) : null; // Instantiate the application. $app = JFactory::getApplication(‘administrator’); // Initialise the application. $app->initialise(array( e’ => $app->getUserState(‘application.lang’) rved. Release 2.5 by Konstantinos Drougkas UNDERSTAND THE INTERNAL CODE OF JOOMLA MAKE YOUR OWN JOOMLA EXTENSIONS ocelotos PUBLISHING

description

Diving in the code of Joomla examines in a deep and detailed manner the internal code of Joomla and its expansion abilities. It also provides the reader with detailed examples in order to create his/her own Joomla add-ons (components, modules and plug-ins). Finally, it analyzes the whole procedure for the setting of a debugging environment.

Transcript of Diving in the code of Joomla

Page 1: Diving in the code of Joomla

<?php/** * @package

Joomla.Administrator

* @copyright Copyright (C) 2

005 - 2012 Open Source Matters

, Inc. All rights reserved.

* @license GNU General Pub

lic License version 2 or later

; see LICENSE.txt

*/

// Set flag that this is a pare

nt file

define(‘_JEXEC’, 1);

define(‘DS’, DIRECTORY_SEPARATO

R);

if (file_exists(dirname(__FILE_

_) . ‘/defines.php’)) {

include_once dirname(__FILE__)

. ‘/defines.php’;

}

if (!defined(‘_JDEFINES’)) {

define(‘JPATH_BASE’, dirname(_

_FILE__));

require_once JPATH_BASE.’/incl

udes/defines.php’;

}

require_once JPATH_BASE.’/incl

udes/framework.php’;

require_once JPATH_BASE.’/incl

udes/helper.php’;

require_once JPATH_BASE.’/incl

udes/toolbar.php’;

// Mark afterLoad in the profil

er.

JDEBUG ? $_PROFILER->mark(‘aft

erLoad’) : null;

// Instantiate the application

.

$app = JFactory::getApplicatio

n(‘administrator’);

// Initialise the application.

$app->initialise(array(

‘language’ => $app->getUserSta

te(‘application.lang’)

));

// Mark afterIntialise in the

profiler.

<?php/** * @package

Joomla.Administrator

* @copyright Copyright (C) 2

005 - 2012 Open Source Matters

, Inc. All rights reserved.

* @license GNU General Pub

lic License version 2 or later

; see LICENSE.txt

*/

// Set flag that this is a pare

nt file

define(‘_JEXEC’, 1);

define(‘DS’, DIRECTORY_SEPARATO

R);

if (file_exists(dirname(__FILE_

_) . ‘/defines.php’)) {

include_once dirname(__FILE__)

. ‘/defines.php’;

}

if (!defined(‘_JDEFINES’)) {

define(‘JPATH_BASE’, dirname(_

_FILE__));

require_once JPATH_BASE.’/incl

udes/defines.php’;

}

require_once JPATH_BASE.’/incl

udes/framework.php’;

require_once JPATH_BASE.’/incl

udes/helper.php’;

require_once JPATH_BASE.’/incl

udes/toolbar.php’;

// Mark afterLoad in the profil

er.

JDEBUG ? $_PROFILER->mark(‘aft

erLoad’) : null;

// Instantiate the application

.

$app = JFactory::getApplicatio

n(‘administrator’);

// Initialise the application.

$app->initialise(array(

‘language’ => $app->getUserSta

te(‘application.lang’)

));

// Mark afterIntialise in the

profiler.

Diving in the code of Joomla

Diving in the co

de

of Jo

om

la

Release 2.5

by Konstantinos Drougkas

UNDERSTAND THE INTERNAL CODE OF JOOMLA

MAKE YOUR OWN JOOMLA EXTENSIONS

ocelotosPUBLISHING

oce

loto

sPU

BLISHIN

Go

ce

loto

sPU

BLISHIN

G

Konstantinos Drougkas was born in Athens in 1969. He is a graduate of the Patras Institute of Technology (University of Patras) - B.Sc., Computer Engineering (Grade 7,86/Distinction), and he is member of the Hellenic Chamber of Technology (T.E.E.). Konstantinos Drougkas is an experienced computer engineer and teacher residing in the historical city of Athens in Greece. His passion for web development goes back to 2007 when he starts his involvement with Joomla. He has made a significant number of Joomla sites, and in the last two years he has focused on the detailed study of the internal code of Joomla. The combination of his considerable teaching experience, and his deep knowledge of the web, guarantees a pedagogical approach.

Diving in the code of Joomla examines in a deep and detailed manner the internal code of Joomla and its expansion abilities. It also provides the reader with detailed examples in order to create his/her own Joomla add-ons (components, modules and plug-ins). Finally, it analyzes the whole procedure for the setting of a debugging environment.

This book describes step by step the execution of a Joomla session, from its first to the last command. Joomla has seven phases which are analytically presented in it. For the first time in a book can the reader receive such a detailed presentation of the code execution. Every stage of the execution is explained in a clear and thorough way producing a real case study for one of the largest software packages (Content Management System, Joomla). The most important parts of the code and the key commands of every phase are decoded in front of the reader.

Dive in the code of Joomla , acquire a comprehensive view about its internal code and make your own extensions !

Vatatzi 55 str., 114 73 Athens TEL. : +30 210 6431108E-mAiL: [email protected]

www. ocelotos. gr

P U B L i S H i N Gocelotos

ISBN 978-960-564-057-6

[email protected]

K. Drougkas

173 × 240 SPiNE: 15 FLAPS: 80

cover_joomla.indd 1 5/12/2013 2:30:50 PM

Page 2: Diving in the code of Joomla
Page 3: Diving in the code of Joomla

Release 2.5

by Konstantinos Drougkas

ocelotosPUBLISHING

Page 4: Diving in the code of Joomla

TiTle Diving in the code of Joomla AuThor Konstantinos Drougkas Publisher’s sieries Science ediTing Georgina Lavranou book design Myrtilo, graphic arts Copyright© 2013 Konstantinos Drougkas FirsT Published Athens, May 2013 ISBN 978-960-564-057-6

Vatatzi 55 str., 114 73 Athens Τel. : 210 6431108e-mAil: [email protected]

www. ocelotos. gr

This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licens-ing agreements, no reproduction of any part may take place without the written permission of the author and of Ocelotos Publications.

pub l i ca t i onsocelotos

Page 5: Diving in the code of Joomla

Dedicated in loving memory of

Antonis Drougkas and Zozo Zografou

whose invaluable help and presence

has always been a guiding light in my life.

Page 6: Diving in the code of Joomla
Page 7: Diving in the code of Joomla

INTRODUCTION

i have been working in the field of computing for more than 17 years, 7 as system engineer and 10 as an information technology teacher in Greek High schools. All these years both for professional reasons, and as a hobby i have dealt with interesting technical issues like object oriented programming, eRPs, and in the last 3 years with CRms like Joomla. in most of these cases i faced the same problem: After a level of depth there is either no or deficient documentation. if you want to be an expert you have to “dive” in unknown areas without any external help.

As a result, i decided to become a kind of software detective! And the software in this case is the open source Content management System Joomla 2.5 .in the following chapters i will present you what Joomla is but the main purpose of the book is not that. The real target is to explain what is happens inside Joomla. So, this is not a book for people who just want to make a site using that CRm but it is mainly, aimed at people who wonder how the Joomla code works. As you may have guessed there are a lot of people who can build beautiful sites with Joomla but very few of them can understand its code and what happens inside it!

This book is no more than my first attempt to share my experience of the Joomla platform. The first three chapters are a kind of appetizer before the main course which comes in chapters four and five. These are the core units of the book and their aim is to present and explain the sequence of commands in a complete Joomla execution cycle.

Furthermore, there are three chapters with simple examples of Joomla extensions (you can download them freely from my personal site www.effectivesites.gr) and a final one with useful information.

Finally, none of this would have been possible without the help and support of my loving wife Anastasia and the inspiration of our children Antonis-ioannis and eirini.

Page 8: Diving in the code of Joomla
Page 9: Diving in the code of Joomla

ContentsINTRODUCTION ..................................................................................................................................... 7

The Basic Concepts ............................................................................................................................11

Joomla things you have to know ..............................................................................................13

1.1 What is Joomla ............................................................................................................................13

1.2 Setting a windows environment for Joomla .................................................................16

1.3 The installation of Joomla ......................................................................................................20

Setting the debugging environment .....................................................................................27

2.1 What is a debugging environment? .................................................................................27

2.2 eclipse ..............................................................................................................................................27

2.3 Setting eclipse for Joomla debugging .............................................................................28

2.4 Setting the php.ini file .............................................................................................................34

2.5 The PHP Debug Perspective .................................................................................................35

The architecture of Joomla ...........................................................................................................37

3.1 The structure of Joomla Files ................................................................................................37

3.2 A quick look to the mVC pattern of Joomla and its APi (Application Programming interface) ...............................................................................46

3.3 Joomla Database tables ..........................................................................................................47

3.4 Joomla extensions .....................................................................................................................48

The Code of Joomla ...........................................................................................................................53

Examining the code part 1 ............................................................................................................55

4.1 index.php the starting point .................................................................................................55

4.2 The definitions and the loading of the Joomla framework. ...................................58

4.3 instantiate the application .....................................................................................................74

4.4 initialise the application ..........................................................................................................92

Examining the code part 2 .........................................................................................................105

5.1 Route the application ............................................................................................................105

5.2 Dispatch (execute) the component ................................................................................129

5.3 Render the application .........................................................................................................153

Page 10: Diving in the code of Joomla

5.4 Output the page ......................................................................................................................173

Programming in action ................................................................................................................181

The dbcon component .................................................................................................................183

6.1 What is the dbcon component? The dbcon installation .......................................183

6.2 Using dbcon ..............................................................................................................................184

6.3 Uninstall the dbcon component ......................................................................................190

6.4 The front-end code of dbcon ............................................................................................191

6.5 The back-end code of dbcon .............................................................................................206

The module givesuggestion .....................................................................................................241

7.1 What is the givesuggestion module and its installation ......................................241

7.2 Using the givesuggestion ..................................................................................................243

7.3 The Uninstall procedure .......................................................................................................245

7.4 The code of givesuggestion ...............................................................................................246

The plug-in addmytext .................................................................................................................255

8.1 What is the addmytext .........................................................................................................255

8.2 install and uninstall the addmytext ...............................................................................256

8.3 Use of addmytext ..................................................................................................................256

8.4 The code of addmytext ........................................................................................................258

Important information .................................................................................................................267

9.1 Create impressive user templates with the Artisteer software ..........................267

9.2 The Joomla extensions directory .....................................................................................270

9.3 The main configuration file ................................................................................................270

9.4 Transferring your site to a Web Hosting Provider ....................................................271

9.5 Site backup .................................................................................................................................274

9.6 Site restore ..................................................................................................................................274

9.7 make your site Search engine Friendly - SeO .............................................................275

USeFUl ACTiONS FOR SeO ................................................................................................277

SeO, ACTiONS We SHOUlD NOT DO .............................................................................277

9.8 Web technologies ...................................................................................................................278

index .........................................................................................................................................................281

Page 11: Diving in the code of Joomla

Part IThe Basic Concepts

Page 12: Diving in the code of Joomla
Page 13: Diving in the code of Joomla

Joomla things you have to know

13

13

chapter 1

Joomla things you have to know

1.1 What is Joomla

Joomla (figure 1.1) is a Content Management System (CMS). its code is open (open source) and distributed for free. As a CmS it gives us the opportunity to publish and modify content on the internet. The Joomla administrator can inform the content of the CmS any time and every change becomes immediately visible to the visitors of the site.

Figure 1.1

Joomla also provides us with a powerful APi platform (a software library with Application Programming interfaces) which can be used directly in order to produce our own software applications.

Joomla is written in PHP (a strong object-oriented programming language) which is very popular for web programming. it follows the MVC (model–view–controller) software pattern and stores its data in a MySQL database. Joomla supports a wide variable of features

Page 14: Diving in the code of Joomla

Diving in the code of Joomla14

like SeF (Search Engine Friendly), page caching, multi-language sites, RSS feeds, blogs, polls, search, forums e.t.c. it has been downloaded over 35 million times so far.

There are thousands of both free and commercial extensions which can be downloaded directly from the official Joomla extension Directory (figure 1.2) and other external resources. Notice that only the Joomla extension Directory site has more than 6.000 extensions.

Figure 1.2

JOOmlA - ADVANTAGeS • Easyandeffectivesitecreation• Opencodesoftware• Freesoftware• Powerful API platformwhich gives us tremendous opportunities to create our own

Joomla compatible applications• Compatibilitywiththemajorityofmodernwebtechnologieslike:html,javascript,css,

xml, flash, java....• Effectivecontentadministration• SearchEngineFriendly• Hugeworldcommunity(thousandsofsitesandusers)• Thousandsoffreeextensionsinawiderangeofcategories(expandedeveryday)• Embeddedabilitiesformulti-languagesites• Newsecurityspecificationsfrom2.5release• Veryflexibleandscalablesoftware

Page 15: Diving in the code of Joomla

Joomla things you have to know

15

15

• Notdemandingspecialhardware(itcanberuninasimplelaptop)• Easyupgradeprocedurefromthelast2.5release

This period (spring 2013) the stable (productive) version of Joomla is the 2.5.This release will be supported until the spring of 2014. But, there are still thousands of sites which run the previous version 1.5.

As we have mentioned, Joomla is free software and can be downloaded easily from the official Joomla site http://www.joomla.org . in the same site you can find every relevant piece of information about the installation procedure and the technical requirements.

Finally, Joomla has the second place in the world CmS market Share (figure 1.3).

Figure 1.3

WordPress is currently number one but its abilities are not equivalent to Joomla’s. WordPress is mainly oriented to blog creation and this is the reason for its position. So, if we examine more general sites with more complicated functionality we may find that Joomla is the leader!

Page 16: Diving in the code of Joomla

Diving in the code of Joomla16

1.2 Setting a windows environment for Joomla

The Joomla code is written in PHP language and uses mySQl databases. As a result, we need an environment which supports PHP and mySQl. So, before Joomla installation we have to ensure that our environment supports these two technologies.

1.2.1 XAMPPXAmPP is an Apache distribution (figure 1.4). A software package which provides the Apache server.

Figure 1.4

As you can see from the figure above it is not only the PHP language which is supported by XAmPP. Other software which is provided and is important for a Joomla installation is: • mySQl• phpmyAdmin • FileZillaFTPServer

As you can guess the installation of XAmPP provides us with the entire environment for running a Joomla site (figure 1.5).

Page 17: Diving in the code of Joomla

Joomla things you have to know

17

17

Figure 1.5

1.2.2 APACHE Obviously, this is not the famous indian tribe. Apache is an open-source HTTP server (figure 1.6). it can be run in a variety of operating systems (Windows, linux, Unix-Solaris and mac OS X).

Figure 1.6

Page 18: Diving in the code of Joomla

Diving in the code of Joomla18

it supports the common languages PHP, Perl, Python. The Apache provides modules for authentication, a rewrite engine, secure sockets layer, a proxy extension, and ability for custom log files, web filtering and other useful features.

1.2.3 MySQLmySQl is a relational database management platform allows multiple users to access one or more databases at the same time (figure 1.7). it is written in C and C++ and works in many different operating systems, including linux, mac OS X, microsoft Windows and Unix.

Figure 1.7

A large number of programming languages (like PHP) and CmS (Content management Systems) provide APis (Application Programming interfaces) for accessing mySQl databases. This gives us the opportunity to easily produce applications which can be based on the mySQl database.

Joomla uses mySQl as its standard database system and uses specific APis in order to interact with it.

1.2.4 phpMyAdminphpMyAdmin is an application (figure 1.8) which provides support and management of MySQL databases.

Page 19: Diving in the code of Joomla

Joomla things you have to know

19

19

Figure 1.8

it is free, user friendly and a very effective tool. The majority of mySQl operations like: the administration of whole databases, table field and index management, relations, and user rights, are supported by the phpmyAdmin.

The user can still execute direct SQl commands, but the choice of the phpmyAdmin helps us to save time and to execute difficult queries without specific technical experience.

it is installed by XAmPP so the installation is very easy.

You can find more and detailed documentation in: http://www.phpmyadmin.net/documentation

1.2.5 FileZilla FTP clientThe common procedure if you want to install a Joomla site is first to create a local installation in a home computer. Only when you have finished your site and its customization, can you transfer it to a Web Server to be published. This means that you have to copy a huge tree of directories with thousands of files from your local computer to a remote server. if you try to do that manually you will quickly realize that it is a massive and very complicated procedure which will take tremendous time. At this stage you need a FTP (File Transfer Protocol) program like the FileZilla client (figure 1.9).

Page 20: Diving in the code of Joomla

Diving in the code of Joomla20

Figure 1.9

FileZillaclientisafreeFTPclientsoftware,veryeasytouse,whichprovidesFTP,FTPoverSSL/TlS (FTPS) and SSH File Transfer Protocol (SFTP).

it can automatically transfer all the (Joomla) file structure of a site, from the local server to the Web Server.

1.3 The installation of Joomla

The installation procedure of Joomla is easy and simple. Firstly, we have to download Joomla and secondly, to extract the zip file and follow the installation instructions.

We will present it in a few steps:

1st step: Check the technical requirements of Joomla

The installation of Joomla must be completed in accordance with its official technical requirements (figure 1.10).

Page 21: Diving in the code of Joomla

Joomla things you have to know

21

21

Figure 1.10

2nd step: intall XAmPP

XAmPP provides us with the Apache server which supports PHP. it also supports mySQl, phpmyAdmin and Filezilla. The XAmPP installation procedure is simple. Choose the XAmPP version which satisfies the previous technical requirements. Special attention is required if you run Skype in the same computer because both applications use the same network port 80.

3rd step: Download Joomla

Download Joomla from its official site (figure 1.11) http://www.joomla.org/download.html

Important note

Recently there is the opportunity for automating installation in the

Windows Azure Cloud Platform.

more info in: www.windowazure.com/en-us/home/scenarios/web-sites

Page 22: Diving in the code of Joomla

Diving in the code of Joomla22

Figure 1.11

4th step: install Joomla

Go to Apache root directory /xampp/htdocs and create a folder with the name of your site. Thereafter, extract the installation file to this directory.

5th step: Run the installation procedure

Open a browser and go to url: http://localhost/mysite (figure 1.12).

The http://localhost is the part of the url which refers to the base directory of the Apache server. every site installation must be located under that path. The ”mysite” is the folder name of the previous step.

Important tip

You can have a variety of different installations under the directory

/htdocs. We can also have different releases.

Page 23: Diving in the code of Joomla

Joomla things you have to know

23

23

Figure 1.12

6th step: Go to administrative (back-end) site and customize the global settings.

There are a number of customizing settings (figure 1.13) that must be set after the installation. it is not the role of this book to analyze this matter but just for exemplary reasons some of them are: the SEO settings, the Metadata settings, the default editor etc. We manage these settings from the Global Configuration menu.

Important tip

if you are new in Joomla it is very useful to choose indicative content. This choice creates a demo site with the majority of its elements.

Page 24: Diving in the code of Joomla

Diving in the code of Joomla24

Figure 1.13

Now and after importing our data we are ready to use both the site part (figure 1.14) .

Figure 1.14

and the administrator part (figure 1.15).

Page 25: Diving in the code of Joomla

Joomla things you have to know

25

25

Figure 1.15

Page 26: Diving in the code of Joomla

<?php/** * @package

Joomla.Administrator

* @copyright Copyright (C) 2

005 - 2012 Open Source Matters

, Inc. All rights reserved.

* @license GNU General Pub

lic License version 2 or later

; see LICENSE.txt

*/

// Set flag that this is a pare

nt file

define(‘_JEXEC’, 1);

define(‘DS’, DIRECTORY_SEPARATO

R);

if (file_exists(dirname(__FILE_

_) . ‘/defines.php’)) {

include_once dirname(__FILE__)

. ‘/defines.php’;

}

if (!defined(‘_JDEFINES’)) {

define(‘JPATH_BASE’, dirname(_

_FILE__));

require_once JPATH_BASE.’/incl

udes/defines.php’;

}

require_once JPATH_BASE.’/incl

udes/framework.php’;

require_once JPATH_BASE.’/incl

udes/helper.php’;

require_once JPATH_BASE.’/incl

udes/toolbar.php’;

// Mark afterLoad in the profil

er.

JDEBUG ? $_PROFILER->mark(‘aft

erLoad’) : null;

// Instantiate the application

.

$app = JFactory::getApplicatio

n(‘administrator’);

// Initialise the application.

$app->initialise(array(

‘language’ => $app->getUserSta

te(‘application.lang’)

));

// Mark afterIntialise in the

profiler.

<?php/** * @package

Joomla.Administrator

* @copyright Copyright (C) 2

005 - 2012 Open Source Matters

, Inc. All rights reserved.

* @license GNU General Pub

lic License version 2 or later

; see LICENSE.txt

*/

// Set flag that this is a pare

nt file

define(‘_JEXEC’, 1);

define(‘DS’, DIRECTORY_SEPARATO

R);

if (file_exists(dirname(__FILE_

_) . ‘/defines.php’)) {

include_once dirname(__FILE__)

. ‘/defines.php’;

}

if (!defined(‘_JDEFINES’)) {

define(‘JPATH_BASE’, dirname(_

_FILE__));

require_once JPATH_BASE.’/incl

udes/defines.php’;

}

require_once JPATH_BASE.’/incl

udes/framework.php’;

require_once JPATH_BASE.’/incl

udes/helper.php’;

require_once JPATH_BASE.’/incl

udes/toolbar.php’;

// Mark afterLoad in the profil

er.

JDEBUG ? $_PROFILER->mark(‘aft

erLoad’) : null;

// Instantiate the application

.

$app = JFactory::getApplicatio

n(‘administrator’);

// Initialise the application.

$app->initialise(array(

‘language’ => $app->getUserSta

te(‘application.lang’)

));

// Mark afterIntialise in the

profiler.

Diving in the code of Joomla

Diving in the co

de

of Jo

om

la

Release 2.5

by Konstantinos Drougkas

UNDERSTAND THE INTERNAL CODE OF JOOMLA

MAKE YOUR OWN JOOMLA EXTENSIONS

ocelotosPUBLISHING

oce

loto

sPU

BLISHIN

Go

ce

loto

sPU

BLISHIN

G

Konstantinos Drougkas was born in Athens in 1969. He is a graduate of the Patras Institute of Technology (University of Patras) - B.Sc., Computer Engineering (Grade 7,86/Distinction), and he is member of the Hellenic Chamber of Technology (T.E.E.). Konstantinos Drougkas is an experienced computer engineer and teacher residing in the historical city of Athens in Greece. His passion for web development goes back to 2007 when he starts his involvement with Joomla. He has made a significant number of Joomla sites, and in the last two years he has focused on the detailed study of the internal code of Joomla. The combination of his considerable teaching experience, and his deep knowledge of the web, guarantees a pedagogical approach.

Diving in the code of Joomla examines in a deep and detailed manner the internal code of Joomla and its expansion abilities. It also provides the reader with detailed examples in order to create his/her own Joomla add-ons (components, modules and plug-ins). Finally, it analyzes the whole procedure for the setting of a debugging environment.

This book describes step by step the execution of a Joomla session, from its first to the last command. Joomla has seven phases which are analytically presented in it. For the first time in a book can the reader receive such a detailed presentation of the code execution. Every stage of the execution is explained in a clear and thorough way producing a real case study for one of the largest software packages (Content Management System, Joomla). The most important parts of the code and the key commands of every phase are decoded in front of the reader.

Dive in the code of Joomla , acquire a comprehensive view about its internal code and make your own extensions !

Vatatzi 55 str., 114 73 Athens TEL. : +30 210 6431108E-mAiL: [email protected]

www. ocelotos. gr

P U B L i S H i N Gocelotos

ISBN 978-960-564-057-6

[email protected]

K. Drougkas173 × 240 SPiNE: 15 FLAPS: 80

cover_joomla.indd 1 5/12/2013 2:30:50 PM