source: extensions/CommentEditor/include/ce_common.inc.php @ 3462

Last change on this file since 3462 was 3462, checked in by Criss, 15 years ago

Display edit block on picture page if request comes from this page
Add simple administration configuration management
Add and remove default configuration from databaseon plugin install / uninstall

File size: 1.8 KB
Line 
1<?php
2/* $Id: ce_common.inc.php,v 1.11 2009/06/26 09:49:27 Criss Exp $ */
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5// Define constants
6define('CE_INCLUDE_DIR',   'include/');
7define('CE_CLASSES_DIR',   'classes/');
8define('CE_IMAGES_DIR',    'images/');
9define('CE_TEMPLATE_DIR',  'template/');
10define('CE_ADMIN_DIR',     'admin/');
11
12define('CE_CLASSES',       CE_PATH.CE_CLASSES_DIR);
13define('CE_INCLUDE',       CE_PATH.CE_INCLUDE_DIR);
14define('CE_TEMPLATE',      CE_PATH.CE_TEMPLATE_DIR);
15define('CE_ADMIN',         CE_PATH.CE_ADMIN_DIR);
16define('CE_AMDIN_TPL',     CE_ROOT.CE_ADMIN_DIR.CE_TEMPLATE_DIR);
17
18define('CE_ERRORS',        CE_INCLUDE.'errors.png');
19define('CE_INFOS',         CE_INCLUDE.'infos.png');
20define('CE_TYPE_INFO',     'info');
21define('CE_TYPE_ERROR',    'error');
22define('CE_PAGE',          'page');
23define('CE_PARAMS',        'params');
24define('CE_ID',            'comment_id');
25define('CE_ACTION',        'comment_action');
26define('CE_ACTION_NONE',   'none');
27define('CE_ACTION_EDIT',   'edit_comment');
28define('CE_ACTION_UPDATE', 'update_comment');
29define('CE_ACTION_ERROR',  'error_comment');
30
31// Include plugin functions
32@include_once(CE_INCLUDE.'ce_functions.inc.php');
33
34// Load class files
35ce_require_class("CE_Config");
36ce_require_class("CE_Comment");
37ce_require_class("CE_Plugin");
38
39// Config keys
40if (isset($plugin)) {
41  define('CE_CFG_DB_KEY',     $plugin['id']);
42  define('CE_CFG_DB_COMMENT', 'Configuration of plugin ' . $plugin['id']);
43}
44define('CE_CFG_DISPLAY_ERROR',  'display_error');
45define('CE_CFG_DISPLAY_INFO',   'display_info');
46
47// Config default values
48$ce_config_default[CE_CFG_DISPLAY_ERROR]  = true;
49$ce_config_default[CE_CFG_DISPLAY_INFO]   = true;
50
51// Templates usage
52define('CE_CHECKED',  'checked="checked"')
53?>
Note: See TracBrowser for help on using the repository browser.