Pandao CMS
a web software to create and manage your own website

Pandao CMS is a Content Managment System which contains a simple, ergonomic and complete admin panel which allows you to manage easily the content of your website coupled with an easyly customizable template.
Pandao CMS is fully responsive, so use it as well on your smartphone as on your computer.
Based on PDO/MySQL - PHP 4.x/5.x - HTML5 - CSS3 - Bootstrap 3.x

Admin panel Demo Front office Demo Purchase & Download

Thank you for purchasing our CMS. If you have any questions that are beyond the scope of this help file, please contact us. Thanks so much!

Features

The following sections are useful only for a manual installation

Files and folders rights

According to your host, you could need to grant the rights 777 (r+w+x) to the following files

To set 777 rights on "medias" folder including all the files within all the subfolders, use the unix command in the /medias/ directory: chmod -R 777 ./

.htaccess

/.htaccess : general rules, basedir and url rewriting

Database

/common/db.sql

  1. Edit this file and replace the values specified at the beginning of the file ("search and replace" function of your text editor is usefull):
    • MY_DATABASE: database name
    • MY_DB_USER: username (if required by your host)
    • MY_DB_PASS: password (if required by your host)
    • USER_EMAIL: email of the administrator
    • USER_LOGIN: username of the administrator
    • USER_PASS: password of the administrator (md5 hash >> generate a md5 hash)
    • INSTALL_DATE: current date (timestamp >> generate a timestamp)
  2. Execute this script (in your phpMyAdmin for example)

Settings

/common/config.php

Edit this file with you own values. All the following settings are available in the settings section of your manager.
Name Expected type / values Description
SITE_TITLE text title of the website
TIME_ZONE text "Europe/London"
LANG_ENABLED 1 or 0 enables or disables the foreign languages (multilingual or not)
TEMPLATE text name of the template in use (name of the folder)
OWNER text Contact name
EMAIL text Contact email
ADDRESS text Contact address
PHONE text Contact phone
MOBILE text Contact mobile
FAX text Contact fax
DB_NAME text Database name
DB_HOST text Database host (localost)
DB_PORT integer Database port (3306)
DB_USER text Database user
DB_PASS text Database password
SENDER_EMAIL text Email of the sender
SENDER_NAME text Name of the sender
USE_SMTP 1 or 0 Use SMTP to send emails
SMTP_SECURITY "" | "ssl" | "tls" Security of the SMTP connection
SMTP_AUTH 1 or 0 Enable SMTP autentication
SMTP_HOST text Name of the SMTP server
SMTP_USER text Username
SMTP_PASS text Password
SMTP_PORT integer usually 25, 465 or 587

Let's GO!

First of all, enter your settings (database connexion, contact infos, project name...) in the settings section.

To access to the manager : http://www.mywebsite.com/admin

The package contains basic modules like the articles, the pages, the comments, the slideshow, etc.

The first part of a module section lists recorded elements for this module, the second part is a form to add or modify an element.
In the settings section, you can manage the parameters essential to the smooth running of the web site and its manager.


Translation

To translate the back office, simply change the values into the file /admin/includes/lang.ini
Example:

BACK_TO_LIST="Back to list"
SAVE="Save"
SAVE_EXIT="Save and exit"
REPLICATE="Replicate"
EXPECTED_IMAGES_SIZE="Expected images size:"
RELEASE="Release"
...


Add / configure your own modules

You can add and personalize your own modules:

  1. Duplicate the /admin/modules/.TABLE_NAME/ folder and his content
  2. Rename it with the same name of the table in the database (module name = table name = folder name)
  3. Edit db.sql file and execute this script (in your phpMyAdmin for example)
  4. Edit config.xml file

db.sql configuration

-- ================ CREATION OF THE TABLE pm_article =============

CREATE TABLE IF NOT EXISTS pm_article(
    id int NOT NULL AUTO_INCREMENT,
    lang int NOT NULL,
    title varchar(250),
    subtitle varchar(250),
    alias varchar(100),
    text longtext,
    url varchar(250),
    tags varchar(250),
    id_page int,
    id_user int,
    home int DEFAULT 0,
    checked int DEFAULT 0,
    rank int DEFAULT 0,
    add_date int,
    edit_date int,
    publish_date int,
    unpublish_date int,
    comment int DEFAULT 0,
    PRIMARY KEY(id, lang)
) ENGINE=INNODB DEFAULT CHARSET=utf8;

