PHPackages                             raffaelj/cpmultiplane - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. raffaelj/cpmultiplane

ActiveProject

raffaelj/cpmultiplane
=====================

A small PHP frontend for Cockpit CMS v1

0.3.5(3y ago)17983[6 issues](https://github.com/raffaelj/CpMultiplane/issues)1MITPHPPHP &gt;= 7.1

Since Oct 13Pushed 3y ago3 watchersCompare

[ Source](https://github.com/raffaelj/CpMultiplane)[ Packagist](https://packagist.org/packages/raffaelj/cpmultiplane)[ Docs](https://cpmultiplane.rlj.me)[ RSS](/packages/raffaelj-cpmultiplane/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (10)Used By (1)

CpMultiplane
============

[](#cpmultiplane)

A small PHP front end for the fast and headless [Cockpit CMS](https://github.com/agentejo/cockpit/).

[Docs](https://cpmultiplane.rlj.me) (work in progress), [i18n](https://github.com/raffaelj/CpMultiplane-i18n)

---

**CpMultiplane is not compatible with Cockpit CMS v2.**

See also [Cockpit CMS v1 docs](https://v1.getcockpit.com/documentation), [Cockpit CMS v1 repo](https://github.com/agentejo/cockpit) and [Cockpit CMS v2 docs](https://getcockpit.com/documentation/), [Cockpit CMS v2 repo](https://github.com/Cockpit-HQ/Cockpit).

---

**My main goals:**

1. privacy by design and privacy by default
2. developer friendliness

- no plugins to deactivate half of the core features needed
- ability to adjust everything

3. clean and structured backend for my clients - Cockpit CMS with addons and modifications
4. structured data - keep the system and the data portable and future proof
5. modular, small and reusable code
6. semantic html, responsive css, *usable* without javascript
7. multilingualism by design

CpMultiplane is no classic Cockpit addon. It uses Cockpit as a library, registers `multiplane` as a new module and than uses cockpit's core features. The backend still works as a standalone tool to manage and structure data.

It is the refactored version of [Monoplane](https://github.com/raffaelj/Monoplane), which is not maintained anymore.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- PDO + SQLite (or MongoDB)
- GD extension
- pecl intl extension (optional)
- mod\_rewrite, mod\_versions enabled (on apache)

Make also sure that `$_SERVER['DOCUMENT_ROOT']` exists and is set correctly.

You can find the detailed version and a cli install example in [docs/installation](https://cpmultiplane.rlj.me/en/docs/installation).

Installation
------------

[](#installation)

### manually

[](#manually)

- copy all files of this repository into your web root
- copy `.htaccess.dist` to `.htaccess`
- copy Cockpit in a subfolder of your web root and name it `cockpit`
- copy additional addons, create your collections, adjust some settings

### via git

[](#via-git)

```
cd ~/html
git clone https://github.com/raffaelj/CpMultiplane.git .
cp .htaccess.dist .htaccess
git clone https://github.com/agentejo/cockpit.git cockpit
git clone https://github.com/raffaelj/cockpit_CpMultiplaneGUI.git cockpit/addons/CpMultiplaneGUI
git clone https://github.com/raffaelj/cockpit_FormValidation.git cockpit/addons/FormValidation
git clone https://github.com/raffaelj/cockpit_UniqueSlugs.git cockpit/addons/UniqueSlugs
```

### via composer

[](#via-composer)

```
cd ~/html
composer create-project --ignore-platform-reqs raffaelj/cpmultiplane .
```

If you use composer, Cockpit and the addons CpMultiplaneGUI, FormValidation and UniqueSlugs are installed automatically.

### via docker

[](#via-docker)

The [docker image](https://hub.docker.com/r/raffaelj/cpmultiplane) comes preinstalled with the quickstart routine of the "basic" template, with a default admin user (password: admin) and with dummy data from installed addons.

This is not meant for production use, but for local development.

```
docker pull raffaelj/cpmultiplane
docker run --rm -d --name cpmultiplane -p 8080:80 raffaelj/cpmultiplane
```

Now open your browser on `localhost:8080` and see it in action.

Features
--------

[](#features)

- pages and sub pages (e. g. posts)
- multilingual with language prefix, e. g.: `example.com/en/my-page`
- 2 modes for structured content
    1. one collection per content type, e. g. a collection named `pages` and a collection named `posts`
    2. a single collection named `pages` - each entry has a type `page` or `post` (**experimental**)
- maintenance mode with option for allowed ips
- simple content preview while editing pages
- two basic responsive themes with scss files
- simple privacy notice banner, that gets enabled when clicking on video link
- contact forms - fully functional without javascript
- pre-rendering of markdown fields
- multiple ways to change everything
- GUI via [CpMultiplaneGUI addon](https://github.com/raffaelj/cockpit_CpMultiplaneGUI)
- full-text search
- ...

Recommended Addons
------------------

[](#recommended-addons)

Install these addons in `cockpit/addons/`.

- [CpMultiplaneGUI](https://github.com/raffaelj/cockpit_CpMultiplaneGUI)
    - adds a few fields to the sidebar, so you don't have to define them in your collection definitions
    - some gui tweaks for easier access
    - work in progress...
- [UniqueSlugs](https://github.com/raffaelj/cockpit_UniqueSlugs)
    - If links should point to `slug` instead of `_id`
    - for multilingual slugs in language switch
- [rljUtils](https://github.com/raffaelj/cockpit_rljUtils)
    - fixes security issues in Admin UI for multi user setups
    - big language buttons for multilingual setups
- [FormValidation](https://github.com/raffaelj/cockpit_FormValidation)
    - The inbuilt Forms Controller requires field definitions from this addon
    - The inbuilt views and css files are written to match the field definitions
- [VideoLinkField](https://github.com/raffaelj/cockpit_VideoLinkField)
    - inbuilt `/assets/js/mp.js`, some views and css files are designed to load videos privacy friendly with a privacy notice, that pops up only when a user clicks a play button
- [SimpleImageFixBlackBackgrounds](https://github.com/raffaelj/cockpit_SimpleImageFixBlackBackgrounds)
    - replaces the SimpleImage library with a modified version to fix black backgrounds of transparent png and gif files on hosts with a non-bundled PHP GD version
- [EditorFormats](https://github.com/pauloamgomes/CockpitCms-EditorFormats) - if you want to give your users a Wysiwyg field

Intended use
------------

[](#intended-use)

### Backend - Cockpit

[](#backend---cockpit)

1. Create a singleton `site` for your default page definitions.
2. Create a collection `pages` for all of your pages.
3. Create a collection `posts` for all of your blog posts.
4. Use the CpMultiplaneGUI addon.

### Frontend - CpMultiplane

[](#frontend---cpmultiplane)

1. create a child theme of rljbase or create your own theme
2. adjust defaults in `/child-theme/config/config.php`
3. add snippets to `/child-theme/bootstrap.php`, that are explicitly for your theme
4. add snippets to `/config/bootstrap.php`, that are specifically for your setup
5. change some partials to fit your needs

Settings
--------

[](#settings)

The fastest way to change some defaults, is to add some values to `/cockpit/config/config.php`:

```
