GForge Manual

Tom Copeland

Roland Mas

Ken McCullagh

Tim Perdue

Guillaume Smet

Reinhard Spisser


Table of Contents

1. Introduction
1. About GForge
2. GForge History
GForge Installation Guide
1. Hardware requirements
2. Software requirements
3. Installation
3.1. Installing the software
3.2. Configuring the Web Server
3.3. Configuring the database
3.4. Upgrading database in existing install
3.5. Configuring PHP
3.6. GForge Config File
3.7. Mail Aliases
3.8. File Release System (FRS)
3.9. Configuring CVSWeb
3.10. Configuring GForge
3.11. Configuring GNU Mailman
3.12. Configuring CVS
3.13. Cron Jobs
3.14. JPGraph
3.15. Perl
3.16. Jabber Support
4. Verifying the installation
5. Creating the admin user
6. Peer Ratings
7. Installing a plugin
GForge Administration Guide
1. Introduction
2. What is GForge?
3. What can GForge do for me?
4. Setting up a new project
5. Registering a new project
6. Administering a new project
7. CVS repository
8. Setting up the CVSROOT
9. Setting your .rhosts file correctly
10. Creating the CVS repository
GForge User Guide
1. Introduction
1.1. Getting Started
1.2. User specific functions
1.3. Project specific functions
1.4. Site-wide functions
2. Getting Started
2.1. GForge homepage
2.2. Registering as a new user
2.3. Registering a new project
2.4. Login
2.5. Logout
3. User specific functions
3.1. User Homepage
3.2. Modifying User settings
3.3. User ratings
3.4. Skills profile
3.5. Diary and Notes
4. Project functions
4.1. Project Summary
4.2. Project Administration
4.3. Forums
4.4. Tracker
4.5. Mailing Lists
4.6. Task Manager
4.7. Document Manager
4.8. Surveys
4.9. News
4.10. CVS
4.11. File Releases
5. Site-wide functions
5.1. Introduction
5.2. Searching in GForge
5.3. Trove map
5.4. Snippet Library
5.5. Project Help
GForge Contribution Guide
1. How to contribute
2. GForge CVS repository
2.1. Anonymous access
2.2. Modules in CVS repository
3. PHP Coding Standards
3.1. Introduction
3.2. Comments
3.3. Formatting
3.4. Templating
3.5. Expressions
3.6. Functions
3.7. Objects
3.8. Naming
3.9. Control Structures
3.10. Including PHP Files
4. Templating Standards
4.1. Coding Example
5. Documentation
6. Localization howto
6.1. GForge localization system and status
6.2. Adding a new language
6.3. Format of the *.tab files
6.4. Updating a translation
6.5. Text content customization
7. How to obtain XHTML compliance for GForge

Chapter 1. Introduction

1. About GForge

GForge is a software for collaborative development for the software community. It provides a full configured development system with versioning, a project web site and tools for communication between members of a development team. The tools provided by GForge allows team members to communicate and organize their work; this allows the creation of a knowledgebase.

A complete configurated GForge system will give you the following features:

  1. A Web site for every project

  2. Versioning via CVS

  3. Shell access to the server for the developers

  4. A web site for project coordination and comunication between team members:

    1. Discussion Forums - For discussions between team members

    2. Bug tracking - Allow registration and administration of bugs

    3. Support requests, patch submissions, and enhancement requests

    4. Comunication between project members using mailing lists

    5. Sharing of documentation

    6. Handling of todo lists, tasks, etc

    7. File uploads/releases

    8. Posting of news - Every project can have its own news items.

    9. Code Snippets - Provides of a basic knowledgebase that can contain code fragments, HOWTOs, etc.

The tasks and the tracker items (to track bugs, patches, support requests, enhancement requests) can be classified using status, priority, category.

The system provides also a classification system of the projects, a user profile, and a user rating system.

2. GForge History

GForge is a fork of the 2.61 SourceForge code, which was only available via anonymous CVS from VA (Research|Linux|Software). gforge.org is not a project hosting platform, it is merely an implementation of the GForge code. We believe that the GForge functionality is important not only to the Open Source community, but to the wider business community.

Since VA has not released the source in over one year, despite their promises to the contrary, a fork was necessary to ensure a viable open source version of the codebase.

The GForge project was formed and is maintained by Tim Perdue, the original author of much of the original SourceForge web code.

Major changes are present in the current GForge codebase:

  • Jabber Support - System events, such as bug submissions, are optionally sent via jabber and email

  • Radically easier to install - By removing SF.net-specific code, like caching and image servers, many install dependencies have been eliminated.

  • New interface - The interface makes it easier to navigate as well as know your present location.

  • Code cleanup - Since GForge does not need to scale to 500,000+ users, many hacks and optimizations have been removed

  • Foundries and related nonsense have been removed

GForge Installation Guide

Reinhard Spisser

Tom Copeland

Ognyan Kulev

Guillaume Smet


1. Hardware requirements

Hardware requirements are dependent on the number of users that will use the system and how active those users are.

For instance, an installation of GForge hosts over 450 users and over 140 projects on a single CPU Pentium 2.4GHz machine with 512 MB of RAM.

You can find additionnal information about hardware used by several installations of GForge in the GForge sites list maintained by Tom Copeland.

2. Software requirements