ALTER TABLE pm_article ADD CONSTRAINT article_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE pm_article ADD CONSTRAINT article_page_fkey FOREIGN KEY (id_page, lang) REFERENCES pm_page(id, lang) ON DELETE CASCADE ON UPDATE NO ACTION;

Usefull and reserved columns names for the tables

Conserve the "TABLE_NAME_file" if the element neads medias (pdf, pictures, videos...)

config.xml configuration

The file config.xml define the module settings and the columns displayed in list.php and form.php (/admin/module/default/). config.xsd check the syntax of this document

<?xml version="1.0" encoding="UTF-8"?>
<module title="Articles" name="article" multi="1" library="1" dashboard="1" icon="thumb-tack" ranking="1" home="1" validation="1" dates="1" release="1" index="1">
    <!-- resizing
    [0] 1 single image
    [1] 1x big, 1x medium, 1x small -->
    <medias max="30" resizing="1">
        <big maxw="1920" maxh="1440"/>
        <medium maxw="600" maxh="600"/>
        <small maxw="400" maxh="400"/>
    </medias>
    <list order="rank">
        <filter label="Page" name="id_page" table="pm_page" fieldlabel="name" fieldvalue="id" order="name"/>
        <col label="Title" name="title" type="none"/>
        <col label="Page" name="id_page" table="pm_page" fieldvalue="name" fieldref="id"/>
    </list>
    <form>
        <field multi="1" label="Title" name="title" type="text" required="1" unique="0" validation="none"/>
        <field multi="1" label="Subtitle" name="subtitle" type="text" required="0" unique="0" validation="none"/>
        <field multi="1" label="Alias" name="alias" type="text" required="1" unique="1" validation="none" comment="Article URL"/>
        <field multi="1" label="Text" name="text" type="textarea" editor="1" required="0" unique="0" validation="none"/>
        <field multi="1" label="URL" name="url" type="text" required="0" unique="0" validation="none"/>
        <field multi="0" label="Page" name="id_page" type="select" required="1" unique="0" validation="none">
            <options table="pm_page" fieldlabel="name" fieldvalue="id" order="name"/>
        </field>
        <field multi="0" label="Tags" name="tags" type="multiselect" required="0" unique="0" validation="none">
            <options table="pm_tag" fieldlabel="value" fieldvalue="id" order="value"/>
        </field>
        <field multi="0" label="Allow comment ?" name="comment" type="radio" required="1" unique="0" validation="none" roles="administrator">
            <options>
                <option value="1">Yes</option>
                <option value="0">No</option>
            </options>
        </field>
        <field multi="0" label="User" name="id_user" type="select" required="1" unique="0" validation="none" roles="administrator">
            <options table="pm_user" fieldlabel="login" fieldvalue="id" order="login"/>
        </field>
    </form>
    <roles>
        <user type="administrator" permissions="all"/>
        <user type="manager" permissions="all"/>
        <user type="editor" permissions="add,edit,upload"/>
    </roles>
</module>

<module> has the following attributes

