Modus Internet : Located in Vancouver and Burnaby British Columbia we do website design, database integration, custom programming, search engine optimization (SEO) or consultation.

v0.2 Setup and Install Instructions

Release Overview

This is the second release of Custodian CMS (CCMS), this version does not contain an admin area but one is not required. Follow the instructions below regarding the use of phpMyAdmin and 'Adding or Changing Supported Languages' and you should be fine. If you are unfamilier with phpMyAdmin or any other MySQL client this product may be too advanced for you.

Updates in this release:

  • Renamed ccms_vlng to ccms_lng.
  • Renamed CCMS_cookieLng() to CCMS_setLng().
  • Rewrote the entire CCMS_setLng() function, reduced from 160 to 50 lines of code.
  • Rewrote the entire CCMS_setContentTypeHeader() function.
  • Extended CCMS template parser to work with .xml and .xsl files.
  • Updates to a small amount of code and content in the error templates.

Setup

  1. Download the release file to your computer and decompress.
    NOTE: Tools like curl, libwww and wget do not work on modusinternet.com to download files.
  2. Create space on your web server to host a new website.
  3. Setup a new MySQL database, or work with an existing database.
  4. Copy the small SQL statement located in the /ccmspre/config_original.php file, approximatively line 37-84, or the SQL statement below and add it to your database with a MySQL client like phpMyAdmin to setup the database structure required by CCMS and prepopulate it with a small amount example content.
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";
    
    CREATE TABLE IF NOT EXISTS `ccms_ins_db` (
      `id` int(11) NOT NULL auto_increment,
      `status` tinyint(1) NOT NULL default '0',
      `access` tinyint(1) NOT NULL default '0' COMMENT '0=www side 1=admin side',
      `scope` varchar(255) NOT NULL,
      `word` varchar(255) NOT NULL,
      `de` text NOT NULL,
      `en` text NOT NULL,
      `fr` text NOT NULL,
      `ja` text NOT NULL,
      `zh-cn` text NOT NULL,
      PRIMARY KEY  (`id`),
      KEY `CCMS_insDBPreload_idx` (`status`,`access`,`scope`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
    
    INSERT INTO `ccms_ins_db` (`id`, `status`, `access`, `scope`, `word`, `de`, `en`, `fr`, `ja`, `zh-cn`) VALUES
    (1, 1, 0, 'index_page', 'pangram1', 'Der schnelle braune Fuchs springt über den faulen Hund.', 'The quick brown fox jumps over the lazy dog.', 'Le brun rapide le renard saute sur le chien paresseux.', '速い茶色のキツネは怠け者の犬を跳び越えます.', '那只敏捷的棕毛狐狸跃过那只懒狗.'),
    (2, 1, 0, 'index_page', 'pangram2', 'Wenn Zombies ankommen, schnell Richter Pat faxen.', 'When zombies arrive, quickly fax judge Pat.', 'Quand les zombies arrivent, faxent rapidement le juge Pat.', 'ゾンビが到着するとき、速くパット裁判官にファクスで送ってください。', '僵尸到达时,快速传真法官英保通™技术。'),
    (3, 1, 0, 'index_page', 'pangram3', 'Jede gute Kuh, Fuchs, Eichhörnchen, und Zebra mögen über glückliche Hunde springen.', 'Every good cow, fox, squirrel, and zebra likes to jump over happy dogs.', 'Chaque bonne vache, renard, l''écureuil et le zèbre aiment sauter sur des chiens heureux.', 'すべての良い雌牛、キツネ、リスと、シマウマが幸せな犬を跳び越えることを好みます。', '每个好的母牛、狐狸、鼠笼式,和斑马喜欢跳过快乐狗。'),
    (4, 1, 0, 'index_page', 'pangram4', 'Packen(Dichten) Sie meinen Kasten mit fünf Dutzend Alkohol-Krügen ein(ab).', 'Pack my box with five dozen liquor jugs.', 'Entassez ma boîte de cinq douzaines de cruches d''alcool.', '5ダースの酒水差しで私の箱を満たしてください。', '包我”框中有五个十几个酒瓶。');
    
    CREATE TABLE IF NOT EXISTS `ccms_lng_charset` (
      `id` int(11) NOT NULL auto_increment,
      `lngDesc` varchar(63) NOT NULL default '',
      `status` tinyint(1) NOT NULL default '0',
      `lng` varchar(5) NOT NULL,
      `default` tinyint(1) NOT NULL default '0',
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
    
    INSERT INTO `ccms_lng_charset` (`id`, `lngDesc`, `status`, `lng`, `default`) VALUES
    (1, 'German (Standard)', 1, 'de', 0),
    (2, 'English', 1, 'en', 1),
    (3, 'Français', 1, 'fr', 0),
    (4, '日本語 (Japanese)', 1, 'ja', 0),
    (5, '简体中文 (Simplified Chinese)', 1, 'zh-cn', 0);
    
    CREATE TABLE IF NOT EXISTS `ccms_visitor_id` (
      `id` int(11) NOT NULL auto_increment,
      `sid` varchar(32) NOT NULL,
      `expire` bigint(20) NOT NULL default '0',
      `parm1` varchar(255) NOT NULL,
      PRIMARY KEY  (`id`),
      KEY `visitorsID` (`sid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  5. Update the /ccmspre/config_original.php file with you login settings and rename it to config.php.
    NOTE: Remember to save with UTF-8 encoding (No BOM), and if you choose to use a different directory other then /ccmspre which contains your config file you will need to modify one line of code by hand. Specifically, /index.php. (line number 39)

Install

Upload all the decompressed templates to the server and call your site in any browser.

Adding or Changing Supported Languages

If you would like your site to support more languages then the default installation comes pre-configured with then follow these steps. To remove languages simply revers the steps. (This is only necessary because this version of CCMS does not come with an admin system, it won't be ready till the next big release).

Add the browser language codes you want your site to support to the ccms_lng_charset table and set one to default. Check here for a full list of 2-5 letter codes: www.metamodpro.com/browser-language-codes

Add columns for each of your new language codes to the ccms_ins_db table.

Add records to the ccms_ins_db table containing the scope, word and content for each language you would like to view in your website.


NOTE: scope refers to the small descriptive bits of text found in the CCMS_DB_PRELOAD tag.
e.g.:

  • {CCMS_DB_PRELOAD:index_page,some_footer_filter,some_header_filter,some_twiter_feed_filter}
Individually these refer to indexed content which is required on a specific page or over and over by areas of repeated content like headers and footers. This tag is placed at the top of any page which contains CCMS_DB tags. The CCMS_DB tags in turn pull specific content in a given language from an array for insertion into the template before being sent back to the client.

NOTE: word refers to the second of two small bits of text found in the CCMS_DB tag.
e.g.:
  • {CCMS_DB:index_page,paragraph1}
Calls to the CCMS_DB tag pull content from an array in memory, the CCMS_DB_PRELOAD tag loads it for you. The first variable in the CCMS_DB tag refers to the correct index within the array, the second variable refers to the specific piece of content you want to retrieve. Language is automatically determined by CCMS.


Contact Us

778 786 2423

1310 Fraser Ave
Port Coquitlam, BC, Canada
V3B 1M4
(10 minutes from Vancouver)
info@modusinternet.com


Copyright © 2017 Modus Internet. All rights reserved.