Verizon cell phones

Building Modx Revolution

This is a short guide to building and installing ModX Revolution from the development branch. Along the way you will learn how to use TortoiseSVN, building ModX CMS and installing it on your Windows box.


Using Subversion With TortoiseSVN

ModX Revolution is stored on a Subversion version control repository. If you are developing on a Windows box, it is recommended that you use
TortoiseSVN for Windows.

TortoiseSVN is a Windows client that integrates itself into the Windows File Manager. After you install the software, you will be able to perform version control commands very simply by clicking. Gone are the days of having to type cryptic commands in the shell.

Obtaining The ModX Revolution Source

If you want the latest and greatest development files you can retrieve them using TortoiseSVN. In order to do so, you need to have the location as stored on the external Subversion repository:

  • The current ModX Revolution 2.0 development branch:

    http://svn.modxcms.com/svn/tattoo/tattoo/branches/2.0/

  • The current ModX Revolution 2.0 user interface branch:

    http://svn.modxcms.com/svn/tattoo/tattoo/branches/2.0-ui/

Simply run Windows File Manager. If you are running Apache, click on the /Apache/htdocs folder. Then click on the File menu.

TortoiseSVN with File Manager

Next, enter in the URLs above for each project. Here is an example of how to do this for the user interface branch:

TortoiseSVN Checkout

When you are done, you should have a directory layout like this:

ModX Revolution file layout

Building Modx Revolution

First thing you should do is create a MySql 5.1+ database. If you are running on Microsoft Windows, use Mysql Administrator from the MySql GUI tools package. Log into localhost as the root user and create a new database schema called "modx". Assign a user to this database and make available all privledges.

Next, copy /2.0/_build/build.config.sample.php and rename it to build.config.php. Open the file up with your favorite text editor and modify the XPDO_DSN, XPDO_DB_USER, and XPDO_DB_PASS constants for your MySql database.


<?php
// define the MODX path constants necessary for core installation
define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/');
define('MODX_BASE_PATH', dirname(dirname(__FILE__)) . '/');
define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');

// define the connection variables
define('XPDO_DSN', 'mysql:host=localhost;dbname=modx;charset=utf8');
define('XPDO_DB_USER', 'usernamehere');
define('XPDO_DB_PASS', 'password');
define('XPDO_TABLE_PREFIX', 'modx_');
?>

Bring up the Windows command shell. Change directories to the /2.0/_build directory and run this command:

php transport.core.php

Setting up ModX

Open up your browser and surf to the following location:

http://localhost/2.0/setup

This will automatically run the index.php file and get you into the setup program. Move through each installation screen and when you get to the database section, enter in the same information you entered above when you changed build.config.php. ModX installation will let you test the database link before final installation.

When setting the database collation I usually set it to utf8 and utf8_generical_ci. If you are in another country, please set accordingly.

For Context Installation, I just go with the default settings. Realize you are using the /2.0/ directory as the base due to using a development branch of ModX Revolution. You would of course move everything down one directory if you are going to use a production version (i.e. c:/apache/htdocs is your root).

One error that came up during installation is strftime warnings. If any time you start seeing strftime errors showing up you have to set the timezone according to region and city.

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Los_Angeles

Read very carefully your Installation Summary and fix the problems marked in red before hitting the Install button. Failing to do this will result in errors later that will be difficult to catch. Toggle the Success messages and Warnings just to be sure.

Since you are working with a development version, don't check the checkbox to delete the setup directory. Leave it alone.

Monitoring ModX Source Changes

As of this writing (May 2010), ModX Revolution is still in development. As such, source code changes will be changed frequently.

To monitor these changes, I would recommend installing FeedDemon and subscribing to the ModX CMS RSS feed:
http://svn.modxcms.com/crucible/changelog/modx

You may see an occasional change to a file prefaced with a [REBUILD/UPGRADE REQUIRED] flag. If so, you will have to rebuild the project as the change was likely a core modification.

Filed under: