""
daCode documentation : daCode webmaster's guide
Chapter 3. Configuration reference

 

Site configuration

These are reasonable default values, you may not need to change them to experiment daCode

 

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. 
      
      
   
For exemple:

    $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'
      ),
      );
      
   
For the backends, see phplib/backends.php3 to find out which ones are available. Here is a short reference of the boxes and modules available as userboxes.
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...