brooklyn Docs

Welcome

Please note, brooklyn is in early beta, so use it with caution! Welcome to the brooklyn docs site. Here you can find all the necessary information about using and working with brooklyn. If you are a first time user please make sure to check out the Install and the Security section. Whenever you are stuck or have a question please don’t hesitate to content me by email brookcms@gmail.com, by twitter @brooklynCMS or in person in Cologne, Germany.
PS. Since brooklyn is free to use on any project, but please consider donating if you like it, thank you!

Install

Installing brooklyn is super easy, it only takes about 20 seconds. At first you need to download the latest version of brooklyn from the github repo: https://github.com/nmsdvid/brooklyn
After downloading and unpacking it you need drag and drop the brooklyn and the .htaccess files into your document root. The next step is to include the brooklyn folder into your page. Open your .php file and include it with PHP include. For example,
<?php include 'brooklyn/index.php'; ?> Please note, you need to give the correct read and write file permissions to the brooklyn folder. If you did everything right accessing http://your_domain.com/panel/ url will show you the login screen, if you don’t see it please check out the error handling section. Please note, your default login username is admin and the password is master. After logging into the panel you need to change these! Congratulations, you just installed brooklyn! As a further read please check out the panel section.

Panel - admin interface

You can access the panel by entering the http://your_domain.com/panel/ url. In the panel you can create, delete and modify your content. The panel is divided into 2 tabs, content and settings.

Content Tab
- Creating new content:
   You can create new content by clicking the + icon.
- Modify content:
   You can modify the content by clicking the pen icon.
- Delete content:
   To delete the content first you need to click the pen icon (a modal window will appear) and click the delete button (bottom left corner of the modal window).

Settings Tab
In the settings tab you can change your site title, meta description, meta keywords and login credentials.

Security

After installing brooklyn as a first step you need to change your login username and password by logging in to the panel and going to the settings tab. This is necessary step!

Receiving the content

Currently there are two types of content what you can receive.

With getSiteMeta() you can receive your site title, meta description and meta keywords.

- getting your site title:
<?php cms::getSiteMeta('site_title'); ?>
- getting your site meta keywords::
<?php cms::getSiteMeta(''meta_keywords'); ?>
- getting your site meta description:
<?php cms::getSiteMeta('meta_description'); ?>

With getContent() you can receive the content created by you in the panel, you just need to pass the unique id of the content as a string. For example,
If you created a content with an unique id header_title you can receive it like this: <?php cms::getContent('header_title'); ?>
Additionally you can receive more information about the content, by passing an optional second argument in getContent().
For example,
<?php cms::getContent('header_title, 'time'); ?>
You can receive these values,
content - this is the default, shows the content.
title - used in the panel to identify the content.
time - exact time when the content was created, in Unix timestamp.
description - used in the panel as a info tooltip for the content.

Error handling

file permission - you need to give the correct read and write file permissions to the brooklyn folder.

Contribute

Brooklyn is an open source project so you can find it on github and feel free to contribute to. However before making any pull request please contact me and lets talk about it.

License

The brooklyn project is released under the terms of the MIT license. So it's free to use on any kind of project.

Upcoming releases

I’m super motivated about improving brooklyn in the upcoming releases. I’m planning to add these functionalities:

in the next release:
- blog functionality
- multilingual
- file upload (images, documents, etc.)

in the upcoming release:
- api (read, write content w/ api)
- page visitors stats
- multiple users (roles, permissions)
- log (log every interaction what happens in the panel)

in the upcoming release:
- plugins

in the upcoming release:
- panel styling option
- advanced content editor
- marketplace ??