Installation

INSTALLATION

Prerequisites in order to install Leonardo

1. Linux or Windows Dedicated PC or Web hosting plan
2. Apache + PHP ( version must be 5+)  & Mysql  (version must be > 4.1)
3. PHP Nuke(not actively supported), phpBB2, phpBB3, Joomla (only 1.5) , or standalone operation
4. GD 2.0 or higher installed in PHP (some free hosting dont offer that)

5. Good Bandwidth / High monthly traffic limits
6. Good CPU on the Webserver

7. Lots of Memory on the webserver (512 Mininum 1 Gb recommended)
8. Basic - indermediate computer skills.

Optional
9. Ability to compile and execute C programs in the web server

* There are pre-compiled binaries for linux/windows
10. 1 -5 Gb Hard disk space on the webserver for the SAT Maps
(For greece, using a 14m/pixel map, 2.5 Gb were needed)

* You can also use GoogleMaps, so no need to store SAT maps locally

MANUAL INSTALLATION

NOTE if not otherwise stated all files and folders are relative to the main folder you have unziped the source files

STEP 1. Unzip the files

If you are using phpNuke or phpBB2:

Unzip the files and place the files and directories to
modules/leonardo on the directory of your phpBB or phpNuke installation.
If you have installed phpBB on dir phpbb/ then the files should go to
phpbb/modules/leonardo. If you installing as a phpNuke module
use the modules/ directory of phpNuke.

If you are using phpBB3, Joomla 1.5, Standalone:

Also applies to phpBB2 if you want to use the mod rewrite (recommended)

unzip them to a folder called leo or some other name, we will make it accessible later via
mod rewrite like http://yoursite.com/leonardo


STEP 2. Create the tables

*** Your Database MUST use UTF-8 as the encoding ***


Execute the file leonardo-utf8.sql (found in the doc/install/sql/ directory)
to the sql server you are using. You can do this from the command
line interface (mysql) or using a web based tool (like phpmyAdmin)

Execute the file leonardo_waypoints-utf8.sql in the same way as above. This will
add the coordinates of 3800 major world cities to get you started.

STEP 3. Edit the config files found in site/

Note: do not edit the config.php found in the main folder, instead all custom changes should be done in site/config_custom.php

site/config_custom.php

$CONF_google_maps_api_key="";
if you intend to use google maps API to display fancy maps of takeoffs get one key for your server at
http://www.google.com/apis/maps/signup.html else leave it blank

 

$nativeLanguage="english";

 

site/config_op_mode.php

$opMode

1 = for use with a PHPnuke portal
2 = for use with a phBB2 forum
3 = standalone
5 = joomla  1.5
6 = phpbb3

 

site/config_admin_email.php

add your email and a site password.

DONT give this pass to anyone!

 

site/config_admin_users.php

2) $admin_users -> set this to the user id's (from the phpnuke table of users)
that will have admin previledges

You should deside which users will be admins for leonardo.
those users will have the rights to delete any flight, modify any flight,
regenarate the maps and charts for any flight etc. Lets say that you are
user "admin" on your forum and want to put yourself in the $admin_users.
Go to "MembersList " where all the members of your forum are displayed and
search for "admin" When you find it and put the mouse cursor over "admin"
a link will be displayed in the bottom of the browser something like
"http://yoursite.com/profile.php?mode=viewprofile&u=230" Note the "u=230" ,
so the user ID of user "admin" is 230 so put
$admin_users=array(230);
if you wish to add another user (lets say with user id 132) you should make this :
$admin_users=array(230,132);

 

 

STEP 4. (optional) Compile the XC Scoring Optimizer


1. go to dir server/
2. gcc -o olc -lm olc2002.c

You should have access to your web server in a shell
and you should have access to compile and execute programs written in C.
Check with your provider if you can do that. This is the program that
scores a flight and because it needs to be fast it was written in C
(a programming language) . If you can't run C programs in your web server
then you will not be able to score the flights. In that case you should go to
config.php and edit $scoringServerActive=1; to $scoringServerActive=0;
so no scoring will be done.

 

STEP 5

If you are using phpNuke:

Activate the leonardo module from the phpHNuke administration panel

If you are using phpBB2:

1) Copy the files

install/phpbb2Files/modules.php 

install/phpbb2Files/mainfile.php

to the root folder of your phpBB2 installation ( for example: phpbb/ )

and the files

install/phpbb2Files/page_header_leonardo.php
install/phpbb2Files/page_tail_leonardo.php

to (for example) phpbb/includes/

 

2) Open the file includes/constants.php in your phpBB directory
Find
define('PAGE_GROUPCP', -11);
After that add
define('PAGE_LEONARDO', -1045);
Save the File

3) Edit file site/predefined/2/config.php

If you are using phpBB3:

Edit file site/predefined/6/config.php

If you are using Joomla 1.5:

Edit file site/predefined/5/config.php

If you are using standalone operation:

Edit file site/predefined/3/config.php


STEP 6. Check File permissions

You may need to check that directories

data/ and subfolders

are writeable by the web server, you can fix this from a shell by

chmod -R 777 data

while in leonardo/ dir

STEP 7. See you Leonardo !

Access the URL of Leonardo to chekc it is working

 http://www.yoursite.com/path_to_phpbb_or_phpNuke/modules.php?name=leonardo

STEP 8. Enable the mod rewrite

Create a dir on the root folder of your domain called leonardo to have you Leonardo url like:

http://www.yoursite.com/leonardo

Then login in as a leonardo administrator and select from the top-left menu(the small house icon)->"Configuration"=>"SEO URLS"

 

MAP MAKING

See file docs/maps/Maps_howto_auto.txt