Howto use the Little GNU Site Preparer

release <#2.0.0#>

(•) List of contents

(0) What can I expect from « LGSP »?

«LGSP» is an environment for creating the initial version of a site: By evaluating a configuration file LGSP automatically generates all demanded files of your site. Then these pages already respect the wished visual design. And for generating and editing such LGSP configuration files LGSP also offers a full elaborated HTML-frontend:

By this frontend you are not only able to determine the whole logical structure but also the outfit of your site: You write your wishes into the «LGSP configuration file», which then will be used by the site generator « lgsp.php». This tool generates and links all full elaborated framepages and template versions of all contentpages which together constitute your site. And because of the HTML-frontend you can directly let recreate your site. Therefore you can directly view the made changings.

(1) How do I install the « LGSP »?

« LGSP » is offered as GNU tarball. Therefore you can install it by using the three default steps

    configure --prefix=$HTTP_SERVER_DOCUMENT_ROOT
    make
    make install
  

But - as you might expect - there are some special points which must be respected:

  1. « LGSP » offers an HTML frontend and uses PHP. Therefore your locally installed http-server must be able to handle php-4.x-scripts. Normally this is already the case.
  2. « LGSP » offers an HTML frontend: For editing LGSP configuration files and for generating whole sites you are using your normal browser. In this case your browser naturally must be served by your locally installed http-server - like Apache. And therefore the LGSP frontend (and backend) must be installed anywhere into that area where your http-server can find it. If you are using the Apache this area is determined by the variable DocumentRoot of the file httpd.conf. You should insert this path as value of the attribute --prefix. After having called make install (which normally must be executed as user root) you will find a directory lgsp inside of the select prefix-path.
  3. Because « LGSP » offers an HTML frontend by which one shall be able to rewrite configuration files and to generate whole sites your http-server must be allowed to write into the LGSP build directory. Very often your http-server is running under the id of the user nobody or something else. And such users are not allowed to write anything. Therefore you must explicitely allow that the http-user may write into that build directory. This should be done as user root by using the command
        chmod -R ga+w $HTTP_SERVER_DOCUMENT_ROOT/lgsp/build
      
    (Replace $HTTP_SERVER_DOCUMENT_ROOT by the value of the attribute --prefix). Note: « LGSP » is not intended to become online: it should be a local tool on a local machine for generating a site which itself later will be moved on a real server.

(2) How do I use « LGSP »?

After having installed « LGSP » you should start your browser and call the url

    http://localhost/lgsp/index.html  # or
    http://127.0.0.1/lgsp/index.html
  
Now you see the frontend of LGSP which is nothing more than a site which has been designed and generated by LGSP itself. You don't like the design? Ok. You could play with the configuration file lgsp.cfg.inc and generate a redesigned interface. Nevertheless we can use the LGSP frontend as an explaining example for LGSP generated sites:

After having started the LGSP frontend you see four areas:

  1. In the left upper quarter you see the LGSP logo. It's presented by the logo-page.
  2. In the right upper quarter you see the a set of buttons which change their outfit if you touch them with your mouse. These buttons constitute the mainmenu. The right upper quarter is known as mainmenu area. And each button belongs to one specific mainmenu entry.
  3. In the left bottom quarter you see the set of mainmenu entries again. But under one entry you find a subset of new entries. These subset of submenu entries constitute the submenu of a mainmenu entry. If you select another mainmenu entry the submenu changes too. This left bottom quarter is known as the guide area or the submenu area. And each submenu entry is linked to a content page which therefore is known as target page.
  4. And last but not least in the right bottom quarter you find the content area where all target pages will be presented.

Using LGSP is now nothing more than browsing the LGSP site in the wellknown manner.

(3) How do I configure my (new) site?

For a user of LGSP generating a site is nothing more then editing a configuration file. Therefore one must be able

Using the mainmenu entry «Site Configuration» you find one submenu entry for each of these capabilities:

After having installed LGSP you will find some example configuration files like «default.cfg.inc», «example.cfg.inc» or «lgsp.cfg.inc». You can test these entries using these files.

Generally spoken there's only one little delicacy if you want to generate a site by one configuration file: Each mainmenu entry has a submenu. And each submenu entry is linked to one target file. Hence you may think of a mainmenu entry as a subsite of your site (And by exactly this method LGSP has been implemented: it creates a specific directory for each mainmenu entry). Now normally there exist some default values which should be valid for all pages of all subsites if there has not been determined anything other for such a page. And sometimes one wishes that some values are valid for all pages of one subsite but not for those of the other subsites. And last but not least sometimes one special page shall especially designed.

To solve that problem LGSP uses overwritable configuration parameters. And the configuration itself is organized as a top-down procedure:

(3.A) How do I create a new « LGSP Configuration File »?

Select site configuration/generate file and insert a new filename. You will get the corresponding initial configuration file. It contains a mainmenu with one mainmenu entry. And the mainmenu entry itself has a submenu which contains one submenu entry. You can view the generated configuration file by using the entry site configuration/show all parameters. But note: the view option supresses unset values (= empty strings). Therefore at the beginning the visible set of values is still very small. You will find all changable values if you call the formulars for editing the configuration file. (Note: Empty values will generally be ignored by evaluating the configuration file.)

