Websites module

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
Site properties

The websites module is a Content Management System (CMS). It's in a very early stage of development and not yet very useful for your own sites. You can use it to allow users to enter tickets in the ticket system.

Deployment

Quick and dirty deployment of a site

To enable the Example site with a tickets page is very easy:

  1. chmod 777 modules/sites/assets
  2. Create a site in the module. Just fill in the name and leave the defaults.
  3. Right click the site and click view.


Deployment with friendly URL's

In some cases you want to use a different URL and URL rewriting. Take the following steps:

  1. Create apache virtual host for example.com
  2. Copy modules/sites/index.php in document root of example.com's document root. eg. /var/www/example.com/html/index.php.
  3. Edit the new index.php file and set the $path_to_gos variable to your path.
  4. Create a symlink to the template assets folder. For example if you have "Example" for the site's template property it should be:

    cd /var/www/example.com/html
    ln -s /usr/share/groupoffice/modules/sites/templates/Example/assets Example
  5. If you have multiple Group-Office instances or for whatever reason the site is not able to find the config.php file. You can create a symlink to the real config file in:


/etc/groupoffice/example.com/config.php

  1. Now the site should be functional but the URL's aren't pretty. You can enable mod rewrite in the Sites GUI of Group-Office. Right click on the site to edit the properties.
    Mod rewrite must be configured for apache too. Below is an example virtual host file:
<VirtualHost *:80>
	ServerName example.com
	ServerAlias www.example.com
	DocumentRoot /var/www/example.com/html

	<Directory /var/www/example.com/html>
		RewriteEngine On
		RewriteBase /

		RewriteCond %{REQUEST_FILENAME} !-f
		RewriteCond %{REQUEST_FILENAME} !-d
		RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]

	</Directory>
</VirtualHost>

Creating a template

It's probably best to start by modifying the Example template. Copy the theme to a new directory. Eg. MyTemplate:

cp -R /usr/share/groupoffice/modules/sites/templates/Example /usr/share/groupoffice/modules/sites/templates/MyTemplate

Now enable this template for the site at the site properties. See the image on top.