Contributing to L4Hq.org
Setting Up
- From Karlsruhe's cvs server, check-out the l4hq module.
- Request cvs write access from Uwe.Dannowski
ira.uka.de.
- Optionally, configure your own local php server. See below.
Contributing
Contributing to L4Hq is a simple process:
- Add or modify pages. Be sure to mimic the headers and footers of other
pages, to maintain a consistent feel to the site. Add links around
the site to connect pages.
- Preferably, test your changes locally. More about that below.
- Commit your changes, which become immediately visible on l4hq.os.uka.de (Only accessible
from Karlsruhe. See below for how to set
up a local PHP server.) Test the changes. At some point within
the next hour, the changes are published to l4hq.org via rsync. You could
conceivably collide with the rsync process with the result that
some pages are published to the main server, while others are
published during the next rsync.
php Customs
Your additions to the web site should be in the form of php pages.
Consistent use of php constructs helps reduce errors throughout the site via
the use of variables and templates. Add and
maintain global variables as necessary in include/standard.php or
in other appropriate files in the include directory.
Be sure to include the proper header and footer pages, and to define
the proper per-page php variables. For example, at the top of your php
page, use something similar to the following:
<?php
$pagetitle = "About L4Hq";
$robots = "index,follow";
$description = "About L4Hq";
$keywords = "";
include $_SERVER['DOCUMENT_ROOT']."/include/standard.php";
include $_SERVER['DOCUMENT_ROOT']."/include/header.php";
?>
At the bottom of your php page, add the following:
<?php include $_SERVER['DOCUMENT_ROOT']."/include/footer.php" ?>
Running a Local php Server
Adding php4 to Apache:
- Using your OS's installation mechanism, install php4.
Debian users:
apt-get install php4 phpdoc
- Ensure that your Apache httpd.conf enables the php4 loadable module.
For example, under Linux, /etc/apache/httpd.conf should
contain (uncommented):
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
- Enable index.php as a valid directory index file type. Ensure that
the
DirectoryIndex line includes index.php.
Due to absolute path names, the L4Hq hierarchy must start at the root of your
web server's name space. You can easily map the L4Hq tree to the name space
root by associating a virtual host with a dedicated web server port. For
example, add to the httpd.conf file:
Listen 80
Listen 8000
<VirtualHost _default_:80>
DocumentRoot /var/www
</VirtualHost>
<VirtualHost _default_:8000>
DocumentRoot /home/yoda/l4_cvs/l4hq
</VirtualHost>
<Directory /home/yoda/l4_cvs/l4hq>
Options Indexes Includes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
|