""
Documentation daCode : daCode webmaster's guide
Chapitre 3. Configuration reference

 

Expert site configuration

These values may be edited, but be careful with it.

 

moderation_type

Integer. This is the moderation system. 1 is default, use 2 only if you know what you are doing !

  • 1: normal system;

  • 2: automatic system.



 

experience_limit

Integer. This is the lowest limit of experience for a user to be able to post a comment. If he has a lower karma than this one, he won't be allowed to post any comments anywhere. Default value is 0, new user gets 0 as karma. So new user will be able to post, but as soon as they have a negative karma, they won't anymore. Prevent from stupid people which create an account, post a stupid thing. They'll be banned soon after than.

 

level_values

List of hashes. This is the levels for moderation system number 2. Don't change unless you know what you are doing ! The default follows as exemple.


    $this->level_values = array(
      array('name'=>'initiate',   'xp'=>'0',    'vote'=>'0'),
      array('name'=>'novice',     'xp'=>'20',   'vote'=>'5'),
      array('name'=>'acolyte',    'xp'=>'50',   'vote'=>'8'),
      array('name'=>'scribe',     'xp'=>'100',  'vote'=>'12'),
      array('name'=>'monk',       'xp'=>'200',  'vote'=>'16'),
      array('name'=>'friar',      'xp'=>'500',  'vote'=>'20'),
      array('name'=>'abbot',      'xp'=>'1000', 'vote'=>'25'),
      array('name'=>'bishop',     'xp'=>'1600', 'vote'=>'30'),
      array('name'=>'pontiff',    'xp'=>'2300', 'vote'=>'35'),
      array('name'=>'saint',      'xp'=>'3000', 'vote'=>'40'),
      array('name'=>'god',        'xp'=>'5000', 'vote'=>'100')
      );
      
   


 

resources

Array of character strings. Association between a resource number and the class to handle it. If you install some module to be commented, don't forget to declare it here. Warning: the class name is case sensitive because of the LoadClass function! Always use the cannonical form, as given in the class declaration. Canonical value follows.


    $this->resources = array(
      1 => "News",
      2 => "Tips"
      );
      
   


 

overloads

Hash of character strings. Allows you to replace the class in the first column by the class in the second. This is widely used by extensions, and you may risk conflicts, so be careful with it!

Here is an exemple where we replace daCode's standard classes 'News' and 'Comments' by 'CustomNews' and 'ThisClassreplacesComments_orMaybeNot' :


    $this->overloads = array('News' => CustomNews,
      'Comments' => 'ThisClassreplacesComments_orMaybeNot'
      );
      
   


 

newstitledefault

Character string. The title of the news which do not have any.

 

newsbodydefault

Character string. The body of the news which do not have any.

 

newsdepartementdefault

Character string. the departement text, if not given.

 

numberoffiles

Integer. Default number of possible file attachement.

 

numberoflinks

Integer. Default number of possible links in the news.

 

backendfile

Character string. Name of your RDF/RSS backend file. It will be generated in the root of your website (not the root of your account), so don't add any "/" before the name of the file ! Default name is "backend.rss".

 

boardfile

Character string. Name of your XML board file. It will be generated in the board directory, so don't add any "/" before the name of the file ! Default name is "remote.xml".

 

sidebarfile

Character string. Name of your sidebar file. The sidebar can be used Mozilla, Netscape 6, or any browser based on Mozilla that supports this feature. It's always placed in the "sidebar/" directory, so don't add any "/" before the name of the file ! Default name is "sidebar.html".

 

encodingcharset

Character string. Charset encoding. Used in any file created. Default is iso-8859-15. Change it only if you need it, and if you know what you are doing.

 

nospider

FIXME Set to 1 if you want to activate the nospider function

 

numberofhits

Integer. Max number of hits / min we accept from the same host before denying him. Default is 100.

 

newsfile

Character string. Name of main index file in htdocs in case you moved it. If your server forbid use of PATH_INFO, i.e. urls like /gen.php3/foo/bar, then append a trailing question mark, this way: $this->newsfile = "gen.".$this->php."?"; Default is "gen.".$this->php;

 

dft_prefs

Hash of integers. Preferences when user is not authenticated. Exemple follows.


    $this->dft_prefs = array (
      "hide_sig" => 0,
      "score" => 1,
      "theme" => 0
      );
      
   


 

listofthemes

List of character strings. Here you have the list of themes used on your site. The first one is always the default one. Exemple follows.


    $this->listofthemes = array('linuxfr', 
      'slashdot', 
      'printable', 
      'wm',
      'lynx', 
      'daweb', 
      'kde2',
      'phpnukeopenmind',
      'nexen'
      );
      
   


 

default_results_step

Integer. Specify there the default number of results per page given by a research. Default is 25

 

default_search_interval

Integer. Number of months for archives search. Default is 3.

 

highload

FIXME Character string. The server load threshold above which daCode serves only static pages. Default is 5.

 

usersdefaultlevel

FIXME: $this->usersdefaultlevel = 0;

 

homepage_include

Boolean. If you want to include homepage (default), set the var to 1. If you want to redirect it (faster behind proxies), set it to 0. Default is 1.