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 8 - PHP 7/8 - HTML5 - CSS3 - Bootstrap 5.x

Latest update: 23/08/2024 - By: Pandao

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

Installer

This product provides an installation wizard:

  1. Unzip the archive
  2. Upload the files on your server
  3. Create an empty database
  4. Go to the URL of your website
  5. Fill in the fields with your information and click on Install

Manual installation

It happens that the installer failed because of your specific server configuration. Don't worry, you can make a manual installation.
To make a manual installation following these steps:

  1. Unzip the archive
  2. Upload the files on your server
  3. Create an empty database
  4. Rename /common/config-tmp.php as /common/config.php and edit the content
  5. Rename /htaccess.txt as /.htaccess and edit the line 67:
    >> Replace {DOCBASE} with / (unless your website is in a subdirectory, for ex: /dev/mywebsite/)
  6. Edit the file /common/db.sql and replace the values specified at the beginning of the file ("search and replace" function of your text editor is usefull) in the entire file:
    • 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
    • INSTALL_DATE: current date (timestamp >> generate a timestamp)
  7. Execute this script in your SQL manager (like phpMyAdmin for example)
If you rename the /admin folder manually (not from the admin panel settings), you must rename it also in the file /.htaccess and in the file /common/config.php (ADMIN_FOLDER_NAME).

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

  • /common/config.php    website settings editable from the admin panel
  • /medias/    the files and pictures of dynamic elements like articles, slideshow...
  • /.htaccess    server configuration rules, basedir and url rewriting
To set 777 rights on "/medias/" folder including all the files within all the subfolders, use the unix command from the /medias/ directory: chmod -R 777 ./

Edit settings

First of all, after the installation, add your settings (database connection, contact information, website name...) in the settings section of the admin panel.
You can also edit the settings manually directly from the file /common/config.php

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

Settings details (/common/config.php)

Name Expected type / values Description
PMS_SITE_TITLE text Title of the website
PMS_TIME_ZONE text "Europe/London"
PMS_DATE_FORMAT text (allowable formats) e.g. %F
PMS_LANG_ENABLED 1 or 0 Enables or disables the foreign languages (multilingual or not)
PMS_ADMIN_LANG_FILE en.ini Translation file name from /admin/includes/langs/
PMS_ENABLE_COOKIES_NOTICE 1 or 0 Enables or disables the cookies notices
PMS_MAINTENANCE_MODE 1 or 0 Enables or disables the maintenance mode
PMS_MAINTENANCE_MSG text HTML content of the maintenance page
PMS_TEMPLATE text Name of the template in use (name of the folder)
PMS_OWNER text Contact name
PMS_EMAIL text Contact email
PMS_ADDRESS text Contact address
PMS_PHONE text Contact phone
PMS_MOBILE text Contact mobile
PMS_FAX text Contact fax
PMS_DB_NAME text Database name
PMS_DB_HOST text Database host (localost)
PMS_DB_PORT integer Database port (3306)
PMS_DB_USER text Database user
PMS_DB_PASS text Database password
PMS_SENDER_EMAIL text Email of the sender
PMS_SENDER_NAME text Name of the sender
PMS_USE_SMTP 1 or 0 Use SMTP to send emails
PMS_SMTP_SECURITY "" | "ssl" | "tls" Security of the SMTP connection
PMS_SMTP_AUTH 1 or 0 Enable SMTP autentication
PMS_SMTP_HOST text Name of the SMTP server
PMS_SMTP_USER text Username
PMS_SMTP_PASS text Password
PMS_SMTP_PORT integer Usually 25, 465 (SSL) or 587 (TLS)
PMS_GMAPS_API_KEY text Google Maps API key (required for domains not active prior to June 22nd, 2016)
PMS_ANALYTICS_CODE text Google Analytics code (without <script> tags)
PMS_ADMIN_FOLDER text Admin folder name ("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.

Add / configure your own modules

You can add and personalize your own modules:

  1. Duplicate the folder /admin/modules/.TABLE_NAME_WITHOUT_PREFIX/ and its content
  2. Rename it with the same name of the table in the database without the prefix "pm_" (module name = table name without prefix = folder name)
  3. Edit the file db.sql in the module folder and execute this script in your phpMyAdmin
  4. Edit the file config.xml in the module folder

Database: db.sql

-- ================ 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

  • id : required
  • lang : required if "multi" attribute has the value 1 in config.xml (for multilingual modules)
  • rank : required if "ranking" attribute has the value 1 in config.xml (if the elements can be sorted with drag'n'drop on the list)
  • home : required if "home" attribute has the value 1 in config.xml (if the element can appear on homepage)
  • checked : required if "validation" attribute has the value 1 in config.xml (if the element can be published or not)
  • add_date / edit_date : required if "date" attribute has the value 1 in config.xml (if the element needs a add date and an edit date)
  • publish_date / unpublish_date : required if "release" attribute has the value 1 in config.xml (if the release of the element needs to be sheduled)

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

Configuration: config.xml

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>

XML structure

<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

More about the field types

  • radio : radio buttons - the options are defined into the <options> tag
  • select : drop-down list - the options are defined into the <options> tag
  • multiselect : multiple-choice list - the options are defined into the <options> tag
  • checkbox : as the name suggests - the options are defined into the <options> tag
  • text : text field
  • textarea : as the name suggests
  • date : automatic drop-down lists with year, month, day (converted in timestamp)
  • datetime : automatic drop-down lists with year, month, day, hours, minutes, seconds (converted in timestamp)
  • current_date : hidden field with the current date (timestamp)
  • separator : separator between different parts of the form

More about the <options> tag

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

  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)

