Chapter 2 - Installation & Configuration

This chapter of the manual explains how to install and configure Back-End on your server. Please read this part of the manual if you are new to Back-End, or installing server side software, reading it will help you become familiar with the installation process.

2.1 - Installation

Decompress the compressed file tar zxvf backend0.4.x.x.tar.gz (or use Winzip)

The distribution comes with the following directory structure.

back-end/        
  htdocs/      
    back-end/    
      ads/  
    images/    
      layout/  
         
  includes/      
    ads/    
    back-end/    
    classes/    
    lang/    
    templates/    
         
         

  • htdocs - your web root directory
  • includes - site system files

    2.2 - Configuration Files

    Edit your configuration files. Most of this is documented within the files

    2.2.1 - /includes/db.php

    This is where you configure Back-End to connect to your MySQL database.

  • username - your database username
  • password - your database password
  • hostname - your database hostname, in most cases this will be localhost.
  • database name - your database name

    2.2.2 - /includes/settings.inc

    The critical locations & site variables for your Back-End installation.

  • main_file - the name of your main_file.
  • mainfile_offset - distance of main file from web-server DOCUMENT_ROOT, i.e. number of directories after hostname in $front_end_url.

    2.2.3 - /includes/includes.inc

    Edit the first line in dist/includes/includes.inc that points to settings.inc this should reflect the full path up to and including the settings file

    for example: $includes_path = "/usr/local/apache/htdocs/yoursite/includes";

    2.2.3 - /htdocs/main_file.php

    The default setup assumes that the main_file is set up in the web root directory. If this is not the case, please consult the in file documentation.

    main_file.php should be renamed to a file name related to your site. If your server is set to read .phtml, .php, .php3 files and parse them you can use any of these extensions.

    Unfortunately Google apparently trip over url's like /main_file.php/articles/4/ However, if you have permission to use a .htaccess file you can set all files to parse php scripts. Just rename the file no.htaccess to .htaccess and you should be able to set main_file.php to whatever you like.

    2.2.4 - includes_path.php

    These files set the absolute path to the includes folder for all files in this directory.

    do not include a trailing slash!

    $includes_path = "/usr/local/apache/htdocs/yoursite/includes";

  • path: /includes/includes_path.php

  • path: /htdocs/back-end/includes_path.php

  • path: /htdocs/includes_path.php

    Templates

    Modify the templates supplied with Back-End or build new templates for your site.

    You need a main.tpl for the homepage and an article.tpl for the default installation.

    The templates are located at /includes/templates.

    For further information about templates, please refer to Chapter 3.

    Upload

    Check that you have configured all the required files and then upload the installation to your to the server.

    If you want to be able to use the Build Articles function, you will need to make sure that php can write to the server.

    Permissions

    Set the permissions on the various files.

    Set up the MySQL database and tables

    a) First you need to create a database (or have one created for you): mysqladmin -u username -p password create the database must have the following rights GRANTed to it: SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX (and ALTER if you'd like to run the 0.5 upgrade script)

    b) Next build the tables within your newly created database mysql -u username -p password < sql.txt

    If you are using phpMyAdmin (www.phpwizard.net/projects/phpMyAdmin/) as an interface for your database you can just cut and paste the contents of this file into the query box and set up the scripts.

    Logging In For the First Time

  • user: back-end,
  • password: back-end

    a) Remember to add your own username and password before you delete the default administrator password.

    b) You will need to change the url's in the navigation bar to include your new main_file.php

    Location/File Names

    Rename dynamic navbar files in the admin interface. By default they are set for a directory/file name which may not exist on your server.

    8. Bilingual Interface

    a) The bilingual admin interface can be turned on & off in the settings.inc file.

    b) A number of language definitions are provided in /includes/lang/, pick which languages you want as your primary & alternate languages and list them in settings.inc

    c) In the Admin interface insert text into both content and alt_content boxes. Similarly, provide alt_title, alt_description & alt_name in the appropriate interface.

    d) Create two template files (one for each language) main.tpl & alt_main.tpl will suffice.

    e) To provide a link to jump between languages, insert {request_uri} & {alt_request_uri} into your template files to provide the url for the content/navigation in the other content.

    SAFE MODE NOTE

    If you are running this script in safe mode you will not be able to use the Build Articles feature. The script will create a stand alone page, but it will not display it to the browser. If you download this page and upload it again, it should work.

    SECURITY NOTE

    Some of the files in the includes directory contain information which should not be publically accessible.

    Ideally you will have the whole /includes/ directory in a location which is not visible through the web. If this is not an option, please make sure that there is a password on this directory.

    Finally, to ensure that there is some token of security on your MySQL data, it is stored in db.php which is parsed by php so that no critical data is displayed via the browser.