Name Expected type / values Description
title text title of the module
name text column name in the table
multi 1 or 0 enables or disables the foreign languages (multilingual or not)
library 1 or 0 the medias of the module appear or not in the library of medias on the form page
dashboard 1 or 0 shows or hides a focus box on the manager homepage
icon text the icon associated with the module (it's the suffix of "Font Awesome": fa fa-xxxx)
ranking 1 or 0 enables or disables the ranking of the elements in the list
home 1 or 0 possible or not to show/hide an element on the homepage
validation 1 or 0 possible or not to publish/unpublish an element
dates 1 or 0 enables or disables the add date and the edit date
release 1 or 0 possible or not to shedule the release of an element
index integer > 0 rank of the module in the main menu

<module> contains 1 element <media>, 1 element <list>, 1 element <form> and 1 element <roles>

<medias> has the following attributes

Name Expected type / values Description
max integer maximum number of medias
resizing 1 or 0 resizing type for the picture: "0" = 1 single image, "1" = 1x big, 1x medium and 1x small

<medias> contains 1x <big>, 1x <medium> and 1x <small>

<big>, <medium> and <small> has the following attributes

Name Expected type / values Description
maxw integer maximum width of the pictures in pixels
maxh integer maximum height of the pictures in pixels

<list> has the following attributes

Name Expected type / values Description
order text column name in the table followed by DESC or ASC if necessary

<list> contains 1 or more elements <col>

<col> has the following attributes

Name Expected type / values Description
label text title in the header cel
name text column name in the table
type "date" | "price" | "none" (for text) display format (price: currency in fn_form.php)
table text table referencing the values (optional)
fieldref text column name referencing the values of this table (visible, optional)
fieldvalue text column name containing the value referenced by "fieldref" (hidden, optional)

<form> contains 1 or more elements <field>

<field> has the following attributes

Name Expected type / values Description
multi 1 or 0 display for all languages or not
label text label of the field (optional)
type "radio" | "text" | "textarea" | "select" | "checkbox" | "date" | "current_date" | "separator" field type
editor 1 or 0 CKEditor or basic input
name text column name in the table or other for a "separator" field, it must be unique for a module
required 1 or 0 required value or not
validation "mail" | "numeric" | "none" validation type
unique 1 or 0 unique value in the table or not (e-mail for exmaple)
comment text instruction about this field
roles comma separated values: administrator, manager, editor user types allowed to edit this field

<roles> contains 3 elements <user> (1 for each type of user)

<user> has the following attributes

Name Expected type / values Description
type "administrator" | "manager" | "editor" type of user
permissions comma separated values: all, add, edit, delete, publish, upload, no_access permissions for this user
Details about the field types

<field> can contain a <options> tag which define the options of the "checkbox", "radio" and "select" fields

Different uses
  1. the options are "continuous" values
    <options> tag must contain 1 <min> and 1 <max> tags
  2. the options are "one-off"
    L'élément <options> devra comporter un ou plusieurs éléments <option> contenant le libellé de l'item.
    each <option> tag must contain an attribute "value" like the html tag.
  3. the options are stored in a specific table of the database
    <options> must contain the following attributes
    • table : table name containing the values
    • fieldlabel : column name of the item label (visible)
    • fieldvalue : column name of the item value (hidden)

/templates/ lists the templates of your website. "default" is the basic template.

Create your own template by replicating the "default" folder with an other name and enable it into the manager in the settings section.

A template contains 5 folders:

There are 2 possible levels of models for each page:

  1. page (required): defines the page model (e.g. home.php, page.php, contact.php...)
  2. article  (optional): display the model of each article of this page (e.g. article.php, gallery.php)

URL examples

Affirmation URL example
a page can contain no article http://www.mywebsite.com/my-page
a page can contains one or several articles http://www.mywebsite.com/my-page/my-article

 

Add CSS and JS files if your model needs in the begining of the PHP model file.
Example for models/page.php which needs Isotope and LazyLoader plugins:

/* ==============================================
 * CSS AND JAVASCRIPT USED IN THIS MODEL
 * ==============================================
 */
$stylesheets[] = array("file" => DOCBASE."js/plugins/isotope/css/style.css", "media" => "all");
$javascripts[] = DOCBASE."js/plugins/isotope/jquery.isotope.min.js";
$javascripts[] = DOCBASE."js/plugins/isotope/jquery.isotope.sloppy-masonry.min.js";

$stylesheets[] = array("file" => DOCBASE."js/plugins/lazyloader/lazyloader.css", "media" => "all");
$javascripts[] = DOCBASE."js/plugins/lazyloader/lazyloader.js";

Back Office

To translate the back office, simply change the values into the file /admin/includes/lang.ini
Example:

BACK_TO_LIST="Back to list"
SAVE="Save"
SAVE_EXIT="Save and exit"
REPLICATE="Replicate"
EXPECTED_IMAGES_SIZE="Expected images size:"
RELEASE="Release"
...

Front Office

To translate the front office, edit the values directly in the modules. When you add or edit an item, you can move between tabs, one per language.
You can also translate the "small texts" like notices, captions of buttons, labels of fields, etc, in the module Texts in the admin panel.