The folder /templates/ lists the templates of your website. The folder default/ is the basic default template.
You can choose to edit the existing template or add you own.

Add your own template

  1. Replicate the default template (folder /templates/default/) and rename it.
  2. Next, edit the file custom.css (empty css file) or layout.css (main css file) with your own styles (from an HTML template on Themeforest for example).
  3. Change also the HTML structure (if needed) in the folders (refer to the file structure in the next section):
    • /templates/default/views/ (pages and articles models)
    • /templates/default/views/partials/ (common files like header and footer)
    • /templates/default/widgets/
  4. Define the new template as main in the Admin panel > Settings section > General tab
All missing files in the new template will be automatically loaded from the default template. So you can use your own template as a child theme with only some files, simply keep the folder structure.

Files structure of the template

\---templates
    \---default
        +---assets
        |   +---css
        |   |       custom.css
        |   |       helpers.css
        |   |       helpers.min.css
        |   |       style.css
        |   |       style.min.css
        |   |
        |   +---fontawesome
        |   +---images
        |   |       favicon.png
        |   |       footer-logo.png
        |   |       header-mail.png
        |   |       logo.png
        |   |       maintenance-bg.jpg
        |   |       marker.png
        |   |
        |   \---js
        |       |   main.js
        |       |   main.min.js
        |       |
        |       \---plugins
        |           +---c-share
        |           +---imagefill
        |           +---lazyloader
        |           +---meanmenu
        |           \---star-rating
        +---views
        |   |   404.php
        |   |   article-blog.php
        |   |   article.php
        |   |   blog.php
        |   |   contact.php
        |   |   home.php
        |   |   page.php
        |   |
        |   \---partials
        |           comments.php
        |           footer.php
        |           get_articles.php
        |           get_articles_blog.php
        |           head.php
        |           header.php
        |           page_header.php
        |           popup.php
        |           slideshow.php
        |
        \---widgets
                articles_grid.php
                banner_full_width.php
                blog_side.php
                check_list.php
                contact_informations.php
                custom_widget.php
                featured_home.php
                featured_home_single.php
                footer_menu.php
                latest_articles.php
                pages_list.php
                parallax_home.php
                testimonials.php
                video_background.php

Pages VS Articles

There are 2 possible levels of models for each page:

  • page (required): defines the page model (e.g. home.php, page.php, contact.php...)
  • article  (optional): defines the model of each article of this page (e.g. article.php, article-blog.php, gallery.php)
URL example
Example of page URL http://www.mywebsite.com/my-page
Example of article URL of "my-page" http://www.mywebsite.com/my-page/my-article
Don't forget to define an alias (string of characters without spaces or accents displayed in the URL of the page) for your pages or articles for each language.
You can specify the alias in Admin > Modules > Pages (or Articles) > Edit/New > Alias.
E.g. http://www.mywebsite.tld/my-page (my-page is the alias of the page)

Add custom CSS stylesheets and JS plugins

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

//-----------------------------------
// CSS / JS used in this model
use Core\Services\AssetsManager;

AssetsManager::addCss(DOCBASE . 'assets/js/plugins/lazyloader/lazyloader.css');
AssetsManager::addJs(DOCBASE . 'assets/js/plugins/lazyloader/lazyloader.js');

AssetsManager::addCss('https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css');
AssetsManager::addCss('https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css');
AssetsManager::addJs('https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js');

