This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "Websites module"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Deployment with friendly URL's)
(Deployment with friendly URL's)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Image:Siteproperties.png|right|thumb|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.
 
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==
 
==Quick and dirty deployment of a site==
 
To enable the Example site with a tickets page is very easy:
 
To enable the Example site with a tickets page is very easy:
Line 15: Line 17:
 
#Copy modules/sites/index.php in document root of example.com's document root. eg. /var/www/example.com/html/index.php.
 
#Copy modules/sites/index.php in document root of example.com's document root. eg. /var/www/example.com/html/index.php.
 
#Edit the new index.php file and set the $path_to_gos variable to your path.
 
#Edit the new index.php file and set the $path_to_gos variable to your path.
#Create a symlink to the template assets folder. For example if you have "Example" for the site's template property it should be:<br /><br />cd /var/www/example.com/html<br />ln -s /usr/share/groupoffice/modules/sites/Example/assets Example<br />
+
#Create a symlink to the template assets folder. For example if you have "Example" for the site's template property it should be:<br /><br />cd /var/www/example.com/html<br />ln -s /usr/share/groupoffice/modules/sites/templates/Example/assets Example
 
#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:<br />
 
#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:<br />
 
<br />/etc/groupoffice/example.com/config.php<br />
 
<br />/etc/groupoffice/example.com/config.php<br />
Line 36: Line 38:
 
</VirtualHost>
 
</VirtualHost>
 
</pre>
 
</pre>
 +
 +
=Creating a template=
 +
It's probably best to start by modifying the Example template. Copy the theme to a new directory. Eg. MyTemplate:
 +
<pre>cp -R /usr/share/groupoffice/modules/sites/templates/Example /usr/share/groupoffice/modules/sites/templates/MyTemplate</pre>
 +
 +
Now enable this template for the site at the site properties. See the image on top.

Latest revision as of 15:13, 15 April 2013

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.