(3.B) How do I determine the default values of my site?

Select site configuration/change global parameters. You will reach a formular for editing all editable configruation values.

(3.C) How do I configure the mainmenu of my site?

Configuring the mainmenu means

(3.C.a) How do I expand the mainmenu?

Select mainmenu configuration/add entry. As result you will find a new mainmenu entry at the end of the mainmenu. This entry can now be edited.

(3.C.b) How do I reduce the mainmenu?

Select mainmenu configuration/delete entry and select the id (name) of the mainmenu entry which shall be deleted. As result the corresponding mainmenu entry has been erased.

(3.B.c) How do I configure a mainmenu entry?

Select mainmenu configuration/change entry and select the id (name) of the mainmenu entry which shall be changed. You will reach a formular for editing the editable configruation values.

(3.B.d) How do I resort the set of mainmenu entries?

Select mainmenu configuration/resort mainmenu. You will reach a formular where you can give each mainmenu entry a new number. The sequence of numbers determine the new order of the mainmenu.

(3.D) How do I configure a submenu of my site?

Configuring the submenu means

(3.D.a) How do I expand a submenu?

Select submenu configuration/add entry and select the id (name) of the mainmenu entry whose submenu shall be expanded. As result you will find a new entry at the end of the corresponding submenu.

(3.D.b) How do I reduce a submenu?

Select submenu configuration/delete entry, select the id (name) of the mainmenu entry whose submenu shall be reduced and select the id (name) of the submenu entry which shall be deleted. As result the corresponding submenu entry has been erased.

(3.D.c) How do I configure a submenu entry?

Select submenu configuration/change entry, select the id (name) of the mainmenu entry of whose submenu an entry shall changed and select the id (name) of the submenu entry itself which shall be changed. You will reach a formular for editing the editable configruation values.

(3.D.d) How do I resort the set of submenu entries?

Select submenu configuration/resort submenu and select the id (name) of the mainmenu entry whose submenu shall be (re)sorted. You will reach a formular where you can give each submenu entry a new number. The sequence of numbers determine the new order of the submenu.

(4) How do I generate my new site?

Select site generation/generate new site and determine the name of that configuration file whose corresponding site shall be generated. Physically you will find the whole generated site inside of the directory $DOCUMENT_ROOT/lgsp/build/$SITE_ID. But you can directly browse your generated site by using the entry site generation/visit generated site where you must determine the name of that configuration file whose corresponding site you want to see.

(5) How can I influence the outfit of my new site?

In a special sense the outfit of your site is determined by the logical structure too. How to influence that aspect of your site has been explained by the chapters above. For determining the optical outfit of your site you can use very many configuration variables. These variables normally are already presented as groups:

  1. values for writing more than one page of a subsite
  2. values for writing the index page of a subsite
  3. values for writing the logo page of a subsite
  4. values for writing the menu page of a subsite
  5. values for writing the guide page of a subsite

Here is thematical list of wishes how one may want to design it's sites:

(5.A) How can I arrange the size of the areas of my site?

Inside of the section «values for writing the index page of a subsite» you find the two parameters "MENU_AREA_HEIGHT" and "GUIDE_AREA_WIDTH": By the first you determine the height of the menuarea where the mainmenu will be presented. (The width is automatically determined by the browser). And by the second you determine the width of the guidearea where the submenus will be presented (The height is automatically determined by the browser). If you found unwished scrollers you should increment the values. But note: you should test your design by using different browsers.

(5.B) How can I determine the colors of my site?

Inside of the section «values for writing more than one page of a subsite» you find a set of variables by which you can determine the wished colors. If you insert a background-picture, this picture must manually be put into the image directory of your site.

(5.C) How can I determine logo of my site?

Inside of the section «values for writing the logo page of a subsite» you find the two parameters "LOGO" and "LOGO_TOP_MARGIN": If you insert the name of a logo-picture the corresponding file must manually be put into the image directory of your site. By the value "LOGO_TOP_MARGIN" you can determine the distance between the top border of the browser area and the top border of the image itself. Hence incrementing this value means shifting the logo downwards

(5.D) How can I determine the outfit of the mainmenu of my site?

Using the parameters of the section «values for writing the menu page of a subsite» you can create many different menus:

(5.E) How can I determine the outfit of the submenu of my site?

Inside of the section «values for writing the guide page of a subsite» you find the two parameters "MME_MARKER" and "WITH_IMPRESSUM":

  1. If you insert the name of an image as mainmenu marker this button or something else arises just in front of each mainmenu entry of the guide-page. Of course the corresponding image must manually be put into the image directory of your site.
  2. If you set "WITH_IMPRESSUM" onto yes, you will automatically get a prepared and linked impressum page (which especially in germany is demanded by the law).

(6) Which conditions must I respect by using LGSP?

Copyright (C) 2003, 2004, 2005, 2006 Karsten Reincke

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

(7) Where can I get LGSP?