AssetsManager::addJs(DOCBASE . 'assets/js/plugins/c-share/jquery.c-share.js');

Back Office

To translate the back office, simply change the language in > Settings > General > Admin panel language.
You can add translation files in /admin/includes/langs/xx.ini where xx is the code of your language.
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, enable the foreign language in Admin > Settings > General > Enable foreign languages.
Add languages in Admin > Modules > Languages > New.
Edit the content for each language 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, labels... in the module Texts in the admin panel.

Add an item (article, page...)

  1. Go to Admin > Modules > Then select the item type (for example Articles)
  2. Click on "New" in the top bar
  3. Fill in the form without missing the required fields
  4. Click on "Save" to register. The item is added.

Edit an item

  1. Go to Admin > Modules > Then select the item type (for example Articles)
  2. Click on the icon "pen" in the column Actions in front of the element to edit
  3. Edit the values in the form without missing the required fields
  4. Click on "Save" to register. The item is modified.

Sort items

  1. Go to Admin > Modules > Then select the item type (for example Articles)
  2. Click and hold down on the row of an element and move up or down towards the new location
  3. The order of the item is modified.

Add files (images, documents, videos) to an item

  1. Go to Admin > Modules > Then select the item type (for example Articles)
  2. Click on the icon "pen" in the column Actions in front of the element to edit
  3. At the bottom of the form, click on the button "Choose a file"
  4. Select the files on your machine (10 max / upload) and click on "Open"
  5. The files upload automatically
  6. Click on "Save" after the upload completed to register. The medias are added.
These media are used in the slideshow, in articles as images slider or in the gallery model.
The first image is usually used as a thumbnail of an article.
To add an image in the content of a page (in the middle of the text for example), use the following method.

Add images in the content of a page

  1. Go to Admin > Modules > Medias
  2. Click on "New" in the top bar
  3. Click on the button "Choose a file"
  4. Select the file on your machine and click on "Open"
  5. The file uploads automatically
  6. Click on "Save" after the upload completed to register. The media is added
  7. Go to Admin > Modules > Pages
  8. Click on the icon "pen" in the column Actions in front of the element to edit
  9. A panel containing all the medias opens at the right side of the screen
  10. Drag and drop the media towards the main text area (editor)
  11. Make layout changes if needed
  12. Click on "Save" to register. The item is modified.
These media are used in the slideshow, in articles as images slider or in the gallery model.
The first image is usually used as a thumbnail of an article.
To add an image in the content of a page (in the middle of the text for example), use the following method.

Add a page

  1. Go to Admin > Modules > Pages
  2. Click on "New" in the top bar
  3. Fill in the form without missing the required fields
    • Title is the main title (level 1 or <h1>) which will appear at the top of this page.
    • Subtitle will appear below (level 2 or <h2>).
    • Title tag is the title of the browser window. This value is not visible on the website but is very important for SEO.
    • Alias is the name of the page in lowercase with no space, no accent and no special characters. This value is displayed in the URL of the page.
    • Parent page is the page above the new page in the tree, i.e. the added page will be a subpage.
    • Page model determines the layout and type of content displayed. "Page" is the default value.
    • Article model determines the layout of the articles on this page. "Article" is the default value.
    • The "Robots" field is used by the search engines that browse the website. "Index, follow" means that the robot saves the page in its index and follows the links there. "noindex,nofollow" means "do not index and not follow", useful for pages that you don't want to appear on Google because the content is reserved or devoid of interest.
    • In the special case of the "Pages" module, the "Home" field should only be set to "yes" for the homepage.
  4. Click on "Save" to register. The item is added.
Don't insert images directly in this module, they won't be displayed.
The images (illustrations) and PDF or other document displayed in the body of the text of the pages must be inserted in the "Medias" module. Then drag and drop from the right side panel to the "Pages" module text editor.

Add a menu item

  1. Go to Admin > Modules > Menus
  2. Click on New in the top bar
  3. Fill in the form without missing the required fields
    • Parent item is the parent menu, i.e the added menu will be a submenu.
    • Item type is the content type which will be displayed after clicking on the menu.
    • Item id is the ID of the article or page (according to the item type the menu will display).
      To get the ID, go to Modules > Articles or Pages (still according to the item type), it's the value of the column ID in front of the selected element
    • URL is required for the item type "URL". It's an external URL towards another website for example.
    • Main menu is the menu on the top of the website, select Yes to add the item in this menu.
    • Footer menu is the menu at the bottom, select Yes to add the item in this menu.
  4. Clic on Save to register. The item is added.