Sitograph CMS v.1.1 was released

New features in Sitograph v.1.1

  • Continuous Development Pipeline implemented, flowchart created
  • Jenkins run a "Build check" that is executed when pull request created
  • PHPUnit tests added, PHPunit readme
  • Code covarage status pare created
  • Module Blog line coverage >95%
  • Theme default: now mobile friendly
  • Extract locales to .PO file
  • Blog: article external Link, increase article text size, add articles count
  • Allow 'disabled' for API/filters
  • list api with /api/, list blog api with /api/blog/
  • Constant ADMIN_URL and {$admin_url}
  • outputError() JS refresh timer added
  • change tpl compile dir to system tmp dir
  • rework module controllers inclusion

Fixed Bugs

  • Wrong content URL #156
  • script update - don't overrwrite custom templates
  • API: msg.no_access
  • BLOG: 404 error
  • git pull origin master 
  • Allow empty URL 
  • Theme default: change layout to enable resizing (background to img)
  • Theme default: fix layout for search input
  • Theme default: Broken layout blog highlight
  • include_html_head group set to "theme"
  • Fixed Admin Structure -> SEO tab missing
  • Fixed missing files/wrong configs

Module updates

  • Blog (blog) 1.3.7 -> 1.3.9
  • Pictures Gallery (gallery) 1.3.5 -> 1.3.6
  • Feedback (feedback) 1.1.1 -> 1.1.2
  • Google - Analytics (google-analytics) 1.1.8 -> 1.1.9
  • Google - Login (google-login) 1.0.4 -> 1.0.5
  • MSV Core (msv-core) 1.4.15 -> 1.4.17
  • MSV API (msv-api) 1.3.10 -> 1.3.11
  • Install (install) 1.2.4 -> 1.2.5
  • Sitograph (sitograph) 1.0.21 -> 1.0.23
  • Theme - Default (theme-default) 1.3.7 -> 1.3.8

Patch required

Append to config.php

define("ADMIN_URL", "/admin/");

SQL:

ALTER TABLE articles ADD link VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL AFTER url;

Sitograph CMS v.1.0 was released

Sitograph Content Management System v.1.0.

Sitograph is open source Content Management System that enables you to build websites and efficient online applications.

Modules and extensions for Sitograph CMS can be downloaded directly from Admin UI, /admin/.

To browse list of available modules visit the Sitograph Repository

For any found bugs or suggestions please raise an issue at GitHub, github.com/maxsv0/sitograph/issues

To contribute to development please contact Sitograph Repository Support

The architecture of the service, a design of the application, core development and release was done by Max Svistunov, github.com/maxsv0.


External libraries that were used in this release:

  • Bootstrap 3
  • jQuery
  • Smarty
  • Google APIs client
  • Fancybox
  • TinyMCE
  • Cropper JS

More information can be found here:

https://www.sitograph.com

The latest version of The Sitograph CMS can be found here. Release notes, usage documentation

http://demo.sitograph.com

Live demo of the current version. Resets every day, feel free to edit as you wish!

http://rep.msvhost.com

Open Source Catalog of Sitograph modules and extensions.

http://doc.sitograph.com

Technical documentation and user manuals. Development kit features and updates.

http://support.sitograph.com

Support Team is happy to get your feedback or answer any question.

Fill out the support form, and they will get back to you.

Installing Sitograph CMS

To install Sitograph CMS follow instructions in the installation wizard.

The installation process includes the creation of database tables and default website content.

Once the installation is finished go to the "Site Settings" and check if all necessary fields are filled.

Folder structure and usage

Basic folder structure

/
├── content/
│   ├── css/
│   ├── fonts/
│   ├── images/
│   └── js/
├── include/
│   ├── custom/
│   └── module/
└── templates/
    ├── default/
    └── custom/

Purpose and usage of folders

  • content/ is a File Storage. Files from this folder are sent directly to a browser.
    CSS, JS, fonts, images and other files can be placed here.
  • include/ is the main application folder.
    Module controllers and settings are stored in include/module.
  • templates/ folder stores UI templates for the website and CMS.

