TextCMS Documentation - Web Site Settings

Your web site settings are stored in "config.cfg". This file is a PHP file setting some parameters. If "config.cfg" does not exist, please copy "default.cfg" as a "config.cfg". "default.cfg" is the default configuration file. It is used when "config.cfg" is missing. We do not recommend to modify "default.cfg", since your changes may be overwritten with a TextCMS update.

<?php

TEXTCMS::SetSiteName ( "Site Name" );
TEXTCMS::SetDefaultArticle ( "index" );
TEXTCMS::SetTemplate ( "default" );
TEXTCMS::SetDescription ( "web site" );
TEXTCMS::SetKeywords ( "web site" );
TEXTCMS::SetCharset ( "UTF-8" );
TEXTCMS::SetThumbSize ( 180, 135 );
TEXTCMS::SetDefaultThumbImage ( "_media/default.png" );
TEXTCMS::SetSummaryTextLength (200);
TEXTCMS::SetFavicon ( "_media/icon.png" );

TEXTCMS::LoadPlugin ( "facebook" );
TEXTCMS::LoadPlugin ( "audio" );
TEXTCMS::LoadPlugin ( "slider" );
TEXTCMS::LoadPlugin ( "dropdown" );
TEXTCMS::LoadPlugin ( "code" );

?>

Let's review this config file line by line:

TEXTCMS::SetSiteName ( "Site Name" );
This instruction sets your site name.
TEXTCMS::SetDefaultArticle ( "index" );
This just means that article "index", stored in "_articles/index.art", is the default article of the web site. You can change the name of the default article.
TEXTCMS::SetTemplate ( "default" );
This line sets the name of your default web site template. Individual pages may override this setting.
TEXTCMS::SetSiteDescription ( "web site description" );
This line sets the default description of your web site for SEO (Search Engine Optimization). Individual pages may override this setting.
TEXTCMS::SetKeywords ( "web site" );
This line sets the default keywords of your web site for SEO. Individual pages may override this setting.
TEXTCMS::SetCharset ( "UTF-8" );
This line sets the default charset of your web site. Individual pages may override this setting (example: TEXTCMS::SetCharset ( "windows-1251" );.
TEXTCMS::SetThumbSize ( 180, 135 );
Some of the internal plugins can create previews of your articles. Thumbnail images may be generated. This setting sets the default thumbnail size.
TEXTCMS::SetDefaultThumbImage ( "_media/default.png" );
Some of the internal plugins can create previews of your articles. Thumbnail images may be generated, but when no thumbnail is generated (for example when there is no main image defined in an article), this image is used instead of a generated thumbnail.
TEXTCMS::SetSummaryTextLength (200);
Some of the internal plugins can create previews of your articles. These previews will have summary. This setting sets the default summary length in characters.
TEXTCMS::SetFavicon ( "_media/icon.png" );
Sets "favicon" of your web site. This is a small 16x16 or 32x32 icon of your site displayed by browsers.
TEXTCMS::LoadPlugin (...)
These instructions load external plugins located in "_plugins" folder. All of the internal plugins are loaded by default.

There is one more thing worth mentioning. There is a file ".htaccess" provided with TextCMS. It is provided for security reasons. It prohibits access to files with articles, modules, templates, plugins, areas and configs directly from the web. These files are in PHP format and giving such direct access if dangerous for site security. We recommend to make it read only to everyone but file owner (chmod 0644 .htaccess).

(c) 2018-2024 TextCMS