Quick links: Content - sections - sub sections
EN

Trace: jevent 1.3 hall-of-fame 1.0 1.2.x dokuwiki 1.2 1.2.x 1.4 application-creation

This is an old revision of the document!


Creation of the application and a module

Jelix is delivered with an example application, myapp. We won't use it but we will recreate one from scratch.

Every Jelix application has a name : the name of his directory. We will call our application “actu.org”.

We suppose that you installed Jelix as indicated on the installation page, and that you use the default configuration, without modiying the tree strucure. You must have installed PHP and PHP-CLI, as said in the same page, to use the jelix.php script.

Discovering Jelix-Scripts

Jelix is provided with a script, jelix.php, which makes creation and modification of the different files of an application based on Jelix easy. It is necessary to invoke it with the command line version of PHP and to give as parameter a Jelix command name, with possible parameters and options.

  php jelix.php [--application_name] command_name [options] [parameters]

For this, open a console and go to the lib/jelix-scripts/ directory where jelix.php is placed.

 under linux :  cd lib/jelix-scripts/
 under windows : cd lib\jelix-scripts\

To get help on all the available commands, type :

   php jelix.php help

You will have noticed that you must indicate to jelix.php (except for the help command), the name of the application on which the command apply. It is possible to avoid it. For this, you have to put the name of the application in an environment variable : JELIX_APP_NAME. For our example, do this :

  export JELIX_APP_NAME="actu.org"        # under linux
  set JELIX_APP_NAME=actu.org             # under windows

Creation of an application

Let's begin to create our application. Jelix proposes a command for creating all the tree structure of an application : createapp. Type then :

php jelix.php createapp

You then get a actu.org/ directory, at the same level as the lib/ directory. Its content is :

actu.org/
   modules/      the modules owned by your application
   plugins/      the plugins owned by your application
   var/config/   the configuration files of your application
   var/log/      the eventual log files
   var/themes/   the different possible themes in your application
   var/overloads/ will contain the different files that you will have redefined, resulting from modules
   www/          the root of the site

Check that the temp/actu.org directory, that you juste created has write permissions for the web server.

en/tutorial/application-creation.1158767125.txt.gz · Last modified: 2006/10/17 20:31 (external edit)

Recent changes RSS feed Creative Commons License