Writing modules for use with Contenido
|
Author | Timo A. Hummel |
Created | 3rd November 2003 |
Audience |
Module Developers |
Applies to |
Contenido 4.4 or later |
echo " <table>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:
<tr>
<td>Test</td>
<td><input type=\"text\" name=\"CMS_VAR[1]\" value=\"CMS_VALUE[1]\"></td>
</tr>
</table>";
echo "CMS_VALUE[1]";
To avoid problems, you should always take care of the following things:$foo = "CMS_VALUE[1]";
if ($foo == 1)
{
echo "Worked";
}
DB_Contenido |
The well-known PHPLib DB-Object.
Example: $mydb = new DB_Contenido; $mydb->query("SELECT * FROM test"); Reference: See http://www.sanisoft.com/phplib/manual/DB_SqlMethods.php#DB_SqlMethodsInt You should always use $cfg["tab"][*] to access Contenido tables. Warning: You should never ever use $db in your modules. Always use your own variables. |
$sess |
The current session. Useful
variables: $sess->id (current session ID) |
$auth |
Authentification information.
Useful variables: $auth->auth["uid"] (current user ID) $auth->auth["uname"] (current user name) |