remove deprecated docs folder
Dieser Commit ist enthalten in:
Ursprung
6a52c9cda3
Commit
27fd2340b6
|
@ -1,213 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
|
||||
<title>Contenido - Autoloader for class type files</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #f1f1f1;
|
||||
color:#000;
|
||||
font:normal normal normal 11px/normal verdana, arial, helvetica, sans-serif;
|
||||
scrollbar-face-color:#c6c6d5;
|
||||
scrollbar-highlight-color:#ffffff;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334f77;
|
||||
scrollbar-arrow-color:#334f77;
|
||||
scrollbar-track-color:#c7c7d6;
|
||||
}
|
||||
|
||||
h1 {font:normal normal bold 20px/normal verdana, arial, helvetica, sans-serif; color:#000; margin-top:0px;}
|
||||
h2 {font:normal normal bold 15px/normal verdana, arial, helvetica, sans-serif; color:#000;}
|
||||
|
||||
pre, .pre {background-color:#f6f6f6; border:1px solid #dadada; display:block; font-family:"Courier New"; margin:10px 0; padding:7px 10px;}
|
||||
|
||||
#header {clear:both; overflow:hidden; width:998px;}
|
||||
#header img {display:block; float:left; margin:0 30px 0 0;}
|
||||
#header h1 {float:left; line-height:75px; padding:0; margin:0;}
|
||||
|
||||
.section {padding:7px 0;}
|
||||
|
||||
.section li {padding:3px 0;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body alink="#000099" vlink="#990099" link="#000099">
|
||||
|
||||
<div id="header">
|
||||
<img src="conlogo.gif" alt="Contenido Logo" />
|
||||
<h1>Contenido autoloader (since V. 4.8.15)</h1>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="intro">Introduction</a></h2>
|
||||
<p>Contenido provides autoloading for source files of classes/interfaces which are
|
||||
delivered by a Contenido package.<br />
|
||||
The main goal of autoloading is to reduce the list of needed includes which is usually
|
||||
at the beginning of scripts. By implementing a autoloader, the PHP engine has the
|
||||
possibility to load the file while trying to use a class/interface.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="how_it_works">How it works?</a></h2>
|
||||
<p>The Contenido autoloader will be initialized during the application startup process.
|
||||
The autoloading solution in Contenido uses the class map strategy. It uses a generated
|
||||
class map configuration file, which is available inside contenido/includes/ folder.</p>
|
||||
<pre>contenido/includes/config.autoloader.php</pre>
|
||||
<p>Each class type name is pointed to a file which contains the implementation of the
|
||||
required class type. By trying to use a class type, the autoloader will load the
|
||||
needed file if not done before.<br />
|
||||
<br />
|
||||
<strong>Example:</strong><br />
|
||||
Usually you have to ensure that a class file is already loaded by using include/require
|
||||
statements or by using Contenido's cInclude function:</p>
|
||||
<pre>
|
||||
cInclude('classes', 'class.article.php');
|
||||
$oArt = new Article();
|
||||
</pre>
|
||||
|
||||
<p>With a autoloader the manually loading is not required anymore.</p>
|
||||
<pre>
|
||||
$oArt = new Article();
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="available_classes_interfaces">Classes/Interfaces available by the autoloader</a></h2>
|
||||
<p>At the moment all available classes/interfaces inside following directories
|
||||
of a Contenido installation:</p>
|
||||
<pre>
|
||||
contenido/classes/
|
||||
</pre>
|
||||
<p><strong>NOTE:</strong><br />
|
||||
The autoloader doesn't handle loading of files which don't belong to the Contenido package.
|
||||
This means, additional added files (e. g. user defined classes/libraries) aren't
|
||||
automatically available for the autoloader. Read the <a href="#autogen_classmap">section</a> below, if you want to
|
||||
provide autoloading of additional class type files.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="extending_classmap">Extending the class map configuration</a></h2>
|
||||
<p>Don't edit the class map configuration manually, the next update could overwrite
|
||||
your changes. The autoloading is extendable by adding a additional user defined class map
|
||||
file inside the "includes" folder, which could contain further class map settings or
|
||||
could overwrite settings of main class map file.</p>
|
||||
<pre>contenido/includes/config.autoloader.local.php</pre>
|
||||
<p>This file will not be overwritten during a update.<br />
|
||||
<br />
|
||||
The content of the user defined file should have the following structure:</p>
|
||||
<pre>
|
||||
<?php
|
||||
return array(
|
||||
'{classname_1}' => '{path_to_classfile_1}',
|
||||
'{classname_2}' => '{path_to_classfile_2}',
|
||||
'{classname_3}' => '{path_to_classfile_3}',
|
||||
);
|
||||
</pre>
|
||||
<p>Where {classname_X} is the name of the class/interface and {path_to_classfile_X} is the
|
||||
path (from Contenido installation folder) to the file which contains the implementation of the class/interface.<p>
|
||||
|
||||
<p><strong>Example:</strong><br />
|
||||
Let's assume that Contenido is installed in folder /var/www/ which contains a
|
||||
additional library "myLib" (full path: /var/www/myLib/) with a class "myFoobarClass"
|
||||
in file "class.myfoobarclass.php" (full path: /var/www/myLib/class.myfoobarclass.php).
|
||||
Then the user defined class map file should contain a entry for this like:</p>
|
||||
<pre>
|
||||
<?php
|
||||
return array(
|
||||
...
|
||||
'myFoobarClass' => 'myLib/class.myfoobarclass.php',
|
||||
...
|
||||
);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="autogen_classmap">Auto generation of user defined class map configuration</a></h2>
|
||||
<p>If you don't want to maintain the user defined class map configuration manually, then
|
||||
you may let a copy of the command line script (which is adapted to your requirements)
|
||||
<span class="pre">contenido/tools/create_autoloader_cfg.php</span>
|
||||
to do the job.<br />
|
||||
<br />
|
||||
Do following steps to achieve this:</p>
|
||||
<ul>
|
||||
<li>Create a copy of create_autoloader_cfg.php and name it e. g. create_localautoloader_cfg.php</li>
|
||||
<li>
|
||||
Open create_localautoloader_cfg.php and adapt it to your requirements (see Initialization/Settings)
|
||||
<ul>
|
||||
<li>
|
||||
Set setting $context->destinationFile to
|
||||
<span class="pre">$context->destinationFile = $context->contenidoInstallPath . '/contenido/includes/config.autoloader.local.php';</span>
|
||||
<strong>NOTE:</strong> Don't use another file name, it's predefined and has to be "config.autoloader.local.php"
|
||||
</li>
|
||||
<li>
|
||||
Define paths which should be parsed recursively, e. g.
|
||||
<pre>$context->pathsToParse = array(
|
||||
$context->contenidoInstallPath . '/my_path/',
|
||||
$context->contenidoInstallPath . '/my_other_path/',
|
||||
);
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
Change class type finder options (if required), e. g.
|
||||
<pre>// class type finder options
|
||||
$context->options = array(
|
||||
// list of directories which are to exclude from parsing (case insensitive)
|
||||
'excludeDirs' => array('.svn'),
|
||||
// list of files which are to exclude from parsing (case insensitive), also possible regex patterns like /^~*.\.php$/
|
||||
'excludeFiles' => array(),
|
||||
// list of file extensions to parse (case insensitive)
|
||||
'extensionsToParse' => '.php',
|
||||
'enableDebug' => false,
|
||||
);
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Run the class map creator by typing following to the command line:
|
||||
<span class="pre">$ php create_localautoloader_cfg.php</span>
|
||||
<strong>NOTE:</strong> PHP needs write permissions for folder "contenido/includes/"
|
||||
</li>
|
||||
<li>
|
||||
Check the generated/upated file "config.autoloader.local.php" inside "contenido/includes/" folder
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="extending_contenido_core">Extending Contenido core with autoload mechanism</a></h2>
|
||||
<p>By using the Contenido autoloader it's possible to extend/overwrite Contenido core classes
|
||||
(except classes inside conlib directory) without changing the core files.</p>
|
||||
<p>Let's assume, you want to use your own Template class in Modules, but everything should
|
||||
still be downwards compatible.<br />
|
||||
<br />
|
||||
Do following steps to achieve this:</p>
|
||||
<ul>
|
||||
<li>Create a user defined folder (if required) which should contain your own Template class file</li>
|
||||
<li>Create a class file (e. g. class.mytemplate.php), which should contain the
|
||||
implementation of new class Template</li>
|
||||
<li>Implement your own Template class. Ensure that the interface of your Template class
|
||||
is identical to the Contenido Template class. This means, each public accessible
|
||||
property, method should have the same interface as in the original Contenido
|
||||
Template class (Same names, properties, parameters, etc.).</li>
|
||||
<li>Modify the functions to your requirements</li>
|
||||
<li>Add the class map configuration of your new Template class to the user defined
|
||||
file config.autoloader.local.php or regenerate the user defined class map file
|
||||
(see <a href="#extending_classmap">extending class map</a> and
|
||||
<a href="#autogen_classmap">auto generation of class map</a>)</li>
|
||||
</ul>
|
||||
<p>
|
||||
<strong>NOTE:</strong><br />
|
||||
There is one main disadvantage by using this way of extending the Contenido core.
|
||||
Each time after an update of your Contenido installation it's strongly recommend
|
||||
to check your user defined implementations against changes in original Contenido
|
||||
core files and, if applicable, to adapt your files to those changes.</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 3.3 KiB |
|
@ -1,537 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Contenido - Backend customizing</title>
|
||||
<style type="text/css">
|
||||
body,tr,td {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif;
|
||||
font-size: 11px;
|
||||
color: #000000;
|
||||
}
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif;
|
||||
font-size: 20px;
|
||||
color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif;
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="color: rgb(0, 0, 0); background-color: #F1F1F1;" alink="#000099" link="#000099" vlink="#990099">
|
||||
|
||||
<div>
|
||||
<img src="conlogo.gif" alt="Contenido Logo" style="display:block;float:left;margin:0 30px 0 0;" />
|
||||
<h1 style="float:left;line-height:80px;padding:0;margin:0;">Backend customizing (V. 4.8.x)</h1>
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
|
||||
<h2>Introduction</h2>
|
||||
Backend customizing is a mechanism to customize various parameters of
|
||||
the backend. There are not many settings you can do, as this mechanism
|
||||
is relatively new. However, this mechanism will be used more and more
|
||||
in the future.<br>
|
||||
<br>
|
||||
<h2>How it works</h2>
|
||||
Customizing Contenido settings is very easy and can be done via the
|
||||
group or user customizing settings. Here's an example for the user
|
||||
customizing:<br>
|
||||
<br>
|
||||
<img src="backend.customizing.1.gif" alt="" style="width: 631px; height: 104px;"><br>
|
||||
<br>
|
||||
Important: User settings have precendence before group settings. User
|
||||
settings always override group settings. If the user is added to more
|
||||
than one group, the result is undefined. Make sure that your groups
|
||||
don't override each other.<br>
|
||||
<br>
|
||||
<h2><span style="font-weight: bold;">Common parameters</span></h2>
|
||||
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; font-weight: bold;">Area/Type</td>
|
||||
<td style="vertical-align: top; font-weight: bold;">Property</td>
|
||||
<td style="vertical-align: top; font-weight: bold;">Value (Description)</td>
|
||||
<td style="vertical-align: top; font-weight: bold; width: 185px;">Applies to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">backend</td>
|
||||
<td style="vertical-align: top;">currentlogintime</td>
|
||||
<td style="vertical-align: top;">Date and Time when this session has been started (automatically set by the backend)</td>
|
||||
<td style="vertical-align: top;">Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">backend</td>
|
||||
<td style="vertical-align: top;">lastlogintime</td>
|
||||
<td style="vertical-align: top;">Date and Time when the last session was started (automatically set by the backend)</td>
|
||||
<td style="vertical-align: top;">Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">backend</td>
|
||||
<td style="vertical-align: top;">preferred_idclient</td>
|
||||
<td style="vertical-align: top;">ID of the client which should be selected after backend login</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">backend</td>
|
||||
<td style="vertical-align: top;">leftframewidth</td>
|
||||
<td style="vertical-align: top;">Defines the width of the left frame. Standard
|
||||
value is 250.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Group, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">backend</td>
|
||||
<td style="vertical-align: top;">small-navigation</td>
|
||||
<td style="vertical-align: top;">(true, false): If true, a small navigation is shown. Default: false</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">articles</td>
|
||||
<td style="vertical-align: top;">show-new-window-checkbox</td>
|
||||
<td style="vertical-align: top;">
|
||||
(true, false): If true, show "new window" checkbox for redirects in article properties.
|
||||
Note: If a redirect has been specified, the page is redirected to the new URL using an html
|
||||
page header. As header redirects can't open new windows, this setting is only useful,
|
||||
if a navigation module is used, which mentions the "open in new window" setting and
|
||||
adds a ′target="_blank"′ to the link, if necessary. Default: false
|
||||
</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">directory-height</td>
|
||||
<td style="vertical-align: top;">Height of the directory lister in rows, default 5</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">directory-width</td>
|
||||
<td style="vertical-align: top;">Width of the directory lister in pixels, default 300</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">file-height</td>
|
||||
<td style="vertical-align: top;">Height of the file lister in rows, default 5</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">file-width</td>
|
||||
<td style="vertical-align: top;">Width of the file lister in pixels, default 300</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">description-height</td>
|
||||
<td style="vertical-align: top;">Height of the description box in rows, default 5</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">description-width</td>
|
||||
<td style="vertical-align: top;">Width of the description box in characters, default 70</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">preview-height</td>
|
||||
<td style="vertical-align: top;">Height of the preview area in pixels, default 400</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">cms_img</td>
|
||||
<td style="vertical-align: top;">preview-width</td>
|
||||
<td style="vertical-align: top;">Width of the preview window in pixels, default 600</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">imagemagick</td>
|
||||
<td style="vertical-align: top;">available</td>
|
||||
<td style="vertical-align: top;">Set "1" if ImageMagick is available on your server to receive best results when resizing images</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">java-edit</td>
|
||||
<td style="vertical-align: top;">Enable the java module editor</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">edit-with-tabs</td>
|
||||
<td style="vertical-align: top;">(true, false) If set to "true" you can use the <tab> key to insert tabs in the input and output code areas (IE 6/7, FF 1.5/2). Default: false</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">disable-history</td>
|
||||
<td style="vertical-align: top;">(true, false) If true, don't use the module history. Default: false</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">storeasfiles</td>
|
||||
<td style="vertical-align: top;">Defines if Contenido should store modules as text files. THIS IS HIGHLY EXPERIMENTAL, ONLY USE IF YOU KNOW WHAT YOU ARE DOING! Default off.</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">loadfromfiles</td>
|
||||
<td style="vertical-align: top;">Defines if Contenido should load modules as text files. THIS IS HIGHLY EXPERIMENTAL, ONLY USE IF YOU KNOW WHAT YOU ARE DOING! Default off.</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">modules</td>
|
||||
<td style="vertical-align: top;">force-menu-check</td>
|
||||
<td style="vertical-align: top;">If system/modulecheck is enabled, force module check while module list will be generated (instead of using database information). Default $quot;false$quot;.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">modulecheck</td>
|
||||
<td style="vertical-align: top;">if set to "false" (as string), modules aren't tested for syntax errors (needed for older PHP versions)</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">languageorder</td>
|
||||
<td style="vertical-align: top;">If set to "name", languages in the drop-down (top right) will be shown ordered by name,
|
||||
if not specified or set to something else, languages will be ordered by language id (default)</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">multiassign</td>
|
||||
<td style="vertical-align: top;">If false, don't allow multi assignments for articles.</td>
|
||||
<td style="vertical-align: top;">System, Clients</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">layout</td>
|
||||
<td style="vertical-align: top;">htmlvalidator</td>
|
||||
<td style="vertical-align: top;">(true, false): If true, use the HTML validator. Default: true</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">newsletter</td>
|
||||
<td style="vertical-align: top;">option-cronjob-available</td>
|
||||
<td style="vertical-align: top;">(true, false): If true, then a newsletter
|
||||
option can be activated to send the newsletter using cron jobs. Note, that
|
||||
this option should only be used, if a real cron service is available
|
||||
(do not use the Contenido built-in pseudo cron service). Additionally,
|
||||
note, that there is a send job file available in the contenido/cronjobs
|
||||
folder, but it hasn't been added to the cron job list - just generate
|
||||
a real cron job on your server running this file. Default: false</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">newsletter</td>
|
||||
<td style="vertical-align: top;">disable-rn-replacement</td>
|
||||
<td style="vertical-align: top;">(true, false): If true, "\r\n" will not
|
||||
be replaced by just "\n" to prevent double lines in mails. This may be
|
||||
a good idea on Windows-Servers. Usually, use the default setting. Default: false</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">newsletter</td>
|
||||
<td style="vertical-align: top;">remove_base_tag</td>
|
||||
<td style="vertical-align: top;">(true, false): Usually every article contains a "e;base href"e;
|
||||
tag. This is nice, as all links, URLs and sources can be relative and we can
|
||||
move the client around, as we like.<br /><br />But there is a problem with anchors: They
|
||||
only work, if the link to the anchor (on the same page) contains the URL of the
|
||||
current article (e.g. "front_content.php?idart=77#MyAnchor"). This works
|
||||
fine, if you are on the website, but not, if you use anchors in html newsletter
|
||||
articles (as the mail doesn't has this URL).<br /><br />If you like to use anchors in html
|
||||
newsletters, set this setting to "true" and check everything twice, as
|
||||
also all URLs and source path will be changed by Contenido code. Default: false</td>
|
||||
<td style="vertical-align: top;">Client</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">newsletter</td>
|
||||
<td style="vertical-align: top;">html_username<br />html_password</td>
|
||||
<td style="vertical-align: top;">If the frontend (the website) is proteced
|
||||
using .htaccess (username/password), you have to specify html_username and
|
||||
html_password to be able to send html newsletters (as html newsletters
|
||||
are just usual articles). Default: empty or not specified</td>
|
||||
<td style="vertical-align: top;">Client</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">frontendusers</td>
|
||||
<td style="vertical-align: top;">pluginsearch</td>
|
||||
<td style="vertical-align: top;">(true, false): If true, the frontend users
|
||||
menu also searches trough plugins. However, searching trough plugins
|
||||
have a huge performance inpact on the list. If you have alot of frontend
|
||||
users, set this to false to disable this function. Default: true</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">frontendusers</td>
|
||||
<td style="vertical-align: top;">pluginsearch_valid_plugins</td>
|
||||
<td style="vertical-align: top;">If pluginsearch is set to true, you can hereby
|
||||
limit the plugins to search over. This property must be a comma-separated list
|
||||
(no whitespaces) of all plugins that should be used for pluginsearch.
|
||||
All other plugins will be skipped to improve performance.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">generator</td>
|
||||
<td style="vertical-align: top;">xhtml</td>
|
||||
<td style="vertical-align: top;">(true, false): Defines if the tags generated by Contenido
|
||||
should be XHTML compliant. WARNING: This does not alter the HTML code
|
||||
in your layouts and modules! You have to revise your modules and layouts
|
||||
to be XHTML compliant. Default: false.</td>
|
||||
<td style="vertical-align: top;">System, Clients</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">generator</td>
|
||||
<td style="vertical-align: top;">basehref</td>
|
||||
<td style="vertical-align: top;">(true, false): Defines if Contenido should automatically
|
||||
insert a base href tag. Default: true.</td>
|
||||
<td style="vertical-align: top;">System, Clients</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">edit_area</td>
|
||||
<td style="vertical-align: top;">activated</td>
|
||||
<td style="vertical-align: top;">(true, false): Defines if syntax highlighting editor is used in backend for modul, js, css and html code Default: true.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">insight_editing_activated</td>
|
||||
<td style="vertical-align: top;">(true, false): Defines if insight editing is used in article editor</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">maintenance</td>
|
||||
<td style="vertical-align: top;">mode</td>
|
||||
<td style="vertical-align: top;">(disabled, enabled): In maintenance mode, only sysadmins are allowed to login into contenido backend. Default: disabled</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">pw_request</td>
|
||||
<td style="vertical-align: top;">enable</td>
|
||||
<td style="vertical-align: top;">(true, false): Property definies if contanido is allowed to generate new passwords for backenduser and submits them via mail. Default: true</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">mail_host</td>
|
||||
<td style="vertical-align: top;">Host which is used for sending system mails (PW-Request). Default: localhost</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">mail_sender</td>
|
||||
<td style="vertical-align: top;">Sender mail-adress of Contenido Systemmails. (PW-Request). Default: info@contenido.org</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">system</td>
|
||||
<td style="vertical-align: top;">mail_sender_name</td>
|
||||
<td style="vertical-align: top;">Sender name of Contenido Systemmails. (PW-Request). Default: Contenido Backend</td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">update</td>
|
||||
<td style="vertical-align: top;">check</td>
|
||||
<td style="vertical-align: top;">(true, false): Update checker notifies sysadmins, if there are new updates for contenido on contenido org. Default: false </td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">update</td>
|
||||
<td style="vertical-align: top;">news_feed</td>
|
||||
<td style="vertical-align: top;">(true, false): Update RSS News notifies sysadmins, about news on contenido org and security issues. Default: false </td>
|
||||
<td style="vertical-align: top;">System</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<h2>tinyMCE-related Parameters</h2>
|
||||
Starting with Contenido V4.6.16 all tinyMCE settings which may be specified for tinyMCE
|
||||
and the plugins may be specified as system, client, group or user setting. Use "tinymce"
|
||||
as type and as name the name of the parameter according to the tinyMCE documentation.<br />
|
||||
<br />
|
||||
These parameters can't be set using a setting: document_base_url, file_browser_callback<br />
|
||||
<br />
|
||||
<table border="1" cellpadding="2"
|
||||
cellspacing="2" style="text-align: left; width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">content_css</td>
|
||||
<td style="vertical-align: top;">Defines the stylesheet to
|
||||
include within tinyMCE (<= V4.6.15: wysiwyg/tinymce-stylesheet-file).</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">theme_advanced_styles</td>
|
||||
<td style="vertical-align: top;">Defines the available styles in the tinyMCE style
|
||||
dropdown (<= V4.6.15: wysiwyg/tinymce-styles)</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">width</td>
|
||||
<td style="vertical-align: top;">Defines the width of tinyMCE (<= V4.6.15: wysiwyg/tinymce-width,
|
||||
default 100%)</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">height</td>
|
||||
<td style="vertical-align: top;">Defines the height if tinyMCE (<= V4.6.15: wysiwyg/tinymce-height,
|
||||
default 480px)</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_height_html</td>
|
||||
<td style="vertical-align: top;">Overrides the tinyMCE height when editing
|
||||
the CMS_HTML element (<= V4.6.15: wysiwyg/tinymce-height-html)
|
||||
</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_height_head</td>
|
||||
<td style="vertical-align: top;">Overrides the tinyMCE height when editing
|
||||
the CMS_HTMLHEAD element (<= V4.6.15: wysiwyg/tinymce-height-head)</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_gzip</td>
|
||||
<td style="vertical-align: top;">If set to "true" use gzip compression.
|
||||
The server has to provide the compression method. Default: "false"</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_toolbar_mode</td>
|
||||
<td style="vertical-align: top;">Defines the tinyMCE toolbar mode (default
|
||||
"full"). Available choices: full, simple, mini, custom (<= V4.6.15: wysiwyg/tinymce-toolbar-mode)</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">theme_advanced_buttons1<br />
|
||||
theme_advanced_buttons2<br />
|
||||
theme_advanced_buttons3</td>
|
||||
<td style="vertical-align: top;">Defines which items should be shown on
|
||||
the first/second/third toolbar. Please have a look at the tinyMCE documentation to
|
||||
find out which items you can use (<= V4.6.15: wysiwyg/tinymce-toolbar1/2/3).
|
||||
Only used if the toolbar mode is "custom".</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">plugins</td>
|
||||
<td style="vertical-align: top;">Defines which plugins should be loaded
|
||||
(<= V4.6.15: wysiwyg/tinymce-plugins). Only used if the toolbar mode is "custom".</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">valid_elements</td>
|
||||
<td style="vertical-align: top;">Defines which elements are allowed. See
|
||||
tinyMCE documentation for more information (<= V4.6.15: wysiwyg/tinymce-valid-elements).<br />
|
||||
Default: +a[name|href|target|title],strong/b[class],em/i[class],strike[class],u[class],
|
||||
p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],
|
||||
sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],
|
||||
tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],
|
||||
div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],
|
||||
h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">extended_valid_elements</td>
|
||||
<td style="vertical-align: top;">Defined which elements are allowed. These
|
||||
elements are added to valid_elements (<= V4.6.15: wysiwyg/tinymce-extended-valid-elements).<br />
|
||||
Default: form[name|action|method],textarea[name|style|cols|rows],input[type|name|value|style|onclick],
|
||||
a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],
|
||||
hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_background_color</td>
|
||||
<td style="vertical-align: top;">Defines the tinyMCE background color (any
|
||||
valid CSS color value can be used). If you use an HTML hex color code,
|
||||
also include the # sign before the color (e.g. #ffffff). Default is
|
||||
"white" (<= V4.6.15: wysiwyg/tinymce-backgroundcolor).</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">convert_urls</td>
|
||||
<td style="vertical-align: top;">(true, false): Defines, if URLs will be converted (e.g. to relative URLs)
|
||||
at all. Please note, that URLs should be converted (e.g. for the time you may have to
|
||||
change the domain or server path). Default: true (<= V4.6.15: wysiwyg/tinymce-convert-urls)</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">relative_urls</td>
|
||||
<td style="vertical-align: top;">(true, false): If convert_urls is true, then
|
||||
this setting specifies, if URLs will be converted to relative or absolute URLs.
|
||||
Please note, that relative URLs should be used (e.g. for the time you may have to
|
||||
change the domain or server path). Default: true (<= V4.6.15: wysiwyg/tinymce-relative-urls)</td>
|
||||
<td style="vertical-align: top;">System, Clients, Groups, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">tinymce</td>
|
||||
<td style="vertical-align: top;">contenido_lists</td>
|
||||
<td style="vertical-align: top;">If specified, adds dropdown lists with links
|
||||
for all articles (Insert Link popup window), images (Insert Image popup window) and/or
|
||||
all media/flash files (Insert Media/Flash popup window). Valid values are: link, image,
|
||||
media, flash.
|
||||
Values have to be separated by a comma, e.g. "link,image".<br /><br />
|
||||
<strong>Do not specify</strong>, if you have a lot of articles, images and/or media files
|
||||
(<= V4.6.15: wysiwyg/tinymce-lists).
|
||||
</td>
|
||||
<td style="vertical-align: top;">System, Groups, Users</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br /><br />
|
||||
<h2>Style-editor, Script-editor and HTML-editor related Parameters</h2>
|
||||
<table border="1" cellpadding="2"
|
||||
cellspacing="2" style="text-align: left; width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">style_editor</td>
|
||||
<td style="vertical-align: top;">wrap</td>
|
||||
<td style="vertical-align: top;">{on, off} Default off. Defines the wrap attribute of the textarea to edit the CSS file. In case of 'on' the lines will be wraped.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">script_editor</td>
|
||||
<td style="vertical-align: top;">wrap</td>
|
||||
<td style="vertical-align: top;">{on, off} Default off. Defines the wrap attribute of the textarea to edit the JS file.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">html_editor</td>
|
||||
<td style="vertical-align: top;">wrap</td>
|
||||
<td style="vertical-align: top;">{on, off} Default off. Defines the wrap attribute of the textarea to edit the HTML file.</td>
|
||||
<td style="vertical-align: top;">System, Clients, Users</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,60 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
<title>Contenido - Preserving local settings</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="color: rgb(0, 0, 0); background-color: #F1F1F1;"
|
||||
link="#000099" vlink="#990099" alink="#000099">
|
||||
|
||||
<div style="width:998px;">
|
||||
<img src="conlogo.gif" alt="Contenido Logo" style="display:block;float:left;margin:0 30px 0 0;" />
|
||||
<h1 style="float:left;line-height:80px;padding:0;margin:0;">Preserving local settings (V. 4.8.x)</h1>
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
<h2>Introduction</h2>
|
||||
In the past, all modifications to Contenido's config.php file were lost
|
||||
during an upgrade.<br>
|
||||
<br>
|
||||
<h2>Where? What? How?<br>
|
||||
</h2>
|
||||
Contenido now includes a local config file - config.local.php. This
|
||||
file isn't overwritten during an upgrade, so you can make your changes
|
||||
there (recommended by now). It is included in the main config.php file.
|
||||
Remember that the config.php file is usually the first file included;
|
||||
don't do any tricks like database queries there.<br>
|
||||
<br>
|
||||
<h2>Frontend config?</h2>
|
||||
Yep, that's also possible. Just create a file "config.local.php" in the
|
||||
frontend directory. The file will be executed just after the
|
||||
front_content.php's init code (so you've got all variables and database
|
||||
available), but just before the magic starts (like executing the
|
||||
content code etc). Note that everything is available from the backend's
|
||||
config.local.php also.<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,85 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1"
|
||||
http-equiv="content-type">
|
||||
<title>Contenido - Pluggable Authentification for the Contenido
|
||||
Backend</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body alink="#000099" vlink="#990099" link="#000099"
|
||||
style="color: rgb(0, 0, 0); background-color: #F1F1F1;">
|
||||
|
||||
<div style="width:998px;">
|
||||
<img src="conlogo.gif" alt="Contenido Logo" style="display:block;float:left;margin:0 30px 0 0;" />
|
||||
<h1 style="float:left;line-height:80px;padding:0;margin:0;">Pluggable Authentification for the Contenido Backend (V. 4.8.x)</h1>
|
||||
</div>
|
||||
<br style="clear:both;" />
|
||||
|
||||
<h2>Introduction</h2>
|
||||
Contenido introduces a new system to authenticate against external
|
||||
sources (LDAP directories, for example).<br>
|
||||
<br>
|
||||
<h2>What does it do?</h2>
|
||||
Contenido Pluggable Authentification Modules (don't swap them around
|
||||
with Linux PAM) makes it possible to authenticate via external sources
|
||||
- and just authentification. <br>
|
||||
<h2>How it works (authentification handler)<br>
|
||||
</h2>
|
||||
To write your own authentification handler, you have to write a single
|
||||
function which looks like this:<br>
|
||||
<br>
|
||||
<pre>function active_directory_auth ($username, $password)<br>{<br> global $cfg;<br> <br> if ($cfg['ldap']['server'] != "")<br> {<br> $ad = ldap_connect($cfg['ldap']['server']);<br> if ($ad)<br> {<br> ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);<br> $bd = ldap_bind($ad, $username . $cfg['ldap']['suffix'], $password);<br> <br> if (!$bd)<br> {<br> return false;<br> }<br> }<br> }<br> <br> return true;<br>}</pre>
|
||||
<br>
|
||||
If that function returns true, the mechanism knows that the login was
|
||||
successful. After that, you have to register the function:<br>
|
||||
<br>
|
||||
<pre>register_auth_handler("active_directory_auth");<br><br></pre>
|
||||
By registering the function, the login mechanism knows that it should
|
||||
call "active_directory_auth" for certain users. Finally, you have to
|
||||
include your new handler file (the recommended place is
|
||||
config.local.php).<br>
|
||||
<br>
|
||||
The login mechanism knows that you want to use a registered auth
|
||||
handler if the entry in the password field of the user equals a
|
||||
registered auth handler; e.g. the user "test" has
|
||||
"active_directory_auth" in his password field, thus the login mechanism
|
||||
would use the "active_directory_auth" function to validate. The
|
||||
password field has to be set using the sync script.<br>
|
||||
<br>
|
||||
<h2>Syncing with a remote source</h2>
|
||||
To make the authentification handler working, you have to "sync" your
|
||||
users to Contenido. This means that each user needs to be created
|
||||
and/or updated by a sync script (it's preferred to automate this using
|
||||
a cronjob to ensure regular updates). The active directory example has
|
||||
a sync script; you can modify it to fit your own needs.<br>
|
||||
<br>
|
||||
Remember that if you want your permissions syncronized using the sync
|
||||
script, you are on your own - we recommend that you only sync users,
|
||||
user-to-group relationships and groups and apply all rights to groups
|
||||
to keep it simple.<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 1.3 KiB |
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 5.2 KiB |
|
@ -1,120 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
<title>Contenido - Frontend customizing</title>
|
||||
<style type="text/css">
|
||||
body,tr,td {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
|
||||
alink="#000099" link="#000099" vlink="#990099">
|
||||
<table
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img src="conlogo.gif"
|
||||
alt="Contenido"
|
||||
style="width: 190px; height: 112px; padding-right: 20px;" align="left">
|
||||
<h1>Backend customizing</h1>
|
||||
<table style="text-align: left;" border="0" cellpadding="2"
|
||||
cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Björn Behrens (HerrB)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">20th September 2006</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience</td>
|
||||
<td style="vertical-align: top;">Site Administrators</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to</td>
|
||||
<td style="vertical-align: top;">Contenido 4.8.4 or later</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
Frontend customizing is a mechanism to customize various parameters of
|
||||
the frontend. There are not many settings you can do, as this mechanism
|
||||
is relatively new. However, this mechanism will be used more and more
|
||||
in the future.<br>
|
||||
<br>
|
||||
<h2>How it works</h2>
|
||||
Customizing Contenido settings is very easy and can be done via the
|
||||
system or client customizing settings.<br>
|
||||
<br>
|
||||
Important: User settings have precendence before group settings. User
|
||||
settings always override group settings. If the user is added to more
|
||||
than one group, the result is undefined. Make sure that your groups
|
||||
don't override each other.<br>
|
||||
<br>
|
||||
<h2><span style="font-weight: bold;">Common parameters</span></h2>
|
||||
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; font-weight: bold;">Area/Type</td>
|
||||
<td style="vertical-align: top; font-weight: bold;">Property</td>
|
||||
<td style="vertical-align: top; font-weight: bold;">Value (Description)</td>
|
||||
<td style="vertical-align: top; font-weight: bold; width: 185px;">Applies to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">login_error_page</td>
|
||||
<td style="vertical-align: top;">idcatart</td>
|
||||
<td style="vertical-align: top;">If specified, then a user who is logged out or tries to open a protected
|
||||
category if not logged in will get redirected to the page specified by idcatart. This setting overrides other
|
||||
login_error_page settings.</td>
|
||||
<td style="vertical-align: top;">Clients, System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">login_error_page</td>
|
||||
<td style="vertical-align: top;">idcat</td>
|
||||
<td style="vertical-align: top;">If specified, then a user who is logged out or tries to open a protected
|
||||
category if not logged in will get redirected to the category specified by idcat. You can specify idcat
|
||||
and/or idart (see next setting).</td>
|
||||
<td style="vertical-align: top;">Clients, System</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">login_error_page</td>
|
||||
<td style="vertical-align: top;">idart</td>
|
||||
<td style="vertical-align: top;">If specified, then a user who is logged out or tries to open a protected
|
||||
category if not logged in will get redirected to the article specified by idart. You can specify idcat
|
||||
and/or idart (see previous setting).</td>
|
||||
<td style="vertical-align: top;">System, Clients</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,118 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1"
|
||||
http-equiv="content-type">
|
||||
<title>Contenido - Frontend Session Information</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body alink="#000099" vlink="#990099" link="#000099"
|
||||
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
|
||||
<table
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;"
|
||||
border="0" cellspacing="2" cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img
|
||||
style="width: 190px; height: 112px; padding-right: 20px;" align="left"
|
||||
alt="Contenido" src="conlogo.gif">
|
||||
<h1>Frontend Permissions<br>
|
||||
</h1>
|
||||
<table style="text-align: left;" border="0" cellspacing="2"
|
||||
cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">20th May 2005</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Site Integrators, Module Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.6 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
Using Contenido's Frontend Permissions, Site Integrators and Module Developers
|
||||
can check individual "objects" for access permissions.<br>
|
||||
<h2>Concept</h2>
|
||||
|
||||
<p>Contenido 4.6 introduces so-called frontend users. These users are splitted
|
||||
apart the regular backend users, because they should be seen and handled completely
|
||||
different as backend users. Frontend users themselves can't have permissions,
|
||||
all permissions are assigned to groups.</p>
|
||||
<h2>Defining objects and permissions</h2>
|
||||
<p>Frontend objects and permissions are designed to be very generic. Basically,
|
||||
the developer has to define:</p>
|
||||
<p>- A class which defines how the object works<br>
|
||||
- Checks to make the permissions effective<br>
|
||||
<br>
|
||||
Step by Step manual:</p>
|
||||
<p>1. Think of a name for the object you're going to use. The name should be
|
||||
lowercase. In this example, we're going to use "object".<br>
|
||||
2. If the folder "frontendlogic" in the plugins directory doesn't exist, create
|
||||
it<br>
|
||||
3. Create a folder with the object name you're going to use in the folder "frontendlogic"<br>
|
||||
4. Create a file with the objectname and ".php" as extension. In our example,
|
||||
you would have the path "plugins/frontendlogic/object/object.php".<br>
|
||||
5. Extend the class FrontendLogic. Your class name must have the name "frontendlogic_"
|
||||
plus your object name, in our example it would be "frontendlogic_object".<br>
|
||||
6. Override the methods getFriendlyName(), listActions() and listItems().
|
||||
You can find descriptions for these methods in the FrontendLogic phpDoc.<br>
|
||||
7. Define the object name in the variable $cfg['plugins']['frontendlogic'], e.g.
|
||||
$cfg['plugins']['frontendlogic'][] = "object". You should place this in the file
|
||||
config.local.php, so your changes are preserved during updates.</p>
|
||||
<p>Test your object:</p>
|
||||
<p>Login into Contenido. Go to the frontend groups, create a new group (or edit
|
||||
an existing). In the subnavigation beneath "Overview", you should see your
|
||||
object name which you defined in the method "getFriendlyName()". Click on it.
|
||||
In the list, you should see all actions you defined, and all items you return.
|
||||
Your administrators can now start to apply permissions to the items.</p>
|
||||
<p>Checking permissions:</p>
|
||||
<p>This is actually pretty easy. Create a new FrontendPermissionCollection-Item
|
||||
and use the method checkPerm() to query if a specific permission is set:</p>
|
||||
<p>$myPermissionCheck = new FrontendPermissionCollection;<br>
|
||||
var_dump(
|
||||
$myPermissionCheck->checkPerm(2, "object", "permissionname", "itemid"));</p>
|
||||
<p>If you want to check for a global right, replace "itemid" with "__GLOBAL__".</p>
|
||||
<h2> </h2>
|
||||
</body>
|
||||
</html>
|
|
@ -1,104 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1"
|
||||
http-equiv="content-type">
|
||||
<title>Contenido - Frontend Session Information</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body alink="#000099" vlink="#990099" link="#000099"
|
||||
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
|
||||
<table
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;"
|
||||
border="0" cellspacing="2" cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img
|
||||
style="width: 190px; height: 112px; padding-right: 20px;" align="left"
|
||||
alt="Contenido" src="conlogo.gif">
|
||||
<h1>Protected frontend categories<br>
|
||||
</h1>
|
||||
<table style="text-align: left;" border="0" cellspacing="2"
|
||||
cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">20th May 2005</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Site Integrators, Module Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.6 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
Contenido 4.6 introduces a updated concept for protecting frontend categories
|
||||
and enabling access to them.<br>
|
||||
<h2>Installation and configuration</h2>
|
||||
<p>Download the plugin "Frontend Category Permissions" from the Contenido website.
|
||||
Extract the archive to your plugins directory. Open (or create) the file config.plugin.php in the directory contenido/plugins/chains/includes/
|
||||
and add the necessary includes and chain entries (see below). Afterwards, open
|
||||
the file config.local.php in your contenido/includes directory (create the
|
||||
file
|
||||
if it
|
||||
doesn't exist) and add the following line at the end:</p>
|
||||
<p><font face="Courier New, Courier, mono">$cfg['plugins']['frontendlogic'][]
|
||||
= "category";</font></p>
|
||||
<p>Example config.plugin.php:</p>
|
||||
<p><font face="Courier New, Courier, mono"><?php<br>
|
||||
global $_cecRegistry;<br>
|
||||
cInclude("plugins", "chains/includes/include.chain.frontend.cat_backendaccess.php");<br>
|
||||
cInclude("plugins", "chains/includes/include.chain.frontend.cat_access.php");</font></p>
|
||||
<p><font face="Courier New, Courier, mono">$_cecRegistry->addChainFunction("Contenido.Frontend.CategoryAccess", "cecFrontendCategoryAccess");<br>
|
||||
$_cecRegistry->addChainFunction("Contenido.Frontend.CategoryAccess", "cecFrontendCategoryAccess_Backend");<br>
|
||||
?></font></p>
|
||||
<p>The chain <font face="Courier New, Courier, mono">Contenido.Frontend.CategoryAccess</font> is
|
||||
called everytime a protected category is accessed. If the chain functions return
|
||||
true, access is granted. The function <font face="Courier New, Courier, mono">cecFrontendCategoryAccess</font> validates
|
||||
frontend users and their permissions, and <font face="Courier New, Courier, mono">cecFrontendCategoryAccess_Backend</font> does
|
||||
the same for the backend user counterparts. If you wish to disable backend
|
||||
users for access frontend categories, remove the line which contains <font face="Courier New, Courier, mono">cecFrontendCategoryAccess_Backend</font>.
|
||||
You can also define chains for more custom checks, please refer to the chains
|
||||
documentation for more information.</p>
|
||||
<h2> </h2>
|
||||
</body>
|
||||
</html>
|
|
@ -1,118 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1"
|
||||
http-equiv="content-type">
|
||||
<title>Contenido - Frontend Session Information</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body alink="#000099" vlink="#990099" link="#000099"
|
||||
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
|
||||
<table
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;"
|
||||
border="0" cellspacing="2" cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img
|
||||
style="width: 190px; height: 112px; padding-right: 20px;" align="left"
|
||||
alt="Contenido" src="conlogo.gif">
|
||||
<h1>Frontend Session Information<br>
|
||||
</h1>
|
||||
<table style="text-align: left;" border="0" cellspacing="2"
|
||||
cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">20th October 2003</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Module Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.4 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
In order to identify a website visitor, the default Contenido Frontend
|
||||
delivers a session mechanism.<br>
|
||||
<h2>Concept</h2>
|
||||
The frontend automatically stores a cookie including the session ID. As
|
||||
the contenido frontend is based on the PHPLIB session management, the
|
||||
session ID can always be retrieved by calling $sess->id as long as
|
||||
the $sess object is made global.<br>
|
||||
<h2>Why Cookies?</h2>
|
||||
This has several reasons. The most important ones are:<br>
|
||||
<br>
|
||||
- Module developers don't need to care about session ID's, as this is
|
||||
managed transparently by the system.<br>
|
||||
- There's no need to re-process links that were inserted using the
|
||||
WYSIWYG.<br>
|
||||
- Users tend to copy'n'paste interesting web sites from the location
|
||||
bar. As this usually includes the session, we would no longer be able
|
||||
to identify a visitor uniquely.<br>
|
||||
<br>
|
||||
Drawbacks:<br>
|
||||
<br>
|
||||
- Some browsers and/or visitors don't like cookies. That makes it
|
||||
impossible for us to identify them. However, this is only the minority,
|
||||
and I guess we can expect that a visitor has cookies turned on in these
|
||||
days, since almost no web application (like shop systems, bulletin
|
||||
boards etc) will work without cookies.<br>
|
||||
<br>
|
||||
Also note that the site will still be browsable - you just can't use
|
||||
the session to store data for the frontend.<br>
|
||||
<br>
|
||||
<h2>Is there some way around cookies?</h2>
|
||||
Yes, you can modify the file "local.php" in the conlib directory. Look
|
||||
for the class "Contenido_Frontend_Session" (currently on line 137, but
|
||||
this might change or has already been changed):<br>
|
||||
<br>
|
||||
<pre>class Contenido_Frontend_Session extends Session {<br> var $classname = "Contenido_Frontend_Session";<br> var $cookiename = "sid"; ## defaults to classname<br> var $magic = "Phillipip"; ## ID seed<br> var $mode = "cookie"; ## We propagate session IDs with cookies<br> var $fallback_mode = "cookie";<br> var $lifetime = 0; ## 0 = do session cookies, else minutes<br> var $that_class = "Contenido_CT_Sql"; ## name of data storage container<br> var $gc_probability = 5; <br></pre>
|
||||
<pre> function Contenido_Frontend_Session ()<br> {<br> global $load_lang, $load_client;<br> $this->cookiename = "sid_".$load_client."_".$load_lang;<br> }<br>}<br><br><br></pre>
|
||||
The important variables are "$mode" and "$fallback_mode". Both of these
|
||||
can either be "get" or "cookie". Remember that if you set "get", you
|
||||
have to rewrite most of your modules (in fact, each module which
|
||||
generates or display links). <br>
|
||||
<br>
|
||||
Remember: Using "get" as frontend session mode is neither supported nor
|
||||
recommended - use it on your own risk.<br>
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 5.2 KiB |
|
@ -1,148 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1"
|
||||
http-equiv="content-type">
|
||||
<title>Contenido - Creating login modules</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body alink="#000099" vlink="#990099" link="#000099"
|
||||
style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
|
||||
<table
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;"
|
||||
border="0" cellspacing="2" cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img
|
||||
style="width: 190px; height: 112px; padding-right: 20px;" align="left"
|
||||
alt="Contenido" src="conlogo.gif">
|
||||
<h1>Creating a frontend login module using Contenido</h1>
|
||||
<table style="text-align: left;" border="0" cellspacing="2"
|
||||
cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Modified</td>
|
||||
<td style="vertical-align: top;">13th June 2006</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Module Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.6 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
The Contenido login mechanism has been made alot easier from Version
|
||||
4.4 and upwards. Logins are now directly handled by Contenido's
|
||||
frontend, and you only need to pass the parameters "username" and
|
||||
"password" to Contenido. Logins are now handled as "pro-active" logins,
|
||||
which means that the methods explained here need to issued before a
|
||||
protected category is accessed.<br>
|
||||
<h2>Logging in - manually</h2>
|
||||
Each frontend login can be triggered manually. In order to test your
|
||||
logins, you should insert the following statement into either a layout
|
||||
or module:<br>
|
||||
<br>
|
||||
<pre>echo $auth->auth["uid"];</pre>
|
||||
This statement shows the current logged in user. For anonymous sessions
|
||||
(i.e. nobody is logged in), the "uid" is always "nobody". To test the
|
||||
login, create a new user in Contenido's Backend, then call the frontend
|
||||
like this:<br>
|
||||
<br>
|
||||
<pre>front_content.php?username=<youruser>&password=<yourpassword></pre>
|
||||
If previously the test statement returned "nobody", it should now
|
||||
display your user id.<br>
|
||||
<br>
|
||||
<h2>Logging in - automatically</h2>
|
||||
Of course, the method above is pretty uncomfortable for end users. You
|
||||
could simply write a module which outputs a login form - it's up to
|
||||
you. All you need to do is to pass "username" and "password" - exactly
|
||||
as shown above.<br>
|
||||
<br>
|
||||
<h2>Logging out</h2>
|
||||
Of course, your users want to log out if necessary - just pass the
|
||||
parameter "logout" with any value to the system. Example:<br>
|
||||
<pre>front_content.php?logout=true</pre><br>
|
||||
<h2>How all this interacts with protected folders</h2>
|
||||
In the past, a login form was only displayed if a protected category.
|
||||
If you are already logged in with the above method, and if you have
|
||||
access rights to that category, everything is alright. But if you are
|
||||
not logged in or if you don't have access rights, the (pretty old) file
|
||||
"front_crcloginform.inc.php" will be called.<br>
|
||||
<br>
|
||||
If you want to show a custom login form, you can do the following:<br>
|
||||
<br>
|
||||
Specify a client setting with the following values:<br>
|
||||
<pre style="margin-left: 40px;">
|
||||
Type: login_error_page
|
||||
Name: idcatart
|
||||
Value: <Specify the idcatart of the article containing the login form></pre>
|
||||
<br>
|
||||
You can also use:<br>
|
||||
<pre style="margin-left: 40px;">
|
||||
Type: login_error_page
|
||||
Name: idcat
|
||||
Value: <Specify the idcat of the category containing the article with the login form></pre>
|
||||
<br>
|
||||
and/or
|
||||
<pre style="margin-left: 40px;">
|
||||
Type: login_error_page
|
||||
Name: idart
|
||||
Value: <Specify the idart of the article containing the login form></pre>
|
||||
<br>
|
||||
Please note, that if the idcatart has been specified, idcat and idart are ignored. idcat and idart may be
|
||||
specified both (and then the idart should be an article in the category specified by idcat) or
|
||||
one of them, only.<br>
|
||||
<br>
|
||||
The article/category specified has to be public/online.
|
||||
<br>
|
||||
<br>
|
||||
<h2>Creating users</h2>
|
||||
Of course, you don't want to create a user in the backend every time.
|
||||
You can automate the user creation process using the class "User":<br>
|
||||
<br>
|
||||
<pre style="margin-left: 40px;">$myUsers = new Users; // User Collection<br>$myUser = new User; // Single user<br><br>$ret = $myUsers->create("nameofuser");<br><br>/* Note the three equal signs: This checks for the boolean type */<br>if ($ret === false)<br>{<br> /* User already exists */<br> die("User already exists");<br>} else {<br> /* User was successfully created, now we can set the password */<br> $user->loadUserByUserID($ret);<br> $user->setField("password", md5("theuserspassword"));<br>}</pre>
|
||||
<br>
|
||||
You can also assign custom properties to your users (to attach almost
|
||||
every kind of data to a user) by using the methods "setUserProperty"
|
||||
and "getUserProperty". See the API documentation for more information.
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 14 KiB |
|
@ -1,172 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
<title>Contenido - Writing modules for use with Contenido</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
|
||||
link="#000099" vlink="#990099" alink="#000099">
|
||||
<table cellpadding="2" cellspacing="2" border="0"
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img src="conlogo.gif"
|
||||
alt="Contenido" align="left"
|
||||
style="width: 190px; height: 112px; padding-right: 20px;">
|
||||
<h1>Writing modules for use with Contenido<br>
|
||||
</h1>
|
||||
<table cellpadding="2" cellspacing="2" border="0"
|
||||
style="text-align: left;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">3rd November 2003</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Module Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.4 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>Introduction</h2>
|
||||
Writing modules with Contenido is as easy as writing regular PHP code.
|
||||
You don't get a stripped-down development environment, but rather you
|
||||
get a combination of Contenido's CMS features combined with your own
|
||||
code.<br>
|
||||
<br>
|
||||
<h2>What's input, what's output, what's a module anyways?<br>
|
||||
</h2>
|
||||
A module is nothing more than a piece of code which gets combined using
|
||||
a template:<br>
|
||||
<br>
|
||||
<img src="output-gen.jpg" alt="" style="width: 427px; height: 176px;"><br>
|
||||
<br>
|
||||
As you already know, a layout contains placeholders for modules. The
|
||||
PHP-Code from the module's output sections are inserted into the
|
||||
correct positions in the layout. The input section is not relevant for
|
||||
the output, but the input section is relevant for configuring the
|
||||
modules.<br>
|
||||
<br>
|
||||
<h2>Configuration magic</h2>
|
||||
To make modules more "modular", you can configure them. You might have
|
||||
seen this in the predefined modules - but how does it work?<br>
|
||||
<br>
|
||||
The configuration data is stored transparently, so you don't need to
|
||||
worry to get your configuration data from the input section to the
|
||||
output section. Storing configuration data is pretty easy. Take a look
|
||||
at this simple example of an input section:<br>
|
||||
<br>
|
||||
<pre style="border-style: solid; border-width: 1px;">echo " <table><br> <tr><br> <td>Test</td><br> <td><input type=\"text\" name=\"CMS_VAR[1]\" value=\"CMS_VALUE[1]\"></td><br> </tr><br> </table>";<span
|
||||
style="font-family: sans-serif;"><br></span></pre>
|
||||
CMS_VAR[x] is the variable (which is set using "magic" :)) to "receive"
|
||||
the desired value, and CMS_VALUE[x] is the current value. The same
|
||||
story goes for the output area:<br>
|
||||
<pre style="border-style: solid; border-width: 1px;">echo "CMS_VALUE[1]";<span
|
||||
style="font-family: sans-serif;"><br></span></pre>
|
||||
To avoid problems, you should always take care of the following things:<br>
|
||||
<ul>
|
||||
<li>Always store your configuration into local variables (e.g. $foo =
|
||||
"CMS_VALUE[1]";)</li>
|
||||
<li>Always use quotes around CMS_VALUE, as CMS_VALUE is text.</li>
|
||||
<li>PHP allows transparent type switching, so the following code will
|
||||
also work:<br>
|
||||
<pre>$foo = "CMS_VALUE[1]";<br><br> if ($foo == 1)<br>{<br> echo "Worked";<br>}</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Important System stuff</h2>
|
||||
If you want to write advanced modules, you might want to interact with
|
||||
Contenido. Here are a few objects and functions you can use with your
|
||||
modules.<br>
|
||||
<br>
|
||||
<table style="text-align: left; width: 100%;" border="1" cellspacing="2"
|
||||
cellpadding="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">DB_Contenido<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">The well-known PHPLib DB-Object.
|
||||
<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
<br>
|
||||
$mydb = new DB_Contenido;<br>
|
||||
$mydb->query("SELECT * FROM test");<br>
|
||||
<br>
|
||||
Reference:<br>
|
||||
See
|
||||
http://www.sanisoft.com/phplib/manual/DB_SqlMethods.php#DB_SqlMethodsInt<br>
|
||||
<br>
|
||||
You should always use $cfg["tab"][*] to access Contenido tables.<br>
|
||||
<br>
|
||||
Warning: You should never ever use $db in your modules. Always use your
|
||||
own variables.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">$sess<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">The current session. Useful
|
||||
variables:<br>
|
||||
<br>
|
||||
$sess->id (current session ID)<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">$auth<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Authentification information.
|
||||
Useful variables:<br>
|
||||
<br>
|
||||
$auth->auth["uid"] (current user ID)<br>
|
||||
$auth->auth["uname"] (current user name)<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Binäre Datei nicht angezeigt.
Vorher Breite: | Höhe: | Größe: 5.2 KiB |
|
@ -1,119 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=ISO-8859-1">
|
||||
<title>Contenido - Making plugins translatable</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
scrollbar-face-color:#C6C6D5;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color:#747488;
|
||||
scrollbar-darkshadow-color:#000000;
|
||||
scrollbar-shadow-color:#334F77;
|
||||
scrollbar-arrow-color:#334F77;
|
||||
scrollbar-track-color:#C7C7D6;
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 11px; color: #000000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 20px; color: #000000;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 15px; color: #000000;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
|
||||
link="#000099" vlink="#990099" alink="#000099">
|
||||
<table cellpadding="2" cellspacing="2" border="0"
|
||||
style="border-bottom: 1px solid; text-align: left; background-color: rgb(255, 255, 255); width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><img src="conlogo.gif"
|
||||
alt="Contenido" align="left"
|
||||
style="width: 190px; height: 112px; padding-right: 20px;">
|
||||
<h1>Making plugins translatable<br>
|
||||
</h1>
|
||||
<table cellpadding="2" cellspacing="2" border="0"
|
||||
style="text-align: left;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Author</td>
|
||||
<td style="vertical-align: top;">Timo A. Hummel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Created</td>
|
||||
<td style="vertical-align: top;">5th November 2003</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Audience<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Plugin Developers<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Applies to<br>
|
||||
</td>
|
||||
<td style="vertical-align: top;">Contenido 4.4 or later<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>The plugin's configuration<br>
|
||||
</h2>
|
||||
If your plugin has actions which needs to be translatable (of course
|
||||
:)), you need a plugin configuration file.<br>
|
||||
<br>
|
||||
This file<span style="font-weight: bold;"> needs </span>to be placed
|
||||
in the "includes"-Directory of your plugin and needs to be named <span
|
||||
style="font-weight: bold;">config.plugin.php</span>.<br>
|
||||
<br>
|
||||
Example:<br>
|
||||
<br>
|
||||
<?php<br>
|
||||
<br>
|
||||
/* Config file for the TEST plugin */<br>
|
||||
$lngAct["test_dosomething"] = i18n("Does something useful", "test");<br>
|
||||
<br>
|
||||
?><br>
|
||||
<br>
|
||||
Note that the plugin developer doesn't need to take care of the i18n
|
||||
domain binding; all that is done during initialisation.<br>
|
||||
<br>
|
||||
<h2>Letting Contenido know about foreign "domains"<br>
|
||||
</h2>
|
||||
A "domain" in terms of the GNU gettext library defines in which path a
|
||||
specific translation can be found. For plugins, the domain is
|
||||
automatically set to the plugin's directory. All you need to do is to
|
||||
create a directory structure similar to Contenido's locale directory,
|
||||
and place .po files in it (note: The .po-Files need to be named like
|
||||
your plugin's name and plugin directory, e.g. the plugin "test" should
|
||||
reside in the directory "test" and the .po-Files have to be named
|
||||
"test.po").<br>
|
||||
<h2>Translating plugins<br>
|
||||
</h2>
|
||||
To create a translated string in the plugin itself, you need to use <span
|
||||
style="font-weight: bold;">i18n("TEXT","<DOMAIN>");</span>. In
|
||||
the example above, we would write <span style="font-weight: bold;">i18n("TEXT","test");.
|
||||
</span>Note that domain names are case sensitive.
|
||||
<h2>Where's the magic?<br>
|
||||
</h2>
|
||||
Originally, the "magic" (including the plugin's configuration and i18n
|
||||
domain bindings) took place in the file config.php. As config.php is
|
||||
included even if we don't have a backend language (in fact, the
|
||||
information about the backend language is never available in the config
|
||||
file), the magic happens in cfg_language_de.inc.php. This is the only
|
||||
place where the proper initialisation of the plugin's config.plugin.php
|
||||
file can be guaranteed.<br>
|
||||
</body>
|
||||
</html>
|
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren