Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
initial commit of v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Oct 18, 2014
1 parent b94efa4 commit 5e27e69
Show file tree
Hide file tree
Showing 287 changed files with 41,367 additions and 5,992 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
CHANGELOG
=========

Changes in Multisites 2.0.0

* Reimplemented module using ModuleStudio (early development 0.7.0 version) (#16).
* Added an index for the siteDNS field to the site table.
* Added project table for grouping sites by client or topic.
* Put basic settings into two different sections (general settings and security-related options).
* Added custom action for exporting an existing site database into a new template.
* Added new site field for a whitelist of languages per site.
* Added support for template parameters (variable information to be defined for each site).
* Templates can export a csv file for their parameters which can be used for new sites.
* Added two parameter fields to the site table (csv upload, array for manual form-based input).
* Added custom action for reapplying templates to all assigned sites.
* Added two new upload fields to the site entity for storing logo and favicon images.
* Added new optional field to the site entity for defining a whitelist of allowed languages (#17).
* Changed folders field type in the template entity from string to array.
* Added array field named exludedTables to the template entity to allow skipping certain tables when reassigning a template to all sites based on it.
* A new query multiplier and shell interface allows to perform sql queries on all databases (#14).
* Removed unrequired access table.
* Many other new features.


CUSTOMISATIONS
==============

Implemented classes:
* lib/Multisites/Api/Admin.php
* lib/Multisites/Controller/Admin.php
* lib/Multisites/Controller/Ajax.php
* lib/Multisites/Controller/Site.php
* lib/Multisites/Controller/Template.php
* lib/Multisites/Entity/Repository/Project.php
* lib/Multisites/Entity/Repository/Site.php
* lib/Multisites/Entity/Repository/Template.php
* lib/Multisites/Entity/Project.php
* lib/Multisites/Entity/Site.php
* lib/Multisites/Entity/Template.php
* lib/Multisites/Form/Handler/Site/Edit.php
* lib/Multisites/Form/Handler/Template/Edit.php
* lib/Multisites/Installer.php
* lib/Multisites/Listener/Theme.php
* lib/Multisites/Util/Model.php
* lib/Multisites/Version.php

Changed files:
* CHANGELOG.md
* images/admin.png

Manually added files:
* docs/model/*
* images/blank.png
* javascript/Multisites_siteExtensions.js
* lib/Multisites/Form/Plugin/ArrayInput.php
* lib/Multisites/Util/Configurator.php
* lib/Multisites/Util/System.php
* templates/plugins/function.multisitesArrayInput.php
201 changes: 201 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Multisites
==========

The Multisites module generated by ModuleStudio 0.7.0.

Documentation
-------------

1. [Introduction](#introduction)
2. [Requirements](#requirements)
3. [Installation](#installation)
4. [Upgrading](#upgrading)
5. [Configuration](#configuration)
6. [Structure and management](#structure)
7. [Creating and adapting sites](#siteoperations)
8. [Questions, bugs and contributing](#contributing)


<a name="introduction" />
Introduction
------------

The Multisites module allows to create and use a huge number of websites for arbitrary purposes and clients.
Beside normal "main" sites you can also run other relevant pages, like for example for multiple retail stores,
sales partners or landing pages for specific topics.

It is possible to manage any number of projects for multiple clients. Each project can thereby contain any number
of sites. By using site templates you can easily reuse structure, content as well as layouts and functionality across
multiple sites.


<a name="requirements" />
Requirements
------------

This module is intended for being used with Zikula 1.3.5 to 1.3.9.


<a name="installation" />
Installation
------------

The Multisites module is installed like any other Zikula module.

1. Go to the Extensions administration
2. Find Multisites in the Extensions list
3. Click on the first icon on the right for installing and activating the module


<a name="upgrading" />
Upgrading
---------

The upgrade process from 1.0.x to 2.0.0 has been implemented.
It has not been tested throughly yet though.

Please report your experience.


<a name="configuration" />
Configuration
-------------

When entering the Multisites administration area you will be redirected to a configuration wizard
automatically.


<a name="structure" />
Structure and management
------------------------

1. Projects

a. Example: _client xy_
b. A project serves for grouping websites for a certain client or topic.
c. A project can contain multiple site templates.
d. A project can contain multiple sites.


2. Site templates ("website master")

a. Examples: _central website_, _community portal_, _sales partner page_
b. Each site template represents the blueprint for multiple sites.
c. Each site template includes a sql file containing it's structure and data. This involves all created content pages, user permissions and much more.
d. After a site has been created it's database can be exported in order to reuse it as site template for other sites afterwards.
f. A site template can be available either for all or just for specific projects.


3. Sites

a. Example: _community portal xy_
b. Each site is assigned to a project and based on a certain site template.
c. Each site gets a unique name as well as a domain or subdomain.
d. A site carries more data, like credentials for the database and for the primary admin user.
e. For each site you can upload a logo as well as a favicon image.
f. Each site is equipped with a dedicated databases (for reasons of architecture and scalability). It is also possible to let multiple sites work with the same database. This requires corresponding customisations in the used theme though.
g. The Multisites backend offers a quick search function to find a certain site quickly.


4. Site parameters

a. A site template can define parameters. These correspond to a variable piece of information which must be entered for each site based on this template. For example a template describing sites for sales partners could require parameters for the address, contact data and other individual data.
b. The detail page of a template documents the existing parameters to make this information transparent.
c. The parameter values for a certain site can be uploaded using a csv file. The first table column contains the parameter name (e. g. _LASTNAME_), the second column contains the value for the edited site. Alternatively you can also enter these values by hand using a form.
d. When creating or editing a site which is going to be used as a template you can use placeholders which are replaced by the parameter values of sites based on the template in the final output of a page. Parameter values are also provided as module variables (see below for more details).


5. Themes / Layouts

a. New layouts are placed in a central place in the system (themes/ folder).
b. Layouts can centrally inspected and activated for each site.
c. Which layouts are available and which ones are initially active for a site is controlled as part of the underlying site template.


6. Modules

a. Examples: _News_, _Forums_, _Guestbook_, etc.
b. New layouts are placed in a central place in the system (themes/ folder).
c. Modules can centrally inspected and activated for each site.
c. Which modules are available and their states for a site is controlled as part of the underlying site template.


<a name="siteoperations" />
Creating and adapting sites
---------------------------


1. Initialise sites

When a site is initially created the database is filled with the assigned template's data. After that
the CMS delivers this site as soon as it gets called by the configured domain.

During the site creation all parameters are replaced using their deposited values. This approach
makes the initialisation process repeatable.


2. Copy sites

To duplicate an already created site you can use the corresponding database as a basis for a new site template.
This new template can then be used for creating further sites, like described above.


3. Change templates

To amend a site template create a new site using this template. Now edit the site's structure and content
until it meets your requirements. Afterwards the database is exported again and the resulting sql file
is uploaded into the site template.


4. Copy templates

Site templates can be copied to change them and store them with a new name. Site parameter definitions are
considered and included during the copy process.


5. Reapply templates

It is possible to reapply a site template which has been updated before to all sites based on this template.
After approving a confirmation question the initialisation process is performed again for all affected sites ("reset").
This includes overriding of existing content, unless specific database tables have been added to the list of table names
to be excluded in the template data.

It is also possible to decouple selected sites from their template. As soon as the assignment is removed this
site is not affected anymore when the template is reapplied, but is independently configured and maintained.
If a decoupled site is reassigned to a site template, this template is applied to it's database like described above.


6. Customise layouts

By using template plugins it is possible to represent variants within one layout theme. Therewith you can
use a theme for multiple sites. All data, variables and settings can be part of individual logic thereby.
This particularly includes the site parameters mentioned above. So if you for example have three sites for
different cities can check the content of the _city_ parameter for design-related decisions.

For this reason all parameter values are provided as module variables during the site initialisation process.

Use in code files:
```
$city = ModUtil::getVar('Multisites', 'parameterValueCity', 'default value');
if ($city == 'Berlin') {
echo '<h2>Hello Berlin</h2>';
}
```

Use in templates:
```
{modgetvar module='Multisites' name='parameterValueCity' default='default value' assign='city'}
{if $city eq 'Munich'}
<h2>Hello Munich</h2>
{/if}
```


<a name="contributing" />
Questions, bugs and contributing
--------------------------------


If you want to report something or help out with further development of the Multisites module please refer
to the corresponding GitHub project at https://github.com/zikula-modules/Multisites

55 changes: 0 additions & 55 deletions Resources/extras/multisites_config.php

This file was deleted.

13 changes: 0 additions & 13 deletions Resources/extras/multisites_dbconfig.php

This file was deleted.

Loading

0 comments on commit 5e27e69

Please sign in to comment.