![]() |
|
Site configuration
These are reasonable default values, you may not need to change them to experiment daCode
aboutlogo
Character string. Informations about the logo. Do it short. It will be displayed below the logo on all pages.
minilogo
Character string. Name of the tiny logo/banner to use in the PDA version. JPG only. This is used for the PDA version and for the Mozilla Sidebar.
defaultlang
echsrt. Default language ID. Two languages are actually available:
-
en: English (the default);
-
fr: French.
visiblenewsfile
Boolean. Controls whether script name must appear in URLs. Set it to 0 if you don't want the script name to appear in the URL.
restricted_registration
Character string. Determine whether anyone may create an account or only the admin. Leave it empty to allow anybody to open an account.
valid_tags
Array of character strings. List of valid HTML tags in comments. The aim is to forbid any possibility of DHTML. Below is an exemple:
$this->valid_tags = array ( 'b','i','s','u', 'em','tt','strong','blockquote', 'ol','ul','li', 'p' ); |
valid_tags_board
Array of character strings. List of valid HTML tags in board. Same decalration as valid_tags.
no_access_msg
Character string. Message displayed if a user tries to access a page without authorization (mostly people trying to access administration pages without being admin). Use \n for newlines.
supp_fields
List of supplementary fields you want for users informations except the basic ones. For each field, following values must be assigned:
-
length: width and height (optional) in lines, as a comma separated list;
-
max_length: maximal width;
-
type: input type ('text' or 'textarea') -- FIXME hmmm, not sure, see supp_fields_types below;
-
public:
-
1: data are visible to anyone;
-
0: only authenticated users can view them.
-
$this->supp_fields = array ( 'photo' => array( 'length' => '30', 'max_length' => '255', 'type' => 'url', 'public' => '1' ), 'icq' => array( 'length' => '9', 'max_length' => '10', 'type' => 'icq', 'public' => '1' ), 'pgp' => array( 'length' => '8', 'max_length' => '8', 'type' => 'pgp', 'public' => '1' ) ); |
supp_fields_types
Here you define the types used for the supplementary fields above. For each, you have a method value, which is associated to the usage of the type on users pages. Exemple follows.
$this->supp_fields_types = array( 'text' => array( 'method' => 'htmlentities($val);' ), 'textarea' => array( 'method' => 'htmlentities($val);' ), 'url' => array( 'method' => '"".'. 'htmlentities($val)."";' ), 'icq' => array( 'method' => '""'. '.htmlentities($val)."";' ), 'pgp' => array( 'method' => '""'. '.htmlentities($val)."";' ) ); |
user_boxes
Hash of hashes. List of user boxes. These are the boxes you allow them to choose in their preferences. They all have to be un backends class ! (for security reasons). Exemple follows.
Format:
'name' => array with array being (not every parameter is used by every box): 'function' => string: the function to use, 'info' => string: general information, 'force' => 1 or 0: if 1, forces the box to be displayed, 'url' => string: the URL of the site where the news come from. |
$this->user_boxes = array ( //Internal values (modules from daCode) //These are only a selection from the variety of //modules and internal boxes available. 'loginbox'=>array( 'function' => '$user->loginbox()', 'info' => 'Login Box', 'force' => '1' ), 'edito'=>array( 'function' => '$sidebox->edito()', 'info' => 'Edito' ), 'board'=>array( 'function' => '$board->print_message()', 'info' => 'Board' ), 'calendar'=>array( 'function' => '$cal->calbox($pageday, $pagemonth, $pageyear)', 'info' => 'Calendar' ), 'tips'=>array( 'function' => '$tips->get_random()', 'info' => 'Tips' ), 'archive'=>array( 'function' => '$news->show_archive(10,$section,$topic,1,1)', 'info' => 'Archive' ), 'admin'=>array( 'function' => '$admin->adminbox()', 'info' => 'Admin' ), //External values (backends). These functions connect to other //servers to grab the laterst headlines, usually. 'kernel'=>array( 'function' => '$backends->kernel()', 'info' => 'Kernel', 'url' => 'http://www.kernel.org/' ), 'rfc'=>array( 'function' => '$backends->rfc()', 'info' => 'RFCs' ), ); |
- loginbox
-
The login form, or your personnal infos. Parameters:
-
function: $user->loginbox()
-
info: any string...
-
force: '1' Shall be set a 1, because you always want to have a login box on front page!
-
- messages
-
The "Personal messages" box. Parameters:
-
function: $message->show_new_title()
-
info: any string...
-
force: '1'. Shall be set a 1, because you always want to have a message box on frant page (if you use the module, of course!).
-
- edito
-
The edito box. This is free space for the webmaster. The text is defined by the configuration parameter edito. See the edito parameter above. Parameters :
-
function: $sidebox->edito()
-
info: any string...
-
- board
-
The board box. A simple chat system, available as sidebox. But beware, a group of malevolent molluscs and palmipedes invades any daCode board it can find . Parameters:
-
function: $board->print_message()
-
info: any string...
-
- calendar
-
The calendar. Allows your users to view the news of day they selected on little calendar. Only available in sidebox. Parameters:
-
function: $cal->calbox($pageday, $pagemonth, $pageyear))
-
info: any string...
-
- webcam
-
The webcam box. Allows you to add an image to the main page. This box displays a random image. Parameters:
-
function: $webcam->get_random()
-
info: any string...
-
- tips
-
The tip box. Displays a random tip on the front page. Parameters:
-
function: $tips->get_random()
-
info: any string...
-
- archive
-
-
function: $news->show_archive(10,$section,$topic,1,1,-1)
-
info: any string...
-
- others
-
Box which holds the news left out of the front page. Parameters:
-
function: $news->show_archive(10,"","",1,2,0,"Others")
-
info: any string...
-
- admin
-
The admin box. You want it if you're a moderator, as this box is the only way to access the administration features.
-
function: $admin->adminbox()
-
info: any string...
-
- poll
-
The poll box. Displays the question and muliple choice for the current poll. Parameters:
-
function: $poll->show_poll()
-
info: any string...
-
default_user_boxes
List. List of userboxes displayed by default. This is a list of the names of the user boxes, or PHP-wise, a list of keys from the user_boxes array. Exemple follows.
$this->default_user_boxes = array ('edito', 'loginbox', 'admin', 'archive', 'tips', 'agenda', 'kernel' ); |
cachedir
Character string. Directory where HTML fragments (i.e. boxes) are cached. Don't forget the trailing slash !! An empty string means no caching.
htmldir
Character string. htdocs/ subdirectory where generated HTML files are stored. An empty string means no caching.
mark_outdated
Boolean. Mark outdated cached files instead of deleting them if set to 1. Be aware that it may cause problems with the board.
fortunefile
Character string. Fortune file, if any. An empty string means no fortunes. Fortunes have to be separated by a "%" and an Unix new line ("\n"). Pay attention not to use Windows new lines ("\r\n") or Mac ("\r")!
create_tar_dir
Character string. Directory where generated tarfiles are put. This is used to archive themes. /tmp/ is usually a good choice.
upload_tar_dir
Character string. Directory where uploaded tarfiles are put to be extracted. /tmp/ is usually a good choice.
theme_subdir
Character string. When uploaded themes can be installed, it may be advisable to put them under a specific subdirectory which is writable by PHP. For exemple, if one writes $this->theme_subdir = "contrib/";, all uploaded themes will be put in phplib/themes/contrib.
debug
Character string. The debug mode:
-
"none" for no debuging;
-
"stdout" for debuging on the standard output;
-
"file" for debuging into a file ,see debugFile below;
-
"socket" for debugging on a socket, see debugFile below.