<?php

/* order by */
$order = Array();
$order[] = Array("a.title", Lang::getLanguageString("title"));
$order[] = Array("b.name", Lang::getLanguageString("category"));

/* direction */
$dir = Array();
$dir[] = Array("ASC", Lang::getLanguageString("todo_order_asc")); 
$dir[] = Array("DESC", Lang::getLanguageString("todo_order_desc")); 

/* settings array */
$settings["notes"] = array(
	"gensettings" => array(
        "notes_enable_comments" => array(
        	"method" => "radio",
            "choices" => array(
            	array("name" => "yes", "value" => "1"), 
                array("name" => "no", "value" => "0")),
            "name" => "notes_enable_comments",
		    "description" => "allow comments on notes",
            "type" => "int",
		    "default" => "1"
		),
	"admin" => true
	),
	"settings" => array(
    	"notes_orderby" => array(
        	"method" => "select",
            "choices" => array( 
            	array("name"=>"","value"=>$order)), 
            "name" => "notes_order_title", 
		    "description" => "default order of notes",
            "type" => "str",
		    "default" => ""
        ),
        "notes_order_dir" => array(
        	"method" => "select",
            "choices" => array( 
            	array("name"=>"","value"=>$dir)),
		    "description" => "order asc or desc",
            "type" => "str",
		    "default" => ""
        ),
        "overview_notes" => array(
		  "method" => "text",
		  "width" => "30",
		  "description" => "numer of notes to show in overview",
          "type" => "int",
		  "default" => "5"
        )
)
);

if (is_array($settings["notes"])) foreach ($settings["notes"] as $my_module_settings) {
  if (is_array($my_module_settings)) foreach ($my_module_settings as $key=>$key2) {
    if (!isset($_SESSION["MGW"]->settings[$key]) and isset($key2["default"])) {
	  $_SESSION["MGW"]->settings[$key] = $key2["default"];
	}
  }
}


?>