The MSV application is build using Model-View-Controller pattern.

  • The Model contains two classes class.msv.php, class.module.php.
  • The View is a set of *.tpl files stored in templates/ folder together with *.css/*.js stored in content/.
  • The Controller is a set of modules that implements website functionality and can be found in include/module.

Getting Started: default website

Default Sitograph Website

Default website structure is presented in table below (database table TABLE_STRUCTURE).

URL Template Access Description
/ index.tpl everyone Homepage
/example-page/ custom/main.tpl everyone Simple text page
/sitograph/getting-started/ custom/main-sideblock.tpl everyone Getting Started with Sitograph
/sitograph/file-structure/ custom/main-sideblock.tpl everyone Sitograph File structure
/sitograph/modules/ custom/main-modules.tpl everyone Sitograph modules
/sitograph/API/ custom/main-sideblock.tpl everyone Website public API
/blog/* custom/main-blog.tpl everyone Blog section: articles list, search, article details page
/gallery/* custom/main-gallery.tpl everyone Gallery section: albums list, search, album photops page
/contacts/ custom/main-feedback.tpl everyone Form feedback for users
/search/ custom/site-search.tpl everyone Results page for text search
/sitemap/ custom/sitemap.tpl everyone Public sitemap and content index
/404/ custom/404.tpl everyone Error 404 page
/signup/ custom/user-signup.tpleveryone Form Registration for new users.
* Note. registration is disabled by default
/login/ custom/user-login.tpl everyone Form login for users
/password-reset/ custom/user-password-reset.tpl everyone Password reset form for users
/settings/ custom/user-settings.tpl users Form for editing personal settings for registered user
/user/ custom/user.tpl users Registered user homepage
/admin/ custom/sitograph.tpl administrators CMS Homepage
/admin/login/ custom/sitograph-login.tpl everyone Login form for CMS

Website Navigation Menu

Navigation Menu is stored in table TABLE_MENU.

Menu items are grouped by Menu ID.

In case if Parent ID is specified, menu items will be displayed as dropdown menu.

Menu ID URL Name Order ID Parent ID
top / Homepage 1 0
top /example-page/ Example page 2 0
top # Sitograph 3 0
top /sitograph/getting-started/ Getting Started 5 8
top /sitograph/file-structure/ Sitograph File structure 10 8
top /sitograph/modules/ Sitograph Modules 15 8
top /sitograph/API/ Website public API 20 8
top /blog/ Blog 5 0
top /gallery/ Gallery 10 0
nouser /signup/ Sing Up 1 0
nouser /login/ Log In 2 0
user /user/ My Account 1 0
user /settings/ My settings 2 0
user /?logout Logout 100 0

Website Settings

Settings are stored in table TABLE_SETTINGS.

Changing settings will have a global effect on the website. Consider before changing something.

Name Description Value
theme_css_path Path to a CSS file included globally /content/css/default.css
theme_js_path Path to a JS file included globally /content/js/default.js
include_html_head This HTML code is included to all pages, above <body> tag
theme_use_bootstrap Include Bootstrap library globally, values 0/1
*Note. Disabling of Bootstrap breaks out the layout of Admin UI
1
theme_use_jquery Include jQuery library globally, values 0/1
* Note. Disabling of jQuery breaks out the layout of Admin UI
1
message_ok Text for a success message displayed over website
message_error Text for a error message displayed over website
* Note. Enabling error message will prevent all website forms from submitting.
email_from Email used in sent-by header tech@sitograph.com
email_fromname Name used in sent-by header Sitograph
admin_email Public Administrator e-mail admin@sitograph.com
support_email Public Support e-mail admin@sitograph.com
users_registration_email Trigger to enable emails to be sent to each registered user, values 0/1 1
users_registration_email_notify Trigger to enable emails nitofication to be sent to admin_email, values 0/1 1
users_registration_allow Enables Sign Up form for new registrations 0
theme_active Name of an active theme theme-default
theme_bg Global background image URL used in design /content/images/bg_full.jpg
theme_cms_favicon Icon near homepage URL in admin UI /content/images/sitograph/cms_favicon.gif
theme_logo Global logo image URL used in design /content/images/sitograph/sitograph-logo-dark-en.png
theme_copyright_text Global text displayed in footer 2016-2018 <a href='https://www.sitograph.com/' target='_blank'>Sitograph</a>

Sitograph File structure

Root file structure

/
├── .htaccess
├── index.php
├── config.php
├── config-sample.php
├── load.php
├── favicon.ico
├── sitemap.xml
├── robots.txt
├── content/
│   └── … [Files are sent directly to browser]
├── include/
│   └── … [PHP controllers and kernel]
└── templates/
    └── … [UI templates folder]

All requests are routed to index.php by mod_rewrite rules defined in .htaccess.

Website configuration is stored in config.php. In case if config.php not found, config-sample.php is loaded and 'install' module is executed.

Initially, config.php is created by 'install' module wizard. The installation process includes creations of database tables with initial content and simple website structure.

Initialization of framework is done with load.php

Execution of any *.php files except index.php is prohibited in .htaccess for security reasons. Direct access to include/* and templates/* is also blocked.


Content file structure

content/
├── css/
│   ├── default.css
│   ├── bootstrap.min.css
│   ├── jquery.cropper.css
│   ├── jquery.fancybox.css
│   └── sitograph.css
├── fonts/
│   └── … [glyphicons set]
├── images/
│   ├── … [website images]
│   ├── fancybox
│   │   ├── … [fancybox images]
│   └── sitograph
│       └── … [CMS images]
├── js/
│   ├── default.js
│   ├── bootstrap.min.js
│   ├── jquery.cropper.js
│   ├── jquery.fancybox.min.js
│   ├── jquery.min.js
│   ├── sitograph.min.js
│   └── tinymce
│       └── … [tinymce WYSIWYG Editor files]
└── manual.html

Folder content/css is for *.css files, and content/js is for *.js respectively.

default.css is a global website CSS.

Files default.css and default.js, bootstrap.css and bootstrap.js and jquery.js are included globally as a part of 'default' theme.

Module 'fancybox' is activated globally (this leads to inclusion of jquery.fancybox.css and jquery.fancybox.js globally)

CMS includes sitograph.css and sitograph.js for all admin pages.

Modules 'cropper' and 'tinymce' are used by admin UI and loaded in /admin/* pages.

content/manual.html is a CMS manual displayed in 'Admin Dashboard -> Admin manual' section.


Templates file structure

templates/
├── custom/
│   ├── 404.tpl
│   ├── index.tpl
│   ├── main.tpl
│   ├── main-blog.tpl
│   ├── main-gallery.tpl
│   ├── user.tpl
│   ├── sitograph.tpl
│   ├── sitograph-login.tpl
│   ├── .... [templates by page]
│   ├── blog
│   │   ├── article-list.tpl
│   │   ├── article-preview-short.tpl
│   │   ├── article-preview.tpl
│   │   ├── details.tpl
│   │   ├── list.tpl
│   │   └── main.tpl
│   ├── gallery
│   │   └── .... [gallery related templates]
│   ├── sitograph
│   │   └── .... [CMS UI templates]
│   ├── user
│   │   └── .... [user related templates]
│   ├── widget
│   │   ├── header.tpl
│   │   ├── messages.tpl
│   │   ├── menu-top.tpl
│   │   ├── menu-user.tpl
│   │   ├── menu-bottom.tpl
│   │   ├── navigation.tpl
│   │   ├── pagination.tpl
│   │   ├── sideblock.tpl
│   │   ├── sideblock-blog.tpl
│   │   └── footer.tpl
└── default/
    └── .... [copy of custom]

UI templates are separated in accordance with Theme name.

The base application theme is called "custom" and placed in templates/custom.

Initially, "custom" theme is created as copy of "default" upon installation.

Each row in site structure is configured to use single theme + page template which, subsequently, includes other templates as page parts.

Template file can be associated with single page in site structure, like: index.tpl, main.tpl, main-blog.tpl, 404.tpl, etc. or can be included by other template.

For example, main-blog.tpl contains general layout for structure /blog/. Then it includes blog/main.tpl as a main content, which then includes blog/list.tpl or blog/details.tpl depending on user request.


* Note. The application will try to fall back to "default" theme if page template is not found in specified theme folder.

Folder custom/widget contains common page parts that are used in different places of website and CMS.

Folders custom/blog, custom/gallery and custom/user contains templates for appropriate website structures.

CMS UI files are stored in custom/sitograph

Common HTML widgets description:

  • header.tpl - global website HTML header
  • footer.tpl - global website footer
  • pagination.tpl - template to render pagination for listing
  • navigation.tpl - template for breadcrumbs
  • messages.tpl - block to display error and success messages
  • menu-top.tpl - website main navigation menu
  • menu-bottom.tpl - footer menu
  • menu-user.tpl - part of a menu that depends on authorized user session
  • sideblock.tpl - global website side block
  • sideblock-blog.tpl - part of sidemenu with blog articles preview

Include file structure

include/
├── class.msv.php
├── class.module.php
├── custom/
│   ├── bootstrap.php
│   ├── Google
│   │   └── .... [Google API Client Library for PHP]
│   └── smarty
│       └── .... [Smarty Template Engine]
└── module/
    ├── blog
    ├── gallery
    ├── cropper
    ├── fancybox
    ├── feedback
    ├── google-analytics
    ├── install
    ├── msv-api
    ├── msv-core
    ├── msv-seo
    ├── msv-users
    ├── search
    ├── sitograph
    ├── theme-default
    └── tinymce

include/ is the main application folder.

Controllers are separated as different modules and stored in include/module in folders with the name of a module.

Each module consists of minimum two files: config.xml and modulename.php. Optional files are included if present.

Optional config files are: config.locales.xml, config.install.xml

Optional controller files are: modulename.api.php, modulename.install.php, modulename.functions.php

Website Model is gathered in PHP class class.msv.php, creating module class instance (class.module.php) for each module. Module instance then attached to the parent class.

Each *.php file from include/custom will be included at the initialization stage.

PHP Framework Layers

Application Kernel contains: msv-core, msv-api, msv-users, msv-seo.

Kernel modules provide website with basic functionality.

msv-core is the main website module. Provides a set of functions to handle website requests, store website structure, allocate resources, install and update of new modules.

msv-api is a data connector module. Provides data exchange functions that allow to run SQL queries, update rows, delete and create database tables.

msv-users is a module to handle website users. Allows common functionality: register new user, log in, reset a password, update personal information, email notifications.

msv-seo provides Search Engine Optimization for the website. Allows to edit common page META headers and track information about visitors.