1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# Introduction
Xibo - Digital Signage - http://www.xibo.org.uk
Copyright (C) 2006-2016 Daniel Garner and Contributors.
This is the **development branch** and represents the next generation of the Xibo CMS.
## Licence
Xibo is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
Xibo 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Xibo. If not, see <http://www.gnu.org/licenses/>.
# Installation
Installing an official release is [described in the manual](http://xibo.org.uk/manual/en/install_cms.html) and in the
official release notes of each release.
# Developing
Xibo uses Vagrant and Docker to ensure all contributers have a repeatable development environment which is easy to get
up and running.
The very same Docker containers are used in our recommended end user installation to promote consistency from development
to deployment.
To these ends this repository includes a `Vagrantfile` to spin up an environment.
## Prerequisites
- Git
- [Composer](http://getcomposer.org)
- Vagrant
## Clone the repository
Create a folder in your development workspace and clone the repository. If you intend to make changes and submit pull
requests please Fork us first and create a new branch.
```
git clone git@github.com:xibosignage/xibo-cms.git xibo-cms
```
## Install dependencies
Change into your new folder
```
cd xibo-cms
```
Install the external dependencies with Composer. Your local machine is unlikely to have the necessary dependencies
to install the packages, hence the `--ignore` switch.
```
php composer.phar install --ignore-platform-reqs
```
## Start Vagrant
```
vagrant up
```
## Installation Wizard
Visit Xibo in the browser and follow the installation instructions. The CMS will be accessible at `localhost`. When
asked for a database you should select to create a new database and enter these details:
- Host: `mysql`
- Admin User: `root`
- Admin Password: `root`
When asked for a library location you should enter
- /var/www/xibo/library
## Under the hood
Vagrant has created a virtual machine, installed Docker on it and then provisioned 3 Docker containers for Xibo to use.
There is a container for the CMS web server, a container for the mysql database and a container for XMR.
Your cloned repository is mapped into the Vagrant VM under `/data/web` and the Docker container mounts this as
`/var/www/xibo`. Changes you make to the source code on your host machine are immediately reflected in the nested VM
and Docker container.
Database data is maintained in the guest VM and is persisted when the VM is power cycled (`vagrant halt / vagrant up`). For
convenience the Docker MySQL container exposes mysql on port 3306 to the Vagrant VM. You can therefore connect to MySQL
over SSH using `127.0.0.1` and the port/key file shown by `vagrant ssh-config`.
# Application Structure
The Xibo CMS now follows MVC and is PSR-4 compliant.
The folder structure is as follows:
- /bin - CLI entry point
- /custom - A location for custom files, such as modules and middleware. Autoloaded as the `\Xibo\Custom` namespace
- /install - Files related to install/upgrade
- /lib/Controller - Controllers
- /lib/Entity - Models
- /lib/Exception - Exceptions
- /lib/Factory - Factories for creating Models
- /lib/Helper - Helper Classes
- /lib/Middleware - Slim Application Middleware
- /lib/Storage - Storage Interfaces
- /lib/Widget - Controllers for Modules
- /lib/Xmds - Xibo Media Distribution SOAP Service
- /locale - Translations
- /modules - Twig Views for Modules and other Module resources
- /tests - PHPUnit Tests
- /views - Twig Views
- /web - Web Document Root
- /web/index.php - Entry point for the WEB GUI
- /web/api/index.php - Entry point for the API
- /web/maintenance/index.php - Entry point for Maintenance
- /web/modules - Web Serviceable Resources for modules
- /web/theme/default - Web Portal Default Theme Files
- /web/theme/compact - Web Portal Compact Menu Theme Override
- /web/theme/custom - User Themes (overrides files in default theme)
- /web/xmds.php - XMDS SOAP Service
# Contributing
The standard licence for Xibo is the [AGPLv3](LICENSE). For more information please see [CONTRIBUTING.md](CONTRIBUTING.md).
# Repository
This folder contains the Xibo CMS application.
# Reporting Problems
Support requests can be reported on the [Xibo Community
Forum](https://community.xibo.org.uk/c/dev). Verified, re-producable bugs with this repository can be reported in
the [Xibo parent repository](https://github.com/xibosignage/xibo/issues).
|