Template Manual
Any template (html, templates for Wordpress, Joomle, Drupal, DLE, Movable Type, 1C-Bitrix, NetCat, UMI.CMS and others) can be very quickly integrated into TDSSE CMS. Usually it takes 10-20 minutes and minimal HTML knowledge to integrate templates into TDSSE CMS.
The structure of the template files:
The folder with a template must be located in /uploaded/tdsse/. For example: /uploaded/tdsse/you-template/
The entire web-site design must be located in one file /uploaded/tdsse/your-template/index.html
CSS style file: /uploaded/tdsse/your-template/style.css
The /uploaded/tdsse/your-template/.htaccess file is required. It protects index.html file from direct access and has content (you an use this file from the default template):
<Files index.html>
deny from all
</Files>
Other files and images can be located anywhere within /uploaded/tdsse/your-template/ folder.
Template design can be edited in the admin panel in the "Template Management" section, "HTML template" and "CSS".
These are the main macros used:
Header with meta-tags (the code that is used between "head" tags, you can use this code without editing).
<head>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>" />
<meta name="keywords" content="<?php echo $keywords; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Robots" content="index,follow" />
<meta name="Generator" Content="TDSSE CMS">
<link rel="stylesheet" href="/uploaded/tdsse/your-template/style.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="<?php echo $sitename; ?>" href="http://<?php echo $siteurl; ?>/rss.php" />
</head>
Title (displays titles for every page).
usually it is used in <title><?php echo $title; ?></title> ,
Also it can be displayed above the main content as <h1><?php echo $title; ?></h1>
<?php echo $title; ?>
Meta description (displays page descriptions).
Example: meta name="description" content="<?php echo $description; ?>">
<?php echo $description; ?>
Displays keywords.
Usually used in <meta name="keywords" content="<?php echo $keywords; ?>">
<?php echo $keywords; ?>
Displayes the main menu. This example displays each menu line on a new line.
<?php
for ($i=0; $i<$max; $i++)
{
if ($viewmas[$i]==1)
{
if ($urlmas[$i]=="/index")
{
echo '<a href="/">'.$namemas[$i].'</a><br>';
}
else
{
echo '<a href="'.$urlmas[$i].'.html">'.$namemas[$i].'</a><br>';
}
}
}
?>
One more example (as a list):
<ul>
<?php
for ($i=0; $i<$max; $i++)
{
if ($viewmas[$i]==1)
{
if ($urlmas[$i]=="/index")
{
echo '<li><a href="/">'.$namemas[$i].'</a></li>';
}
else
{
echo '<li><a href="'.$urlmas[$i].'.html">'.$namemas[$i].'</a></li>';
}
}
}
?>
</ul>
Displays the submenu. The formatting examples are the same as for the main menu.
<?php
for ($i=0; $i<$max; $i++)
{
if ($viewmas[$i]==2)
{
if ($urlmas[$i]=="/index")
{
echo '<a href="/">'.$namemas[$i].'</a><br>';
}
else
{
echo '<a href="'.$urlmas[$i].'.html">'.$namemas[$i].'</a><br>';
}
}
}
?>
Displays an external RSS Feed in a desired place. For example to display the latest forum posts.
<?php include ("./admin/rss/rss.php"); ?>
Displays statictics counters. There should be not formatting tags around the code (no tags such as <p> </p>)
<?php echo $content; ?>
Displays Web-site search form.
<form action="search.php" method="get">
<input type="text" name="search">
<input type="submit" name="submitp" value="search">
</form>
Displays short news. The number of news displayed can be changed in if ($z<5) . In this case it will display 5 latest short news.
<?php
for ($i=($maxn-1), $z=0; (-1)<$i; $i--)
{
if ($z<5)
{
echo '<p>'.$viewmasn[$i].' <a href="'.$urlmasn[$i].'.html">'.$namemasn[$i].'</a><br>
'.file_get_contents("content/page/".$urlmasn[$i]."-s.txt").'</p>';
$z++;
}
}
?>
Displays the copyright block. Similar to the counter block. This block can be edited in the admin panel.
<?php include ("./content/blocks/copyright.php"); ?>
Displays the web-site URL you used in the config as site.com.
<?php echo $siteurl; ?>
Dusplays the e-mail used in the config.
<?php echo $email; ?>
Displays the web-site name used in the config. Will be used in RSS Feed. Also can be displays on the web-site.
<?php echo $sitename; ?>
Displays the description used in the config. Will be used in the RSS Feed. Can also be displayd under the logo and instead <?php echo $description ?> in meta description.
<?php echo $sitedescr; ?>
Displays short articles (similar to short news).
<!-- short articles -->
<?php
$max_count = 3; //
for ($i=($max-1); $i>=0 && $max_count > 0; $i--)
{
if ($viewmas[$i]==3) {
--$max_count;
echo '<a href="'.$urlmas[$i].'.html">'.$namemas[$i].'</a><br>';
}
?>
<!-- short articles -->
Also don't forget to place links in the template to the sections that do not display themselves.
<a href="/articles.html">Articles</a>
<a href="/map.html">Sitemap</a>
<a href="/contacts.html">Contacts</a>
<a href="/news.html">News archive</a>
<a href="/rss.php">RSS Feed</a>
...
Latest forum posts:
The latest forum posts are not available at this time.