GForge should work correctly on any system configured like this:

  1. Linux Operating System

  2. PostgreSQL 7.1 or later

  3. Apache 1.3.22 or later

  4. openssl 0.9.4 or later

  5. mod_ssl 2.4.10 or later (included in Apache 2.0 and later)

  6. PHP 4.0.4 or later (note that you'll need to have PHP built with the command line interface support, which only comes standard with PHP 4.3 or later)

  7. php-pgsql (enable it with --with-pgsql when building PHP, or install it as package)

  8. php-mbstring (enable it with --with-mbstring when building PHP, or install it as package)

Optional software:

  1. Turck MMCache or PHP Accelerator or any other PHP accelerator (highly recommended)

  2. GNU Mailman and Python (Mailing list support)

  3. Jabberd (Jabber support)

  4. JPGraph (Gantt Charting and Graphing Support)

  5. Perl, DBI module and associated DBD::Pg.

Successful installations and operations have been done using the following systems:

  • RedHat Enterprise Linux 3 with bundled packages except for a compiled GNU Mailman

  • RedHat Linux 9 with bundled packages except for a compiled GNU Mailman

  • RedHat Linux 8.0 with the following software configured (already bundled with RH8):

    1. PostgreSQL 7.2.2

    2. Apache 2.0.40

    3. openssl 0.9.6b

    4. mod_ssl 2.0.40

    5. PHP 4.2.2

    6. php-pgsql 4.2.2

  • RedHat Linux 7.3:

    1. PostgreSQL 7.2-1

    2. Apache 1.3.27

    3. openssl 0.9.6b

    4. mod_ssl 2.0.40

    5. PHP 4.1.2

    6. php-pgsql 4.1.2

3. Installation

3.1. Installing the software

Note for Debian users

You can simply add lines found at http://people.debian.org/~bayle/ or http://people.debian.org/~lolando/ to /etc/apt/sources.list and type apt-get install gforge to install a working GForge system, thanks to Christian Bayle and Roland Mas.

Note that Gforge is now part of official Debian, and so you can find it in all debian mirrors all other the planet. From scratch install snapshot are also available for a guided installation.

To install GForge, follow these steps:

  1. Login as root user

  2. cd to /usr/share/

  3. Extract the content of the GForge tarball to the current directory: bzip2 -dc gforge.tar.bz2 | tar xvf -

3.2. Configuring the Web Server

  1. Open /etc/httpd/conf/httpd.conf or better create a gforge.conf file in /etc/httpd/conf.d/.

  2. Create the primary virtual host and fill the rest of the directives in it:

    NameVirtualHost 192.168.1.1
    <VirtualHost 192.168.1.1>
    ServerName gforge.company.com
    ServerAdmin webmaster@gforge.company.com
    
    # Put the rest of the directives here.
    
    </VirtualHost>
    
  3. Change the DocumentRoot to point to the www directory:

    DocumentRoot "/usr/share/gforge/www"
    
  4. Create a Directory directive following the DocumentRoot as follows:

    <Directory "/usr/share/gforge/www">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        ErrorDocument 404 /404.php
    </Directory>
    
  5. If you wish to set up a server with HTTPS, you need to configure the VirtualHost:443 section of httpd.conf.

  6. Add several new filenames to the DirectoryIndex directive:

    DirectoryIndex index.html index.php
    
  7. Configuring PHP for Apache

    The configuration for the PHP module for Apache is different for Apache versions 1.3 and 2.0. Follow the instructions for the version installed on your system.

    • Configuring PHP for Apache 1.3

      1. Open /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/gforge.conf and put the rest of the directives in the primary virtual host.

      2. Insert the following instructions after the DocumentRoot directive:

        <Location /projects>
          ForceType application/x-httpd-php
        </Location>
        <Location /users>
          ForceType application/x-httpd-php
        </Location> 
        

        Ensure the following lines are present and not commented out in /etc/httpd/conf/httpd.conf:

        LoadModule php_module	modules/libphp.so
        AddModule mod_php.c
        
    • Configuring PHP for Apache 2.0

      For newer versions of Apache 2.0 (RedHat 9 or above), please follow Apache 1.3 instructions above.

      1. Open /etc/httpd/conf.d/php.conf and put the rest of the directives in the primary virtual host.

      2. Change the existing Files directive to:

        <Files *.php>
            SetOutputFilter PHP
            SetInputFilter PHP
            AcceptPathInfo On
            LimitRequestBody 2097152
        </Files>
        

        The LimitRequestBody directive allows you to limit the maximum number of bytes of a request (including uploads). The default is 524288 (512Kb). This means that you cannot upload files with a size >512Kb. With this directive we set it to 2MB. If you wish to set this value higher than 2MB, you must also edit the upload_max_filesize directive in php.ini.

      3. Add the following lines:

        <Files projects>
        SetOutputFilter PHP
        SetInputFilter PHP
        AcceptPathInfo on
        </Files>
        
        <Files users>
        SetOutputFilter PHP
        SetInputFilter PHP
        AcceptPathInfo on
        </Files>
        
  8. Restart the Apache server: /etc/init.d/httpd restart

3.2.1. Project webs

Each project can have its own vhost. Module vhost_alias should be enabled and the following directives should be added to httpd.conf:

#
#	WARNING - security is degraded by having this
#	on the same machine as the primary GForge
#
<VirtualHost 192.168.1.1>
  ServerName projects.gforge.company.com
  ServerAlias *.gforge.company.com
  DocumentRoot /var/www/homedirs/groups
  VirtualDocumentRoot /var/www/homedirs/groups/%1
  <Directory /var/www/homedirs/groups>
    Options Indexes
#
#	WARNING - turning on php will allow any user
#	to upload a php file to your server, and include 
#	the gforge local.inc file and get your password to 
#	connect to the database and have total control.
#
    php_flag engine off
    AllowOverride None
    order allow,deny
    allow from all
  </Directory>
  DirectoryIndex index.html index.htm
</VirtualHost>

3.3. Configuring the database

  1. Configuring PostgreSQL

    Check to see if your PostgreSQL installation accepts connections on TCP/IP sockets. On RedHat 8.0, this is by default disabled. To verify this, type the following command:

    $ psql -h localhost template1
    

    If you get an error like this:

    psql: could not connect to server: Connection refused
    	Is the server running on host localhost and accepting
    	TCP/IP connections on port 5432?
    

    you need to set tcpip_socket = true in the file /var/lib/pgsql/data/postgresql.conf then you need to restart PostgreSQL server.

    On some systems, PostgreSQL is configured with the ident clause, allowing you only to access to the database if the username/password of your server is identical to the database username/password. You should either create a user called gforge on your server, or disable this feature: su - postgres;

    Open /var/lib/pgsql/data/pg_hba.conf and insert the following lines;

    For PostgreSQL 7.3 (note that you can figure out your PostgreSQL version by opening /etc/init.d/postgresql and looking for the string PG_VERSION=):

    local all all trust
    host all all 127.0.0.1 255.255.255.255 crypt
    

    For PostgreSQL 7.2:

    local all trust
    host all 127.0.0.1 255.255.255.255 crypt
    

    and comment out all default directives.

    Restart the PostgreSQL server as root user:

    # /etc/init.d/postgresql restart

    Become postgres user for the following commands:

    # su - postgres
    

    Now, initialize the database (if you haven't done so already):

    $ initdb
    

    Create the database user:

    $ createuser -P gforge 
    

    Answer the following two questions:

    Shall the new user be allowed to create databases? (y/n) y
    Shall the new user be allowed to create more new users? (y/n) n
    

    and insert a password (most people use “gforge”) for the user to be created.

    Create the database with PL/pgSQL support using the commands:

    $ createdb -U gforge -E UNICODE gforge
    $ createlang plpgsql gforge
    
  2. Installing the database

    Now it's time to install the database. The steps are:

    1. cd to /usr/share/gforge/db

    2. $ psql -a -U gforge gforge < gforge3.sql &> /tmp/gforge.sql.log
      

    Mandrake 9-specific installation notes (thanks to Francois Elie)

    • Edit /var/lib/pgsql/data/postgresql.conf:

      set tcpip_socket=true
      local all md5
      
    • Edit /var/lib/pgsql/data/pg_hba.conf:

      Set for example access right to

      host     all     0.0.0.0   0.0.0.0   md5
  3. Then restart the server: /etc/rc.d/init.d/postgresql restart

3.4. Upgrading database in existing install

You will upgrade your database from a prior version by applying each database schema change, in order, and applying it only once. Only apply the schema changes in the db/ folder that are dated after your existing installation.

There may also be migration scripts that have to be run. In the db/ folder, looked for migrate-*.php scripts and run them.

Warning

You have to apply database schema changes and to run migration scripts in the right order.

3.5. Configuring PHP

Verify the version of PHP installed on your system: php -v

  1. Open /etc/php.ini.

  2. If the PHP version you're using is 4.2.0 or later, enable the register_globals variable:

    register_globals = On
    
  3. Ensure that file uploads are allowed:

    file_uploads = On
    
  4. Add magic quotes to form fields passed to PHP:

    magic_quotes_gpc = On
    
  5. and configure the include_path directive as follows (on one line):

    include_path=".:/usr/share/gforge:/usr/share/gforge/www/include:/etc/gforge"
    

Note

If you want to use other applications on the server hosting your GForge, you may be interested in having GForge specific configuration in the GForge vhost directive.

Example 1. gforge.conf vhost configuration

<VirtualHost *>
	DocumentRoot /usr/share/gforge/www
	ServerName gforge.company.com
	ErrorDocument 404 /404.php
	php_value include_path ".:/usr/share/gforge/:/usr/share/gforge/www/include/:/etc/gforge/"
	php_value register_globals On
	php_value magic_quotes_gpc On
	AddDefaultCharset UTF-8
	AcceptPathInfo On
	<Location /projects>
		ForceType application/x-httpd-php
	</Location>
	<Location /users>
		ForceType application/x-httpd-php
	</Location>
</VirtualHost>

3.6. GForge Config File

In the GForge distribution, you will find etc/local.inc. Move it to /etc/gforge/local.inc and edit all of the settings.

Usually, you will want to make it readable only by webserver user (e.g. apache):

# chown -R apache:apache /etc/gforge/
# chmod 600 /etc/gforge/local.inc

3.7. Mail Aliases

Add the following line to /etc/aliases and run newaliases:

noreply: /dev/null

3.8. File Release System (FRS)

Create a directory (e.g. /var/lib/gforge/download) and make it owned by the webserver user (e.g. apache). Usually chown -R apache:apache /var/lib/gforge/download will do the trick. This directory will be referenced in the GForge Config File /etc/gforge/local.inc as $sys_upload_dir.

3.9. Configuring CVSWeb

Note

Since GForge 4.0, a specific version of CVSWeb is bundled in GForge SCM CVS plugin. You don't need to install CVSWeb anymore.

The following instructions are for GForge < 4.0.

You can download the latest official CVSWeb release from http://www.freebsd.org/projects/cvsweb.html but you should consider using the one bundled in GForge SCMCVS plugin.

Copy the tar.gz file into a tmp directory and unzip it:

tar -zxvf cvsweb.tar.gz

CVSWeb consists of a Perl script (cvsweb.cgi), a configuration file (cvsweb.conf), and some icons (back.gif, dir.gif, etc).

  • Copy the cvsweb.cgi script into Apache's cgi-bin directory

  • Copy the cvsweb.conf file into Apache's configuration directory (such as /etc/httpd/conf.d/ on RedHat 9)

  • Edit cvsweb.conf

  • Change %CVSROOT hash to include your repositories - note you'll need to have created a repository first, of course.

  • Change the $cvstreedefault variable to point to a default repository

  • With GForge specific CVSWeb, you don't need to add manually projects' repositories.

  • Edit cvsweb.cgi

  • Change the $config variable to point the cvsweb.conf file

  • Change the $PATH variable in cvsweb.conf to point to the directory that contains rlog

Possible problems:

  • Error: Configuration not found - edit cvsweb.cgi and point $config to the cvsweb.conf file

  • Error: Failed to spawn GNU rlog - ensure rlog is in the directory pointed to by $ENV{'PATH'}

Create in httpd.conf virtual host for viewing of CVSWeb:

<VirtualHost 192.168.1.1>
ServerName cvs.gforge.company.com
ServerAdmin webmaster@cvs.gforge.company.com
DocumentRoot /var/www/cvs
DirectoryIndex index.php cvsweb.cgi index.html index.htm
</VirtualHost>

3.10. Configuring GForge

  1. Login as root user

  2. Create a directory gforge-files:

    # mkdir /var/www/gforge-files

    Make this directory writeable by Apache:

    # chown -R apache.apache /var/www/gforge-files

    This directory will contain all files/patches uploaded to your gforge site.

  3. Create a directory /etc/gforge

  4. Copy the file local.inc.example from /usr/share/gforge/etc/ to /etc/gforge/

  5. Open /etc/gforge/local.inc, configuring the following basic parameters:

    1. Database configuration:

      $sys_dbhost="localhost" # some folks suggest setting this to "", your mileage may vary
      $sys_dbname="gforge"
      $sys_dbuser="gforge"
      $sys_dbpasswd="gforge"
      $sys_server="postgres"
      
    2. Change the value of the $sys_upload_dir to:

      $sys_upload_dir='/var/lib/gforge/download/';
    3. Change the value of the $sys_urlroot to:

      $sys_urlroot="/usr/share/gforge/www/";
    4. The directives $sys_default_domain and $sys_fallback_domain should contain the domain of your server, e.g. gforge.org.

  6. Restart Apache: /etc/init.d/httpd restart

3.11. Configuring GNU Mailman

GNU Mailman is used to help manage the GForge mailing lists. To install it:

Install a GNU Mailman package or compile it

su to root and set the Mailman password

Create in httpd.conf virtual host for Mailman, adjusting ScriptAlias and Alias directives:

<VirtualHost 192.168.1.1>
ServerName lists.gforge.company.com
ServerAdmin mailman@lists.gforge.company.com
DocumentRoot /var/www/mailman
DirectoryIndex index.php index.cgi index.html index.htm
ScriptAlias   /mailman/ /var/mailman/cgi-bin/
Alias /pipermail/ /var/mailman/archives/public/
</VirtualHost>

Run the script gforge/cronjobs/mail/mailing_lists_create.php; this creates any lists that are already in the database. Note that to run the script you need to invoke the PHP interpreter with the -f flag, i.e.:

# php -f mailing_lists_create.php

3.12. Configuring CVS

GForge uses CVS via pserver for anonymous read only access and ext for developers to commit to the repositories. To set it up:

Download and install the latest CVS package for your distribution.

Ensure the following info is in /etc/services:

$ grep cvspserver /etc/services
cvspserver      2401/tcp                        # CVS client/server operations
cvspserver      2401/udp                        # CVS client/server operations

Ensure the following info is in /etc/xinetd.d/cvspserver (if it doesn't exist, create a new file with the following text to enable anonymous access):

service cvspserver
{
        disable = no
        socket_type  = stream
        protocol  = tcp
        wait   = no
        user    = root
        server   = /usr/bin/cvs
        server_args  = -f --allow-root=/path/to/my/cvsroot pserver
}

Now add an anonymous user to your system with a blank password, or one of anonymous

3.13. Cron Jobs

Cron jobs are in the cronjobs/ directory and the README file contains a sample crontab. This gives you the basic cronjobs for updating certain statistics and data on the site.

cronjobs/cvs-cron/ contains scripts useful for creating blank cvs trees and managing the /etc/groups, /etc/passwd and /etc/shadow files. See cronjobs/README.root for more info.

cronjobs/mail/ contains files useful for the creation of new mailing lists in mailman and creating the /etc/aliases file.

# adduser anonymous
# cp /etc/aliases /etc/aliases.org
# cp /etc/shadow /etc/shadow.org
# cp /etc/passwd /etc/passwd.org
# cp /etc/group /etc/group.org
# mkdir /cvsroot

Warning

The following command will blow away any existing root crontab:

# crontab cronjobs/crontab.in

Now edit the paths to the cron scripts by setting the value of $GFORGE:

# crontab -e

Caution

The cronjobs/cvs-cron/usergroup.php cron script will meddle with your /etc/passwd, /etc/group, and /etc/shadow files. By default, this cron will save these files with a .new extension. You will have to edit the cron script to remove the .new extension, but you must make sure that it is properly generating your files or your server could be unusable.

3.14. JPGraph

PHP must be compiled with --with-gd, or appropriate package must be installed. Extra fonts for JPGraph are not necessary. Be sure your /etc/gforge/local.inc file contains the proper path to the jpgraph/src/ directory.

When you get your preferred version of JPGraph installed, you will have to edit one setting in jpgraph.php:

DEFINE("USE_CACHE", false);

Warning

Be careful with JPGraph license: versions > 1.5.2 are not free (as in free speech).

3.15. Perl

If you want to use some of the Perl scripts that access the database, you'll need the DBI and DBD::Pg Perl modules. On Red Hat systems (and variants), you can get them by installing the libdbi and libdbd-pgsql packages. On Debian systems (and variants), the packages are called libdbi-perl and libdbd-pg-perl.

You'll also need to install utils/include.pl to /usr/lib/gforge/lib/, and put some configuration variables into /etc/gforge/local.pl. In particular, you'll need something like the following in local.pl:

$sys_default_domain = 'gforge.company.com' ;
$sys_dbhost = '192.168.12.34' ;
$sys_dbname = 'gforge' ;
$sys_dbuser = 'gforge' ;
$sys_dbpasswd = 'p455w0rd' ;

3.16. Jabber Support

GForge supports the sending of messages to jabber accounts. To accomplish this, you must have a user account setup on the jabber server that gforge can connect to and send messages.

Once you have that user account, server, and password set up, just edit /etc/gforge/local.inc and add the information to the jabber section.

4. Verifying the installation

To verify if everything was installed correctly, use the browser and connect to GForge. You should see the GForge homepage.

Note

If you get an Error: Could Not Connect to Database, check if you have followed all installation instructions for the database. Also, you can experiment with making the settings in pg_hba.conf a bit more trusting - for example, change the last work of the second line from md5 to trust.

5. Creating the admin user

Site admins are anyone who is an admin of group_id=1.

  1. Connect to GForge and register a new account.

  2. Insert a valid email address; this will be used for the account confirmation.

  3. Open your e-mail client, wait for the email from GForge site and follow the link that appears on the message.

  4. Verify in Account Maintenance the user id of the user registered.

    Usually this is 102, but you can verify this by running the following SQL query via the PostgreSQL psql utility:

    $ psql -U gforge gforge
    gforge=> SELECT user_id FROM users WHERE user_name='YOUR USER NAME';
    
  5. Now set up the newly added user to be a GForge administrator:

    gforge=> INSERT INTO user_group (user_id,group_id,admin_flags) VALUES (102,1,'A');
    

Note

Once you have set up this user as an administrator, you can use GForge web interface to add more administrators.

6. Peer Ratings

Add yourself, and any others you wish, to the “Peer Ratings” project, which should be at /projects/peerrating/ on the website. Make yourself an admininistrator of the project, and then proceed to “rate” other users on the website.

Members of the “Peer Ratings” project, who are administrator of the project, become the first trusted users. This is the only way to prime the pump for the peer ratings system.

7. Installing a plugin

Note

From GForge 4.0, plugins are necessary as source code management is now provided by plugins (SCM* plugins).

For each plugin you can find an INSTALL file in the plugin tarball.

GForge Administration Guide

Ken McCullagh


1. Introduction

This document is intended to be a guide for administering projects on GForge. It is not intended to describe how to administer the GForge site itself. It is assumed that the reader will have also read the GForge User's Guide before reading this document.

2. What is GForge?

GForge was developed by the Open Source community as an environment in which to host projects in a way that the code, documentation, binaries etc. were publicly accessible to all who wished to see them, and members of the public could use the software that was developed, and contribute feedback, bugs, ideas and suggestions, and even help to develop code/modules/documentation/resources for the software.

Traditionally it was used for software projects, although there is really no reason why it cannot be used to develop hardware or silicon projects also.

Generally, everyone needs to have read access to the data associated with a project, with (some of) the developers having write access to the data. Usually there is a maintainer of the code (the project leader or the person who registered the project) and contributers who email any changes to the code that they developed - bug fixes, additional functionality - which the maintainer adds to the code in the CVS tree upon verification that it was correct/clean/maintainable/useful.

3. What can GForge do for me?

GForge can provide a centralized access point for several useful utilities and tools which could be used in a project. Some of these tools include:

  1. A version control repository (CVS)

  2. Mailing lists

  3. Discussion forums

  4. Bug tracking

  5. A web interface to CVS

  6. Task lists

  7. A website which provides some usage statistics, including the project members, the number of mailing lists, CVS statistics, the number of items in the discussion forums, etc.

4. Setting up a new project

In order to get a project up and running, you must be registered as a user of GForge. This is described in the GForge Users Guide.

5. Registering a new project

It is quite straightforward to register a new project on GForge. The steps involved are:

  1. Login to GForge

  2. Select Register New Project from the menu on the left hand side of the page.

  3. Fill in the Full Name, Unix Name, Project Purpose and Summarization fields (paying attention to the restrictions listed on the page) and select a license type.

  4. Click Proceed with this registration and assuming that all the details are correct, and that the name is unique, the project will be accepted pending approval. If there are details missing, or other errors, you will be informed of the problem.

  5. Assuming that the project is approved, you will be sent back an email confirming that this is the case, and listing the website, cvsroot etc of the project you created. It will take some time for the cvsroot to be created - usually by an overnight cronjob.

Once you have received the email confirming project acceptance, you will be able to find your project through the search box by enteringyour project's name or details. Clicking on the link provided will bring you to the project summary page which is the default starting point for all the project administration.

6. Administering a new project

This section provides an oversight on how to set up the GForge utilities so that they can be used by your project once it has been approved. Typically the cvs space will have been allocated by the morning after the confirmation email is sent to the project requester. In order to get the project into a useable state, the project administrator will need to perform some steps.

7. CVS repository

If the project does not already have a CVS repository in place (eg if an existing project is being added to GForge mid-life, rather than a brand new project being started) the CVS repository will need to be set up. There are plenty of resources on CVS around so this document will not attempt to describe how to use CVS, but will provide just enough information to get started.

8. Setting up the CVSROOT

Before any CVS operations can be carried out, the CVSROOT environment variable must be set in the command shell you are using, or in whatever CVS GUI you are using, such as WinCVS.

9. Setting your .rhosts file correctly

In your UNIX home directory there exists a file called .rhosts. This file requires special permissions, namely :

-rw-r--r--   .rhosts

If this is not correct, you will encounter problems trying to access CVS. If this file is not present, it must be created.

Secondly, your .rhosts file must contain the name of the machine(s) from which you are accessing CVS. The format of the file is as follows:

	machine1 username
	machine2 username

It is recommended that fully qualified domain names are used, or IP addresses, as this seems to solve problems arising due to machines in different offices accessing each other. The last line of the file may optionally be

	+ username 

to allow UNIX (not Linux) machines to use wildcard matching to allow access from all hosts on the network. This does NOT work on Linux, which is what the GForge server runs. Also, if the wildcard entry is before the machine you wish to use, then it will not work either.

10. Creating the CVS repository

Once CVSROOT has been set, the base entry for CVS can be added. This is the top level for the directory structure of the repository.

This is done using the cvs import command. The following steps show how it can be done.

	$ cd <top of tree>
	$ cvs import <module-name> <vendor-tag> <release-tag>

e.g. suppose we wish to import a directory structure called myproject, which was obtained from "customer" and is labelled "releaseone" we would do:

	$ cd path/to/myproject
	$ cvs import myproject customer releaseone

If we wanted to create a clean, new directory structure called mynewproject we could do something like this.

	$ mkdir mynewproject
	$ cd mynewproject
	$ cvs import mynewproject mycompany start

This is pretty much all that has to be done to start up the CVS repository - after this the repository can be used in the normal way. It is also possible to import several modules to the same CVS repository. e.g.

	$ cd path/to/src
	$ cvs import src S3 src0
	$ cd path/to/docs
	$ cvs import docs S3 docs0

But as was said earlier, this is not the place to provide a complete introduction to CVS. Go out and find some of the abundant documentation that is available for it on the web and elsewhere. Most importantly, if you run into a problem with CVS, it is NOT the GForge administrator's fault so don't go running to them every time. Try to figure it out yourself or go looking for help on CVS related news groups.

GForge User Guide

Ken McCullagh

Guillaume Smet

Reinhard Spisser


1. Introduction

This manual explains how to use the GForge software.

The manual is divided in 4 parts:

1.1. Getting Started

This section explains how to register as a new user, how to register a new project, how to login and how to logout.

1.2. User specific functions

This section describes the functions of GForge that are relative to the user's section.

This document describes the user's homepage, how to modify user settings, how to handle user ratings, skill profiles and Diary and Notes.

1.3. Project specific functions

This section explains the project specific functions of the GForge software.

Project Summary

This document describes the Project Summary page for your project.

Project Administration

This document describes the Administration of the project. The Project Administrator function is accessible only to the Project Administrators.

Discussion Forums

This document describes the use and administration of the Discussion Forums.

Tracker

This document describes how to use the Tracker to track bugs, patches, support requests.

Mailing Lists

This document describes the creation of maintenance of mailing lists for your project.

Task Manager

This document describes how to use the Task Manager to track activities.

Document Manager

This document describes the Document Manager.

Surveys

This document describes how to set up Surveys for your project.

News

This document describes how to add and release News for your project.

CVS

This document describes how to manage CVS repositories for your project.

File releases

This document describes how to publish new releases of your project.

1.4. Site-wide functions

Trove Map

This document describes the Project Classification System.

Snippet Library

This document describes how to use the code fragment Library.

Project Help

This document describes how to use the Project help function of GForge.

2. Getting Started

2.1. GForge homepage

Connect with your browser to GForge. This can be either http://gforge.org or a locally-installed version of the software.

2.2. Registering as a new user

To register a new user, click on the New Account link on the top right side of the browser window.

To register as a user, you need to fill out the form with the following data:

Login Name

You should select an unique user name to access to the system. The name should not contain uppercase letters and usually is a combination of your name and your surname; e.g. jdoe for John Doe. Also, the user name cannot match that of an existing system user account - i.e., you can't have a GForge user named 'root'.

Password

You should insert your password here. It must be at least 6 characters long. You shouldn't use too obvious names for the password. It should be easy to remember for you, but hard to guess for others. So don't use the name of your dog, of your cat, or the name of your birth city.

You should use instead a combination of letters and numbers.

Full/Real Name

Here you should insert your full name.

Language Choice

Select here your preferred language. This choice does not influence only the language in which GForge will speak to you, but also some local specific data display, like dates, etc.

Timezone

Select your timezone. Note that GMT is preselected. All dates will be showed relative to your timezone.

Email Address

You should insert your email address here.

The email address should be correct, GForge will send you a confirmation email for your subscription. If the email address you're inserting here is wrong, you'll never receive the confirmation email and the account you're registering will never be activated.

When you receive the confirmation email, you must connect to GForge using the provided URL in the email. This is the only way to become a registered user.

Receive Email about Site Updates

If you check this, you'll periodically receive information about the GForge site. The traffic is very low, it is recommended that you activate this option.

Receive additional community mailings

If you check this, you will receive information about the site's community.

2.3. Registering a new project

To register a new project, connect to your GForge , login and go to My Page section. You have a Register Project link in the menu at the top of the page.

You need to insert the following information to register a project:

Project Full Name

The Name of the Project: eg. Gforge Master project

Project Purpose and Summarization

A brief summary of the Project

License

You must select a License for your software.

Project Public Description

Insert a description of the Project. This description will appear in the Project Summary page

Project Unix Name

Insert here the unix name of your project. This name must respect the following rules:

  1. it cannot match the unix name of any other project

  2. its length must be between 3 and 15 characters

  3. it must be in lowercase

  4. only characters, numbers and dashes are accepted

The unix name will be used for your website, the CVS Repository and the shell access for GForge.

Note

the unix name will never change. Once a project is set up with its unix name, the name cannot be changed.

Click on the I agree button to register the project. Your project is now registered on GForge; but you cannot yet access it. It has to be approved from the site administrators.

When the project is approved, you'll receive an email from GForge confirming that the project is active.

2.4. Login

You can login by clicking the Login link in the top-right border of the browser window.

The form requires that you insert your username and your password to access the site. If the data is correct, the user homepage will be displayed.

2.5. Logout

To log out from GForge, click on the Logout link on the top right of your browser window.

3. User specific functions

3.1. User Homepage

The User home page appears after the user has performed the login or when he clicks the My Page tab.

The User homepage contains a list of all open activities/tracker items:

My Assigned Items

This list shows the Tracker items assigned to you. Only items in the open state will be listed here. Clicking on the number of the item, you'll go to the detail of the item. The items are ordered by priority.

My Submitted Items

This list shows the Tracker items submitted by you. Only items in the open state will be listed here. Clicking on the number of the item, you'll go to the detail of the item. The items are ordered by priority.

Monitored Forums

This list shows the Forums you are monitoring. See the section about Forums for more details on how monitoring works.

Monitored FileModules

This list shows the FileModules you are monitoring. See the section Filemodules for more information on how monitoring of FileModules works.

Quick Survey

This box shows the open surveys. The survey will be displayed directly in the Survey box.

My Bookmarks

This list shows your bookmarked pages. When you click on a bookmark, you'll go direct to the page you bookmarked. When you click on Edit, you can edit or delete the bookmark.

My Projects

This list shows you the active projects you are participating. When you click on a project, you will go to the project summary.

Pending Projects

This section lists the new projects registered on GForge. This section is available only to administrators of the GForge site. It will be displayed only when pending projects needs to be approved.

Pending News Bytes

This section lists the News that needs to be approved by the user.

3.2. Modifying User settings

When you click on Account Maintenance on your user homepage, you get a page where you can change some data you inserted. You can change every data you inserted when you registered as user except:

  • Registration date (Member since)

  • User Id

  • Login name

3.3. User ratings

You can be rated by other users and you can rate other users. Every time you go to the detail of a user, you can rate the user.

Ratings can be given for:

  • Teamwork/Attitude

  • Coding

  • Design/Architecture

  • Follow-Trough/Reliability

  • Leadership/Management

3.4. Skills profile

In this section you can add your skills. You can set your skills profile to public, so everyone can see it, or to private, so that only you can view it.

The information that you can insert is:

  • Language

  • Level of experience (Beginner, Master, expert)

  • Duration of experience (6 months, 1 year, 5 years)

3.5. Diary and Notes

The Diary and Notes section allows you to simulate a basic agenda. You can insert a subject and a description of the item and select if the item is public or private.

If the item is public, every user of GForge can view and monitor this item.

4. Project functions

4.1. Project Summary

The project summary shows summarized information about the current project. The following information is displayed:

Project description and statistics

Description of the project and some statistics about it

Project administrators and members

List of the developers involved in the project

Latest file releases

Latest file releases published via the FRS.

Public areas

For each Tool of GForge, Summary Information is displayed; e.g. Public Forums (7 message in 2 forums), Bugs (4 open, 12 total).

News

Latest news of the project.

4.2. Project Administration

The Project Administration section allows you to administer the project.

4.2.1. The Project Admin Page

The Project Admin web page is where all the administration of the project is done from. To get there, log into GForge, and select the project from your personal page. This will bring you to the Project Summary page.

The Project admin page is available by clicking on the Admin tab.

Clicking here will present you with links to Admin, User Permissions, Edit Public Info, Project History, VHOSTS, Post Jobs, Edit Jobs, Edit MultiMedia Data, Database Admin and Stats. The Project Admin page is only accessible to members of the project who have been granted administrator privileges. By default, the person who registers the project is given admin privileges. Other members can be granted admin rights by the project administrator(s).

4.2.2. Admin

The Admin page presents the user with Misc. Project Information, Trove Categorization, Tool Admin and Group Members.

Misc Project Information

This shows the Short Description of the project and the location of the project homepage. There's also a link to Download Your Nightly CVS Tree Tarball, but this doesn't currently work.

Trove Categorization

In order for people to be able to find the project, it must be classified in the Trove Map. This is basically a set of categories in which like projects are grouped.

Clicking on Edit Trove Categorization presets a page which allows you to select the category(s) to which the project belongs (select as many as needed).

Clicking Submit All Category Changes will set the categorizations, and you will be returned to the Project Admin page. You can change the trove categorizations during the lifetime of the project by following the above steps, as the project moves through its life.

Tool Admin

This section shows the links to the tools describes the tools listed under the Tool Admin section on the Project Admin page.

Group Members

This displays the names of the members in the project, and allows you to add members or delete them. To add members simply enter their Unix Name into the box provided and press Add User. To remove them, click on the rubbish bin to the left of their name. The Edit Member Permissions functionality is described in the section User Permissions.

4.2.3. User Permissions

This allows the project admin to set the permissions of each member of the project. The page is self explanatory.

4.2.4. Edit Public Info

This page enables the project admin to select the information that is visible to the public and to the members of the project. It is possible to select the utilities that are used by the project, so that any that are not desired are not presented on the web page. Specifically it is possible to disable/enable:

  • Mailing Lists

  • Surveys

  • Forums

  • Project/Task Manager

  • CVS

  • pserver (CVS server with password authentication)

  • Anonymous access to CVS

  • News

  • Document Manager

  • FTP

  • Tracker

  • File Release System (FRS)

  • Statistics

It is also possible to change the home page (eg, it is possible to set up a web page on another machine, which has other information). In this case, the summary page will remain on GForge, pointing to the project, and the Home Page link will point to the pages specified in the Homepage Link field.

You can also change the descriptive group name and the short description. If desired you can add an email address to which all Bugs, Patches, Support Requests and Task Assignments will be sent. This could be a Mailing list or just an email address.

4.2.5. Project History

This page presents a history of the project, so you can see when major changes took place, eg members added/removed, Trove categories changed etc. There is nothing that you can do here.

4.2.6. VHosts

This section allows you to handle the different virtual hosts needed for your project. A small interface is presented where you can add, modify or delete virtualhosts.

Note

These virtualhosts are not created immediately, they are created by a backend script (be sure that the backend script is configured in your crontab).

4.2.7. Post Jobs

This allows you to post jobs for your project, so that when non-project members visit the site, they can offer to help with the development.

4.2.8. Edit Jobs

This allows you to edit the jobs that have been posted for your project.

4.2.9. Edit Multimedia data

This allows you to publish screenshots of your project.

4.2.10. Database Admin

This allows you to maintain projects' databases.

4.2.11. Stats

This section shows you information about your project:

Usage statistics

A graph shows you for the latest 30 days the number of views/dowloads for each day.

Lifetime statistics

This stat shows you, for the lifetime of the project, the number of visits/downloads, number of items inserted in the tracker, number of items in the PM/Task manager

4.3. Forums

Every project can have his own discussion forums. When a new project is created, 3 forums are automatically created:

Open Discussion

A place where to discuss about everything.

Help

A forum where to ask for help.

Developers

A place where developers discuss about developments.

4.3.1. Creating a new forum

New forums can be created using the Admin section of the forum. When a new forum is created, you must insert a name of the forum, the description of the forum, select if the forum is public or private and if anonymous posts are allowed on the forum.

Public forums are visible only to project members. If Anonymous posts are enabled, everybody can post messages to the forum, even users that are not logged in.

You can also insert an email address where all posts will be sent.

4.3.2. Using the forum

When you click on the name of the forum, you go to the detail of the forum.

You can select the following types of visualization for the forum lists:

Nested

Shows the messages ordered by thread. All data of the message, including the posted message itself will be visualized.

Flat

Similar to Nested, the messages will be showed in chronological order.

Threaded

Shows only title, author and date of each message. Shows the messages in threaded order. Clicking on the title of the message the entire message will be displayed.

Ultimate

Shows only the “topic started” messages. Topic starters are the messages that starts a new thread.

You can select the number of messages for every page: 25, 50, 75 or 100.

4.3.3. Available options

The forums have 2 very powerful options:

Save place

This function registers the number of messages already inserted in the forum and will highlight new messages the next time you return to the forum.

Monitor forum

You can select to monitor the forum by clicking on the Monitor Forum button.

If this option is enabled, every post to the forum will be sent to you by email.This allows you to be informed about new messages without being logged on to gforge. The name of the monitored forum will appear in the users homepage in the section Monitored Forums.

4.3.4. Forum admin

Clicking on the Forum Admin link presents you with links to Add Forum, Delete Message or Update Forum Info/Status.

4.3.4.1. Add Forum

This allows you to add a new discussion forum. You can select if it is public or private (only members of the project can see it).

4.3.4.2. Delete Message

This allows you to delete a message (and any followups) from a forum. You must know the message id of the message you wish to remove. This can be obtained by viewing the message in the forums web page and noting the message id of the message.

4.3.4.3. Update Forum Info/Status

This allows you to alter the properties of the forum such as the name and description, whether or not anonymous posts are allowed, if it's public and you can enter an address to which all messages are posted.

4.3.5. Searching

When using a forum, a voice Forum will appear in the search combo box. Selecting Forum and inserting a text in the search box allows you to search through the text data of the forum.

4.4. Tracker

4.4.1. What is the Tracker?

The Tracker is a generic system where you can store items like bugs, feature requests, patch submissions, etc.

In previous versions of the software, these items were handled in separate software modules. Bugs, Enhancement Requests, Support Requests and Patches handle the same type of data, so it was logical to create an unique software module that can handle these types of data. New types of trackers can be created when needed, e.g. Test Results, meeting minutes, etc.

You can use this system to track virtually any kind of data, with each tracker having separate user, group, category, and permission lists. You can also easily move items between trackers when needed.

Trackers are referred to as “Artifact Types” and individual pieces of data are “Artifacts”. “Bugs” might be an Artifact Type, while a bug report would be an Artifact. You can create as many Artifact Types as you want, but remember you need to set up categories, groups, and permission for each type, which can get time-consuming.

When a project is created, GForge creates automatically 4 trackers:

Bugs

Used for Bug tracking

Support Requests

Users can insert here support requests and receive support

Patches

Developers can upload here patches to the software

Feature Requests

Requests for enhancements of the software should be posted here

4.4.2. Using a Tracker

The following descriptions can be applied to any of the trackers. The functionalities between the different trackers are the same, we'll use the Bugs Tracker as example to describe the functionality of all trackers.

The Tracker provides the following functions:

  1. Submitting a new item

  2. Browsing of Items

  3. Reporting

  4. Administration

4.4.3. Submitting a new Bug

To submit a new bug, click on the Submit New link. A form will be displayed, where you can insert/select the following data:

Category

The Category is generally used to describe the function/module in which the bug appears. E.g for GForge, this might be the items “User Login”, “File releases”, “Forums”, “Tracker”, etc.

Group

The Category can be used to describe the version of the software or the gravity of the bug. E.g “3.0pre7”, “3.0pre8” in case of version or “Fatal error”, “Non-fatal error” in case of gravity.

Assigned To

You can assign the item to a user. Only users which are “Technicians” are listed here.

Priority

You can select the Priority of the item. In the Browse list, and the homepage of the users, priorities are displayed in different colors, and can be ordered by priority.

Summary

Give a short description of the bug, e.g. Logout function gives an SQL Error

Detailed Description

Insert the most detailed description possible.

File upload

You can also upload a file as an attachment to the bug. This can be used to attach a screenshot with the error and the log file of the application.

To upload the file, Check the checkbox, select a file using the Browse button and insert a file description.

Note

Attachments to tracker items can be no larger than 256KB.

4.4.4. Browse Bugs

The Browse page shows the list of bugs. You can select to filter the bugs by Assignee, Status, Category or Group.

You can sort the items by ID, Priority, Summary, Open Date, Close Date, Submittere, Assignee and the Ordering (Ascending, descending).

The different colors indicate the different priorities of the bug; a * near the open date indicates that the request is more than 30 days old. The overdue time (default 30 days) is configurable for each tracker.

When you click on the summary, you go to the detail/modify Bug page.

4.4.5. Modify Bugs

In the modify Bug page, you can modify the data you inserted, and also add the following information:

Data Type

This combo box lists the trackers of the project. If you select a different tracker and submit the changes, the item will be reassigned to the selected tracker.

Status

The status indicates the status of the item. When an item is inserted, it is created in the “Open” state. When you fix a bug, you should change the state to “Closed”. When a bug is duplicated or not valid, change it to “Deleted”.

Resolution

This indicates the resolution of the item.

Canned Responses

Canned responses are prefixed responses. You can create canned responses for your project in the admin section and select the responses in the combo box.

The Changelog on the bottom of the page shows in chronological order the changes applied to the item. Also all followups can be viewed.

4.4.6. Monitor Bugs

If you select the Monitor button on the top left of the Bug detail page, bug monitoring will be enabled.

When you are monitoring a bug, every change to the bug will be sent to you by email.

To disable bug monitoring, simply reselect the Monitor button.

4.4.7. Admin Tracker

If you are an Administrator of the tracker, you can add or change bug groups, categories, canned responses:

Add/Update Categories

You can add new categories or change the name of existing categories.

You can also select a user in the Auto-Assign To combo box; every bug with this category will be auto-assigned to the selected user. This feature can save you lots of time when administering the tracker.

Add/Update Groups

You can add new groups or change the name of existing groups.It is not recommended that you change the group name because other things are dependent upon it. When you change the group name, all related items will be changed to the new name.

Add Update Canned Responses

Canned responses are predefined responses. Creating useful generic messages can save you a lot of time when handling common requests.

Add Update Users and Permissions

You can add new users to the tracker or delete users from the tracker.

-

The user has no specific permission on the tracker; he cannot administer the tracker, no items can be assigned to the user.

Technician

Items can be assigned to the user.

Administrator and Technician

The user is both an Administrator and also a Technician.

Administrator

User can administer the tracker (add user, set permissions, create/update groups, categories, canned responses).

Update preferences

Here you can update the following information on the tracker:

Name

The name of the Tracker. This is the name displayed in the tracker list, e.g. Bug Submissions.

Description

The description of the Tracker. E.g. This is the tracker dedicated to the Bugs of the project

Publicly Available

By default, this checkbox is not enabled.

Allow non-logged-in postings

If this checkbox is enabled, also non logged-in users can post items to the tracker. If this checkbox is not enabled, only logged in users can post items.

By default, this checkbox is not enabled.

Display the “Resolution” box

By default, this checkbox is not enabled.

Send email on new submission to address

All new items will be sent to the address inserted in the text box.

Send email on all changes

If this checkbox is enabled, all changes on the items will be sent out via email. It is useful to check this radiobutton only if in the Send email address is inserted an email address.

Days still considered overdue

Days till pending tracker items time out

Free form text for the Submit new item page

This allows you to put a specific introduction on the submit new item page.

Free form text for the Browse items page

This allows you to put a specific introduction on the Browse items page.

4.4.8. Mass Update

If you are an Administrator of the tracker, you are also enabled for the Mass Update function.

This function is visible in the browse bug page and allows you to update the following information:

  1. Category

  2. Group

  3. Priority

  4. Resolution

  5. Assignee

  6. Status

  7. Canned Response

When this function is enabled, a checkbox will appear at the left side of each bug id. You can check one or more of the ids, select one or more of the values in the Mass Update combo boxes and click Mass Update.

All selected bugs will be modified with these new value(s). This function is very useful if you need to change the same information for more bugs; e.g. assigning 5 bugs to one developer or closing 10 bugs.

4.4.9. Reporting

The reporting functions allows to check the life-span of the Bug. The lifespan is the duration of the bug; it starts when the bug is inserted (opened) in the tracker and ends when the bug is closed.

Aging Report

The Aging report shows the turnaround time for closed bugs, the number of bugs inserted and the number of bugs still open.

Bugs by Technician

The Bugs by Technician report shows for every member of the project: the number of bugs assigned to the user, the number of closed bugs and the number of bugs still open.

Bugs by Category

The Bugs by Category report shows for every Category: the number of bugs inserted, the number of closed and the number of open bugs

Bugs by Group

The Bugs by Group report shows for every Group: the number of bugs inserted, the number of closed and the number of open bugs.

Bugs by Resolution

The Bugs by Resolution report shows for every type of Resolution (Fixed, invalid, later, etc): the number of bugs inserted, the number of closed and the number of open bugs.

4.4.10. Searching for bugs

When using a tracker, a voice with the name of the tracker will appear in the search combo box. The search will be done on the description, the summary, the username of the submitter and the username of the assignee.

4.5. Mailing Lists

4.5.1. Main page
4.5.2. Admin

This is where you will set up and administer the mailing lists associated with the project.

4.5.1. Main page

This page shows the list of available mailing lists.

Clicking on List Name Archives will allow you to browse the archives of the selected mailing list.

You can subscribe, unsubscribe or edit your preferences for a specific mailing list by clicking the appropriate link.

4.5.2. Admin

This brings you to the Mail Admin page, where the following options are available to you.

Add Mailing List

Clicking here will allow you to create a new mailing list. You can specify if it is to be made public (people who are not members of the project can see and/or join it) or not. You can also add a description of the list. You will receive an email with the administration password of the list.

Administrate/Update Lists

This allows you to change the description of the list, the state of the list, and by clicking on Administrate this list in GNU Mailman you can add members to the mailing list, set the properties of the list, posting policies and so forth.

4.6. Task Manager

The Task Manager is similar to the tracker, with the following differences:

  • you can insert the start date of the item

  • you can insert the end date of the item

  • you can insert the number of hours for the item

  • you can have multiple assignees for the item

  • you can handle dependencies between tasks

Tasks are organized in subprojects. Before inserting a new task, you must first create a subproject. You can use the Admin link to create new subprojects.

Tasks allows you to create and manage tasks, or blocks of work, similar to the way projects are broken down in eg MS Project.

4.6.1. Inserting a new Task

This allows you to add tasks to the sub projects - e.g. Write Design Doc, Review Doc, Update Doc, Write Code, Review Code, Update Code, Test, Log Test Results, etc. They can be assigned to members of the team, and start and end dates set up for them, dependencies on other tasks set, percentage completion etc.

You need to select first a subproject from the subproject list and then select the Add Task link.

A form appears, where you are requested to insert the following data:

Percent Complete

You can select here the Percentage of the completion of the work.

Priority

You can select here the priority of the task.

Task Summary

You should insert a brief description of the task.

Task Details

You should insert here the most detailed description possible of the task.

Start Date

You can insert here the start date.

End Date

You can insert here the end date of the task.

Assigned To

You can select one or more assignees of the task. Only users which are defined as “Technicians” are listed here.

Dependent on task

You can select here one ore more task upon which this task depends.

Hours

It is the estimated duration of this task in hours.

Only Administrators can add new items on the Task Manager; only Administrators can make changes to the task; only administrators can close the task.

4.6.2. My Tasks

It lists the tasks assigned to the user.

4.6.3. Browse Open Tasks

It lists all tasks in the open state.

4.6.4. Reporting

The Reporting is similar to the reporting section of the Tracker.

4.6.5. Task Admin

The Admin section allows you to:

Add a project

You can select if the subproject is public (visibile to everyone) or not (visibile only to project memebers).

This allows you to add a subproject to a project, such as modules, documentation, etc.

Required arguments are Project Name and description.

Update information

Here you can select if the project is public, private or deleted (visible to nobody) and update the name and description of the subproject.

4.7. Document Manager

The Document Manager provided with GForge gives you a simple way to publish documents on the site.

4.7.1. Submit new documentation

Here you can submit new documents for approving/publishing on the site. The form requires you to insert the following information:

Document Title

The document title refers to the relatively brief title of the document

Description

A brief description to be placed just under the title.

Upload File

Here you should select the file to be uploaded. You can upload text files (.html, .txt) or binary files (.zip, .doc, .pdf).

Language

You should select here the language of the document.

Group that document belongs in

You should select here the group of the document. This feature is used to categorize documents.

Fill in all the fields, select the group from the drop down list and click Submit Information. The document will then be placed in the Pending Submissions section of the DocManager Admin page, to be approved or rejected.

4.7.2. Viewing existing docs

The View Documentation page shows you a list of documents published and approved for viewing; grouped by Document groups. You can click on a document to view the entire content.

4.7.3. Admin

Clicking on this will present you with a page showing pending and active documents. In order to allow users to submit a document, you must first set up the document groups for the project.

The Admin section allows you to:

Approve/publish pending submissions

The Pending Submissions list shows the list of submissions that are waiting for your approval. Clicking on the document name, the Edit Document form will be displayed.

Edit Documents

The Edit Document links shows all states of the documents, and the documents in the state:

Active Documents

Active Documents are displayed in the View Documentation list.

Pending Documents

Pending Documents are waiting for your approval.

Hidden Documents

Hidden documents are not displayed.

Deleted Documents

Deleted Documents are old, outdated documents.

Private Documents

Private documents are displayed only for members of the project.

Edit Document Groups

Clicking on this will present you with a box and a button to add document groups, and it also shows the document groups associated with this project. Submit as many document categories as you wish - eg Howto, Release notes, FAQ, etc. These groups will be the categories the documents will fall into when users submit documents.

4.7.4. Edit Document

When you select a document from one of the lists, a form will be displayed. In this form you can change the Document Title, the Short Description, the Language, the Document Group and the State.

If the Document is a text file with .txt, .html or .htm extension, a textbox appears where you can edit the content of the document.

If the Document is a binary document, you can upload a new version of the document.

4.8. Surveys

4.8.1. Introduction

Surveys allow you to ask questions to your developer/users and view the results. Surveys are often very helpful if you need some feedback from the users, examples of surveys might be:

  1. User feedback: ask users if they like your project

  2. Developer feedback: ask developers on new features to be implemented

Of course, surveys are not limited to this list. Basically, you can ask everything you want with surveys.

4.8.2. Administering survey questions

Before you can add/modify existing surveys, you need to administer the questions for your surveys. Questions are global for all surveys.

Gforge surveys handle the following question types:

  1. Radio Buttons 1-5: This type of question shows 5 radio buttons where the user can select between 1 (low) and 5 (high).

    This is useful for indicating priorities or quality feedback (e.g.: the question might be: did you like the new xxx feature. The user can select (1 (not very much), 2,3,4, 5(really)

  2. Radio Buttons Yes/No. This type of question allows only two choices: Yes or No.

  3. Comment Only

  4. Text field: This type of question allows the user to insert some text in a text field.

  5. Text area: This type of question allows the user to insert some text in a textarea

When inserting new questions or modifying existing questions, take note of the ID of the question. You'll need them when creating/modifying surveys.

4.8.3. Creating a new survey

You can create a new survey by clicking on the Admin link and then Add a new survey.

You'll be asked to insert the following data:

Survey name

The name of the survey

Survey name

The name of the survey

Question list

Here you should insert the IDs of the questions in the order they should appear. If you wish to see question 4 first, then question 6, then question 1, you should insert here 4,6,1.

Warning

Don't insert spaces or any other character between the numbers.

Active

This flag indicates if the survey is active or not.

4.8.4. Modifying a survey

You can modify an existing survey, although this is not recommended if answers to the survey have already been given.

You should know that the results of a survey ar not consistent if you modify the survey and users have already inserted answers.

4.8.5. Viewing survey results

You can view the results of the surveys cliccking on the View Results tab.

4.9. News

The news section allows you to insert news relative to your project. News can be monitored similar to tracker items, forums. News will be displayed on the project homepage and also on the site homepage, if the site administrators approve the news.

News are generally used to announce software releases, milestones, or significant changes in the software.

4.9.1. Inserting a news item

You can insert a news item by clicking on the Submit link.

You can post news about your project if you are an admin on your project.

All posts for your project will appear instantly on your project summary page. Posts that are of special interest to the community will have to be approved by a member of the GForge news team before they will appear on the GForge home page.

You may include URLs, but not HTML in your submissions. URLs that start with http:// are made clickable.

The news item will go to the News Admin for approval for publication.

4.9.2. Modifying/Approving a news item

You can modify or/and approve a news by clicking on the Admin Link.

You can select the status of the news: Displayed or Deleted (the news will be deleted), you can insert the Subject (title) and the details.

4.10. CVS

The CVS button shows a page that contains information on how to access the CVS repository. Use this information to configure your client for CVS access.

This page also displays some statistics about the selected project's CVS tree.

The Browse CVS Repository link opens the viewcvs web interface, where you can view the CVS repository, view differences between revisions, download versions of a file.

Note

Only public projects will show the browse CVS repository link.

4.11. File Releases

4.11.1. Introduction

The File Releases System (FRS) is used to upload files to the GForge site and to make these files available to the users in an easy and efficient way.

Files can be divided in different packages, and every single package can be monitored by the users; these users will receive an email every time a new file has been added to the package.

4.11.2. Administration

The FRS system allows you to upload file to GForge and make this file available to the public.

You have to define a package before you can release a file. A package should have a descriptive name for the project, e.g. gforge3.

To add a new package, insert a package name in the textbox at the bottom of the page and click Create this Package.

Your package will appear in the Releases list at the bottom of the page.

Click Add release. The form has the following fields:

Package ID

You can select here the package.

Release Name

Insert here the name of your release. The name should be indicative for the version of your file, e.g. pre-8.

Release Date

The Release Date.

File Name

Click the browse button to select the file to upload. In some browsers you must select the file in the file-upload dialog and click OK. Double-clicking doesn't register the file.

Note

You can't upload file that exceed the UploadFile Limit in php.ini.

File Type

You can select here the file type (.zip, .html, .exe, .tar.gz, etc).

Processor Type

You can select here the processor required to run the application.

Release Notes

The release notes.

Changelog

The changelog.

Click the Release File button. Your file will now appear in the list of files in the File section.

5. Site-wide functions

5.1. Introduction

The side-wide functions are available anytime, they are not dependent on the single projects.

The site-wide functions handle data that are not relevant to a single project, as code fragments, project classification, project helps, etc.

The single site-wide functions available to the users are:

  • Project help

  • Search

  • Snippet Library

  • Trove map

5.2. Searching in GForge

You can search in GForge for the following arguments:

People

You can search for login name or the complete username. The search is not case sensitive. Inserted text must be at least 3 characters.

Software/Group

You can search for software groups. Inserted text must be at least 3 characters.

Skill

You can search for skills inserted by the users. Only public skills profiles can be searched. Inserted text must be at least 3 characters.

You can search for People or Software groups by selecting the item in the combo box and inserting the search text in the text box.

If the user is inside one of the Trackers, a voice Tracker appears in the combo box.

If the user is inside a forum, a voice Forum appears in the combo box.

5.3. Trove map

This allows users to classify their projects in a tree so that they can be found more easily.

5.4. Snippet Library

The Snippet Library function of GForge is very interesting; it allows to collect all the type of information/knowledge which is not a complete piece of code and which is usually difficult to organize/share.

A typical example are sophisticated shell commands, javascript functions, perl one-liner, SQL expressions that perform special queries, an algorithm, etc.

5.4.1. Inserting a new snippet

You can insert a new Snippet by clicking on the Submit a New Snippet link.

A form appears, where the following information can be inserted:

Title

Insert the title of the snippet. This will be displayed in the list of the snippets.

Description

Insert the description of the snippet.

Type

Select the type of the snippet: function, full script, Howto, class, Readme.

License

Select the license you want to use for your snippet.

Language

Select the language of the snippet (if it is language dependent).

Category

Classify your snippet in categories tree.

Version

You should insert here the version of the snippet. For a new snippet, insert 1.0.

Code

Paste here the code of the snippet.

5.4.2. Browsing snippets

You can browse snippets by clicking the Browse link.

You can browse snippets by Language or by Category. The resulting table shows the list of all snippets of the Language/Category. You can click on the snippet number to view the detail of the snippet.

5.4.3. Modifying a snippet

You cannot modify an existing snippet, but you can add a new version of the snippet by clicking on the Submit a new version link on the bottom part of the detail page of the snippet.

Adding a new version does not delete the old version, all previous versions will be available.

5.5. Project Help

This feature allows users to search for help for their projects.

GForge Contribution Guide

Roland Mas

Tim Perdue

Guillaume Smet

Reinhard Spisser


1. How to contribute

There are several ways to contribute to the Gforge project.

  • The first one is to give us a feedback about the software: what you like, what you don't like, features you like to be added in new versions, comments on documentation, etc.

  • You are willing to help develop new features. Give a look at the PM/Task Manager. The three subprojects (Todo, Documentation, Localization) lists the open tasks. You can pick up one of the open tasks and start working on it.

  • If you find a bug, submit a bug to the Bug tracker at http://gforge.org/tracker/?group_id=1. If you already solved the bug and are willing to share the fix with us, please add a patch to the bug.

  • If you have developed some new feature, submit a patch to the patch manager of gforge. The submitted patch should follow the Coding and Templating standards described in this document.

  • Documentation: there are some parts of Gforge that are not well documented. Refer to the Task Manager, Documentation subproject for a list of open tasks. You should write the documentation in the xdoc format as described in this section.

  • Localization: The user interface of gforge is now nearly completely localized. We need translators for the different languages.

    If you like to translate gforge to a new, not listed language, you can refer to the Localization Howto document to see how to add a new language

2. GForge CVS repository

2.1. Anonymous access

You can check out the GForge CVS repository through anonymous CVS with the following instructions.

The module you wish to check out must be specified as the <modulename>. When prompted for a password for anonymous, simply press the Enter key.

export CVSROOT=:pserver:anonymous@cvs.gforge.org:/cvsroot/gforge
cvs login
cvs co <modulename>

2.2. Modules in CVS repository

The following CVS modules are available in GForge repository.

gforge

Main module. Contains GForge software.

tools

Contains tools which may be useful for GForge developers, translators and administrators.

gforge-plugin-helloworld

Helloworld plugin to help developers understand plugin management in GForge.

gforge-plugin-eirc

EIRC plugin for GForge (java based IRC client in GForge).

gforge-plugin-ldapextauth

Authentification on external LDAP directory plugin. Still a work in progress.

gforge-theme-helloworld

Simple theme example.

gforge-theme-starterpack

Themes debian package information.

gforge-theme-(classic|darkaqua|debian|forged|kde|querencia|savannah|ultralite)

Themes for GForge. They may be outdated.

3. PHP Coding Standards

3.1. Introduction

Coding Standards. Live them, love them.

Then come up with a new introduction...

3.2. Comments

3.2.1. Guidelines

Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think "Wow, I don't want to try and describe that", you need to comment it before you forget how it works.

  • C++ style comments (/* */) and standard C comments (//) are both acceptable.

  • Use of perl/shell style comments (#) is prohibited.

3.2.2. PHPdoc Tags

Inline documentation for classes should follow the PHPDoc convention, similar to Javadoc. More information about PHPDoc can be found here: http://www.phpdoc.de/

3.2.3. File comments

Every file should start with a comment block describing its purpose, version, author and a copyright message. The comment block should be a block comment in standard JavaDoc format along with a CVS Id tag. While all JavaDoc tags are allowed, only the tags in the examples below will be parsed by PHPdoc.

GForge contains a mixed copyright. For files that have been changed since the GForge fork, the following header should be used:

/**
 *
 * brief description.
 * long description.  more long description.
 *
 * Portions Copyright 1999-2001 (c) VA Linux Systems
 * The rest Copyright 2002 (c) their respective authors
 *
 * @version   $Id: coding_standards.xml,v 1.1 2004/03/02 16:58:39 gsmet Exp $
 *
 */

3.2.4. Function and Class Comments

Similarly, every function should have a block comment specifying name, parameters, return values, and last change date.

/**
 * brief description.
 * long description.  more long description.
 *
 * @author    firstname lastname email
 * @param     variable  description
 * @return    value     description
 * @date      YYYY-MM-DD
 * @deprecated
 * @see
 *
 */

3.2.5. Note

The placement of periods in the short and long descriptions is important to the PHPdoc parser. The first period always ends the short description. All future periods are part of the long description, ending with a blank comment line. The long comment is optional.

3.3. Formatting

3.3.1. Indenting
3.3.2. PHP Tags

3.3.1. Indenting

All indenting is done with TABS. Before committing any file to CVS, make sure you first replace spaces with tabs and verify the formatting.

3.3.2. PHP Tags

The use of <?php ?> to delimit PHP code is required. Using <? ?> is not valid. This is the most portable way to include PHP code on differing operating systems and webserver setups. Also, XML parsers are confused by the shorthand syntax.

3.4. Templating

In the GForge system, PHP itself is used as the template language. To make the templating clearer, template files should be separated out and included once objects and database results are established. Detailed examples are in the docs repository and here.

Variables in the templates are presented surrounded by <?php ?> tags instead of the {} tags that some other template libraries would use. The end result is the same, with less bloat and more efficient code.

3.5. Expressions

  • Use parentheses liberally to resolve ambiguity.

  • Using parentheses can force an order of evaluation. This saves the time a reader may spend remembering precedence of operators.

  • Don't sacrifice clarity for cleverness.

  • Write conditional expressions so that they read naturally aloud.

  • Sometimes eliminating a not operator (!) will make an expression more understandable.

  • Keep each line simple.

  • The ternary operator (x ? 1 : 2) usually indicates too much code on one line. if... else if... else is usually more readable.

3.6. Functions

3.6.1. Function Calls

unctions shall be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon. Here's an example:

$var = foo($bar, $baz, $quux);

As displayed above, there should be one space on either side of an equals sign used to assign the return value of a function to a variable. In the case of a block of related assignments, more space may be inserted to promote readability:

$short		= foo($bar);
$long_variable	= foo($baz);

3.6.2. Function Definitions

Function declarations follow the unix convention:

function fooFunction($arg1, $arg2 = '') {
    if (condition) {
        statement;
    }
    return $val;
}

Arguments with default values go at the end of the argument list. Always attempt to return a meaningful value from a function if one is appropriate. Here is a slightly longer example:

function connect(&$dsn, $persistent = false) {
    if (is_array($dsn)) {
        $dsninfo = &$dsn;
    } else {
        $dsninfo = DB::parseDSN($dsn);
    }

    if (!$dsninfo || !$dsninfo['phptype']) {
        return $this->raiseError();
    }

    return true;
}

3.7. Objects

Objects should generally be normalized similar to a database so they contain only the attributes that make sense.

Each object should have Error as the abstract parent object unless the object or its subclasses will never produce errors.

Each object should also have a create() method which does the work of inserting a new row into the database table that this object represents.

An update() method is also required for any objects that can be changed. Individual set() methods are generally not a good idea as doing separate updates to each field in the database is a performance bottleneck.

fetchData() and getId() are also standard in most objects. See the tracker codebase for specific examples.

Common sense about performance should be used when designing objects.

3.8. Naming

  • Constants should always be uppercase, with underscores to separate words. Prefix constant names with the name of the class/package they are used in. For example, the constants used by the DB:: package all begin with “DB_”.

  • True and false are built in to the php language and behave like constants, but should be written in lowercase to distinguish them from user-defined constants.

  • Function names should suggest an action or verb: updateAddress, makeStateSelector

  • Variable names should suggest a property or noun: UserName, Width

  • Use pronounceable names. Common abbreviations are acceptable as long as they are used the same way throughout the project.

  • Be consistent, use parallelism. If you are abbreviating “number” as “num”, always use that abbreviation. Don't switch to using “no” or “nmbr”.

  • Use descriptive names for variables used globally, use short names for variables used locally.

    $AddressInfo = array(...);
    
    for($i=0; $i &lt; count($list); $i++)
    

3.9. Control Structures

These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated form:

if ((condition1) || (condition2)) {
    action1;
} elseif ((condition3) && (condition4)) {
    action2;
} else {
    defaultaction;
}

Control statements shall have one space between the control keyword and opening parenthesis, to distinguish them from function calls.

You should use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.

For switch statements:

switch (condition) {
    case 1: {
        action1;
        break;
    }
    case 2: {
        action2;
        break;
    }
    default: {
        defaultaction;
        break;
    }
}

3.10. Including PHP Files

Anywhere you are unconditionally including a class file, use require_once. Anywhere you are conditionally including a class file (for example, factory methods), use include_once. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with require_once will not be included again by include_once.

Note

Note: include_once and require_once are statements, not functions. You don't need parentheses around the filename to be included, however you should do it anyway and use ' (apostrophes) not " (quotes):

include('pre.php');

4. Templating Standards

4.1. Coding Example

The following code examples demonstrate how all coding on GForge is going to be done in the future. The first example shows the “switchbox” page (taken from www/tracker/index.php) - where the various objects are included, instantiated and checked for errors every step of the way.

Once the objects are instantiated, the template file can be included. In this example, the template file is detail.php (example2).

Template page
<?php
/**
 * GForge Tracker Facility
 *
 * Portions Copyright 1999-2000 (c) The SourceForge Crew
 * Copyright 2002-2004 (c) The GForge Teem
 * http://gforge.org/
 * 
 * @version $Id: templating.xml,v 1.2 2004/10/08 20:30:59 gsmet Exp $
 *
 * This file is part of GForge.
 *
 * GForge 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.
 *
 * GForge 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 GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  US
 */

echo $ath->header(array 
   ('title'=>'Detail: '.$ah->getID(). ' '.$ah->getSummary()));

?>
<H2>[#<?php echo $ah->getID(); ?>] <?php echo $ah->getSummary(); ?></H2>

<TABLE CELLPADDING="0" WIDTH="100%">
	<FORM ACTION="<?php echo $PHP_SELF; ?>
		?group_id=<?php echo $group_id; ?>
		&atid=<?php echo $ath->getID(); ?>" METHOD="POST">
	<INPUT TYPE="HIDDEN" NAME="func" VALUE="monitor">
	<INPUT TYPE="HIDDEN" NAME="artifact_id" 
		VALUE="<?php echo $ah->getID(); ?>">
	<TR>
		<TD COLSPAN=2">
		<?php
		if (!session_loggedin()) {
			?>
		<B>Email:</B> &nbsp;
		<INPUT TYPE="TEXT" NAME="user_email" 
			SIZE="20" MAXLENGTH="40">
		<?php
			}
			?>
		<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Monitor">
		</FORM>
		</TD>
	</TR>
	<TR>
		<TD>
         <B>Date:</B><BR>
			<?php echo date( $sys_datefmt, 
				$ah->getOpenDate() ); ?></TD>
		<TD><B>Priority:</B><BR>
			<?php echo $ah->getPriority(); ?></TD>
	</TR>

	<TR>
		<TD><B>Submitted By:</B><BR>
			<?php echo $ah->getSubmittedRealName(); ?> 
			(<?php echo $ah->getSubmittedUnixName(); ?>)</TD>
		<TD><B>Assigned To:</B><BR>
			<?php echo $ah->getAssignedRealName(); ?>
			(<?php echo $ah->getAssignedUnixName(); ?>)</TD>
	</TR>

	<TR>
		<TD><B>Category:</B><BR>
			<?php echo $ah->getCategoryName(); ?></TD>
		<TD><B>Status:</B><BR>
			<?php echo $ah->getStatusName(); ?></TD>
	</TR>

	<TR><TD COLSPAN="2">
		<H3>DO NOT enter passwords or confidential information 
			in your message!</H3>
		<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT">
		</FORM>
	</TD></TR>

	</TABLE>
	</FORM>
<?php

$ath->footer(array());

?>

5. Documentation

We now use XML Docbook to write documentation instead of Maven. You can read the Docbook Definitive Guide online if you want more information about XML Docbook.

Documentation is generated by Docbook XSL stylesheets (html output) and DB2Latex XSL stylesheets (PDF output).

6. Localization howto

6.1. GForge localization system and status

This short HOWTO explains how you can customize your local installation of GForge.

First, a quick course on the internationalisation system present in GForge.

The texts you can read on the web pages are not hard-coded. Instead, they are displayed as results of a function of several parameters. One of these parameters is the language in which you wish to display a piece of information, and another is some handle to identify the information you want to display. In GForge, this handle is made up of the “page name” and the “category” strings.

Knowing all the needed info, the function displays the appropriate text. How appropriate is this text? Well, that depends. First, a basic set of texts is loaded. Historically, this set is loaded in English. This set of texts makes the Base class, storing texts for all known “handles”.

This set of texts can then be partially or completely overloaded, e.g. for other languages: the handles present in the language overwrite the Base handles, and the ones not found keep their values from the Base class.

The language files are located in the www/include/languages directory.

The following languages are available in GForge :

  • The English language, being the original one in which GForge was written, is obviously complete.

  • The french translation is complete.

  • The Spanish (Castillan) translation is complete.

  • The Korean translation used to be complete.

  • The Dutch, Italian, Portuguese Brazilian and Swedish translations are pretty well advanced but not regularly updated.

  • The German, Japanese and Simplified Chinese translations are 20-50% complete.

  • The Catalan translation is a work in progress.

You might consider translating GForge into your language. If you do so, please also consider submitting your translated file to us so that future releases of GForge include your translated file by default.

6.2. Adding a new language

These are the steps to add a new language:

  1. Add a row in the supported_languages table in the gforge database:

    INSERT INTO supported_languages
    	(name, filename, classname, language_code)
    	VALUES ('German (Austria)',
    		'Austrian.class',
    		'Austrian',
    		'at'
    	);
    

    Note

    The language_code should follow the international language codings described in RFC 1766. For example, Portuguese Brazilian code is pt-br and not pt_BR.

  2. Copy the file Base.tab to Austrian.tab and place it in the www/languages/include folder.

  3. Translate the document

    Warning

    If you are not going to translate the entire document, please just override strings you translate.

  4. Submit the translation to the GForge project

6.3. Format of the *.tab files

The *.tab files are in a fairly straightforward format. Lines starting with a '#' character are ignored, other lines must be in the following format:

<pagename> TAB <category> TAB <data>

Warning

Please be careful to use TAB and not SPACE.

The <data> field can use variables in the form $1, $2, etc. These variables are defined by the script and there's no simple way of knowing what they are apart from looking at the script itself. To find out exactly what these variables are filled out with, search for the getText('<pagename>','<category'>) string in the scripts contained in the www/ and common/. This is not always easy to do.

Your best bet is to guess the meaning of the $1, $2, etc. variables from the non-customized text (either Base.tab or Foobaric.tab if it is defined).

Warning

*.tab files must be UTF-8 encoded.

6.4. Updating a translation

GForge is constantly developed and so translation files are regularly outdated. Thus translations should be regularly updated to be uptodate.

If you are maintaining a translation file, you may find useful language_file_merger.php script you can find in tools module (see GForge CVS repository for more information).

You can use the following command to merge your outdated language file with Base.tab :

php -q language_file_merger.php <your/gforge/install/root> <language> \
1>merge.tab 2>merge.log

You have to check lines with #TO_TRANSLATE# and #TO_REMOVE# flags and respectively translate them and remove them. Lines are already sorted by alphabetical order so you just have to add header information found in the previous YourLanguage.tab file to merge.tab file and replace YourLanguage.tab by merge.tab.

6.5. Text content customization

The text content can be somewhat customized. The GForge internationalisation system already provides a way to have different texts depending on user choice.

You might want to change page footers, or contact pages, or host names, or whatever you need to integrate your GForge your target audience (company, organisation, or even your own personal GForge).

The way you should usually go when you have to customize some text is the following:

  1. Find the bit of text you want to customize in Foobaric.tab;

  2. Copy and paste the appropriate line (including the “handle” -- the first two fields) in /etc/gforge/languages-local/Foobaric.tab or for theme specific customization in /etc/gforge/languages-local/<theme>/Foobaric.tab;

  3. Read it to find out about the $n variables;

  4. Replace the third field with my own customized version.

  5. If you use the localization caching system, remove cache files.

7. How to obtain XHTML compliance for GForge

The complete XHTML specification is available at XHTML specification at www.w3c.org.

Here is listed a summary of what is needed to be XHTML compliant:

XML declaration

All pages should have the following xml declaration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Document must be well-formed

All open tags must be closed, all tags must stay between < and >.

All tags must be lowercase

<HTML> must be converted to <html>.

Empty tags must be closed

No standalone <br> tag is allowed; <br/> must be used.

Attributes must always be quoted

<td rowspan=3> must be converted to <rowspan="3">.

The differences listed here are the most significant differences between HTML and XHTML, there are other, minor differences. For a complete list, refer to the XHTML specification.