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 header values
    • MY_DATABASE: database name
    • MY_USER: username (if required by your host)
    • MY_PASSWORD: password (if required by your host)
  2. Execute this script (in your phpMyAdmin for example)

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

  1. -- ================ CREATION OF THE TABLE article =============
  2.  
  3. CREATE TABLE article(
  4. id int NOT NULL AUTO_INCREMENT,
  5. lang int NOT NULL,
  6. title varchar(250),
  7. subtitle varchar(250),
  8. text longtext,
  9. url varchar(250),
  10. tags varchar(250),
  11. id_page int,
  12. home int DEFAULT 0,
  13. checked int DEFAULT 0,
  14. rank int DEFAULT 0,
  15. add_date int,
  16. edit_date int,
  17. PRIMARY KEY(id,lang)
  18. ) ENGINE=INNODB DEFAULT CHARSET=utf8;
  19.  
  20. ALTER TABLE article ADD CONSTRAINT article_lang_fkey FOREIGN KEY (lang) REFERENCES lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;
  21. ALTER TABLE article ADD CONSTRAINT article_page_fkey FOREIGN KEY (id_page) REFERENCES page(id) ON DELETE CASCADE ON UPDATE NO ACTION;
  22.  
  23. -- ============= CREATION OF THE TABLE article_file ===========
  24.  
  25. CREATE TABLE article_file (
  26. id int NOT NULL AUTO_INCREMENT,
  27. lang int NOT NULL,
  28. id_item int NOT NULL,
  29. home int DEFAULT 0,
  30. checked int DEFAULT 1,
  31. rank int DEFAULT 0,
  32. file varchar(250),
  33. label varchar(250),
  34. type varchar(20),
  35. PRIMARY KEY(id,lang)
  36. ) ENGINE=INNODB DEFAULT CHARSET=utf8;
  37.  
  38. ALTER TABLE article_file ADD CONSTRAINT article_file_fkey FOREIGN KEY (id_item,lang) REFERENCES article(id,lang) ON UPDATE NO ACTION ON DELETE CASCADE;
  39. ALTER TABLE article_file ADD CONSTRAINT article_file_lang_fkey FOREIGN KEY (lang) REFERENCES lang(id) 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

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <module title="Articles" name="article" multi="1" library="0" dashboard="1" icon="thumb-tack" ranking="1" home="1" validation="1" dates="1">
  3. <!-- resizing
  4. [0] 1 single image
  5. [1] 1x big, 1x medium, 1x small -->
  6. <medias max="10" resizing="1">
  7. <big maxw="1920" maxh="1440"/>
  8. <medium maxw="600" maxh="600"/>
  9. <small maxw="400" maxh="400"/>
  10. </medias>
  11. <list order="rank">
  12. <filter label="Page" name="id_page" table="page" fieldlabel="name" fieldvalue="id" order="name"/>
  13. <col label="Title" name="title" type="none"/>
  14. <col label="Page" name="id_page" table="page" fieldvalue="name" fieldref="id"/>
  15. </list>
  16. <form>
  17. <field multi="1" label="Title" name="title" type="text" required="1" unique="0" validation="none"/>
  18. <field multi="1" label="Subtitle" name="subtitle" type="text" required="0" unique="0" validation="none"/>
  19. <field multi="1" label="Text" name="text" type="textarea" editor="1" required="0" unique="0" validation="none"/>
  20. <field multi="1" label="URL" name="url" type="text" required="0" unique="0" validation="none"/>
  21. <field multi="0" label="Page" name="id_page" type="select" required="1" unique="0" validation="none">
  22. <options table="page" fieldlabel="name" fieldvalue="id" order="name"/>
  23. </field>
  24. <field multi="0" label="Tags" name="tags" type="multiselect" required="0" unique="0" validation="none">
  25. <options table="tag" fieldlabel="value" fieldvalue="id" order="value"/>
  26. </field>
  27. </form>
  28. </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

<module> contain 1 element <media>, 1 element <list> and 1 element <form>

<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> contain 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> contain 1 or more elements <col>

<list> has the following attributes

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

<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 text display format ("date", "price", "none" for other) change your 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> contain 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
Details about the 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/ contains the templates of your website. "default" is the basic template.
A template is composted by 4 folders :

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

Create your own models and bind a page to this model in the manager

Modules > Pages > Edit > Page / Article model

There are 3 possible levels of models for each page:

  1. page (required) : defines the page model
  2. article  (optional) : display the model of each article of this page

In the following examples of URL,
1 is the ID of a page
2 is the ID of an article

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