Location: PHPKode > projects > Knowledge Box > knowledgebox/require/constants.php
<?php

  /*
   * Free IT Foundation
   * Free Technology Serving Knowledge
   * http://www.free-it-foundation.org
   * 
   * This file is part of Knowledge Box.
   * 
   * Knowledge Box is free software: you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
   * 
   * Knowledge Box is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
   * 
   * You should have received a copy of the GNU General Public License
   * along with Knowledge Box.  If not, see <http://www.gnu.org/licenses/>.
   */


  // module
  define ('KB_MODULE', $m);
  define ('KB_MODULE_ICON', '../modules/admin/images/helix-setup-users.png');
  define ('KB_ACCESS_DENIED', 'm=public&a=access_denied');

  // database tables
  define ('KB_TABLES_PREFIX', 'kb_');
  define ('KB_TABLE_BASES', KB_TABLES_PREFIX . 'bases');
  define ('KB_TABLE_CONFIGS', KB_TABLES_PREFIX . 'configs');
  define ('KB_TABLE_ELEMENTS', KB_TABLES_PREFIX . 'elements');
  define ('KB_TABLE_ENTRIES', KB_TABLES_PREFIX . 'entries');
  define ('KB_TABLE_FIELDS', KB_TABLES_PREFIX . 'fields');
  define ('KB_TABLE_GROUPS', KB_TABLES_PREFIX . 'groups');
  define ('KB_TABLE_KEYWORDS', KB_TABLES_PREFIX . 'keywords');
  define ('KB_TABLE_LABELS', KB_TABLES_PREFIX . 'labels');
  define ('KB_TABLE_RELATIONS', KB_TABLES_PREFIX . 'relations');
  define ('KB_TABLE_RELATIVES', KB_TABLES_PREFIX . 'relatives');
  define ('KB_TABLE_SUBSTANCES', KB_TABLES_PREFIX . 'substances');
  
  // roles
  define ('KB_ROLE_ADMINISTRATOR', 'knowledgebox-administrator');
  define ('KB_ROLE_CONTRIBUTOR', 'knowledgebox-contributor');

  // bases
  define ('KB_BASE_UNDEFINED', 0);

  // tabs
  define ('KB_TAB_SEARCH', 0);
  define ('KB_TAB_KEYWORDS', 1);
  define ('KB_TAB_FIELDS', 2);
  define ('KB_TAB_ELEMENTS', 3);
  define ('KB_TAB_CONFIG', 4);

  // panes
  define ('KB_PANE_UNDEFINED', '');
  define ('KB_PANE_LABELS', 'labels');
  define ('KB_PANE_KEYWORDS', 'keywords');

  // fields
  define ('KB_FIELD_TEXT', 0);
  define ('KB_FIELD_HTML', 1);
  define ('KB_FIELD_FILE', 2);
  define ('KB_FIELD_IMAGE', 3);
  define ('KB_FIELD_LINK', 4);
  define ('KB_FIELD_EMAIL', 5);
  define ('KB_FIELD_DATE', 6);
  define ('KB_FIELD_PASSWORD', 7);
  define ('KB_FIELD_LABEL', 8);

  // elements
  define ('KB_ELEMENT_UNDEFINED', -1);
  define ('KB_ELEMENT_FIELD', 0);
  define ('KB_ELEMENT_ENTRY', 1);
  define ('KB_ELEMENT_KEYWORDS', 2);
  define ('KB_ELEMENT_AGGREGATION', 3);
  define ('KB_ELEMENT_RELATIONS', 4);
  define ('KB_ELEMENT_COLLECTION', 5);
  
  // stream
  define ('KB_STREAM_FILE', 'file');
  define ('KB_STREAM_IMAGE', 'image');

  // date formats
  define ('KB_DATE_FORMAT_1', 'dd.mm.yyyy');
  define ('KB_DATE_FORMAT_2', 'dd.mm.yy');
  define ('KB_DATE_FORMAT_3', 'd.m.yyyy');
  define ('KB_DATE_FORMAT_4', 'd.m.yy');
  define ('KB_DATE_FORMAT_5', 'mm.dd.yyyy');
  define ('KB_DATE_FORMAT_6', 'mm.dd.yy');
  define ('KB_DATE_FORMAT_7', 'm.d.yyyy');
  define ('KB_DATE_FORMAT_8', 'm.d.yy');
  define ('KB_DATE_FORMAT_9', 'yyyy.mm.dd');
  define ('KB_DATE_FORMAT_10', 'yy.mm.dd');
  define ('KB_DATE_FORMAT_11', 'yyyy.m.d');
  define ('KB_DATE_FORMAT_12', 'yy.m.d');
  
  // wysiwyg formats
  define ('KB_WYSIWYG_SIMPLE', 0);
  define ('KB_WYSIWYG_ADVANCED', 1);
  define ('KB_WYSIWYG_FULL', 2);

  // config properties by base
  define ('KB_CONFIG_PROPERTY_RESULTS', 1);
  define ('KB_CONFIG_PROPERTY_LASTENTRIES', 2);
  define ('KB_CONFIG_PROPERTY_DATEFORMAT', 3);
  define ('KB_CONFIG_PROPERTY_DATESEPARATOR', 4);
  define ('KB_CONFIG_PROPERTY_WYSIWYG', 5);
  
  // config properties global
  define ('KB_CONFIG_PROPERTY_AUTHENTICATION_USERNAME', -1);
  define ('KB_CONFIG_PROPERTY_AUTHENTICATION_PASSWORD', -2);
  define ('KB_CONFIG_PROPERTY_AUTHENTICATION_RECOVERY', -3);

  // config defaults
  define ('KB_CONFIG_DEFAULT_RESULTS', 25);
  define ('KB_CONFIG_DEFAULT_LASTENTRIES', 10);
  define ('KB_CONFIG_DEFAULT_DATEFORMAT', KB_DATE_FORMAT_1);
  define ('KB_CONFIG_DEFAULT_DATESEPARATOR', '-');
  define ('KB_CONFIG_DEFAULT_WYSIWYG', KB_WYSIWYG_SIMPLE);
  define ('KB_CONFIG_DEFAULT_AUTHENTICATION_UNDEFINED', 0);

  // sessions
  define ('KB_SESSION_BASE', 'knowledge_base_id');
  define ('KB_SESSION_TAB', 'knowledge_active_tab');
  define ('KB_SESSION_PANE', 'knowledge_active_pane');
  define ('KB_SESSION_GROUP', 'knowledge_active_group');
  define ('KB_SESSION_LABEL', 'knowledge_active_label');
  
  // session search
  define ('KB_SESSION_EXECUTE', 'knowledge_is_search');
  define ('KB_SEARCH_TEXT', 'knowledge_search_text');
  define ('KB_SEARCH_FIELD', 'knowledge_search_field');
  define ('KB_SEARCH_KEYWORDS', 'knowledge_search_keywords');
  define ('KB_SEARCH_SORT_FIELD', 'knowledge_search_sort_field');
  define ('KB_SEARCH_SORT_DIR', 'knowledge_search_sort_dir');
  define ('KB_SEARCH_INDEX', 'knowledge_search_index');

?>
Return current item: Knowledge Box