当前位置: 首页>>代码示例>>PHP>>正文


PHP config::get_instance方法代码示例

本文整理汇总了PHP中config::get_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP config::get_instance方法的具体用法?PHP config::get_instance怎么用?PHP config::get_instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在config的用法示例。


在下文中一共展示了config::get_instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: staticpages_upgrade

function staticpages_upgrade()
{
    global $_TABLES, $_CONF, $_SP_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='staticpages'");
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    switch ($currentVersion) {
        case '1.5.0':
            $rc = update_150_to_151();
        case '1.5.1':
        case '1.5.2':
        case '1.5.3':
            DB_query("ALTER TABLE {$_TABLES['staticpage']} ADD sp_search tinyint(4) NOT NULL default '1' AFTER postmode", 1);
        case '1.5.4':
            DB_query("ALTER TABLE {$_TABLES['staticpage']} ADD sp_status tinyint(3) NOT NULL DEFAULT '1' AFTER sp_id");
            // static pages configuration options
            $c->add('include_search', 1, 'select', 0, 0, 0, 95, true, 'staticpages');
            $c->add('comment_code', -1, 'select', 0, 0, 17, 97, true, 'staticpages');
            $c->add('status_flag', 1, 'select', 0, 0, 13, 99, true, 'staticpages');
        case '1.6.0':
            DB_query("ALTER TABLE {$_TABLES['staticpage']} CHANGE `sp_tid` `sp_tid` VARCHAR(128) NOT NULL DEFAULT 'none';", 1);
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_SP_CONF['pi_version'] . "',pi_gl_version='" . $_SP_CONF['gl_version'] . "' WHERE pi_name='staticpages' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='staticpages'") == $_SP_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:31,代码来源:upgrade.php

示例2: plugin_initconfig_spamx

/**
* Initialize Spam-X plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $_SPX_CONF if available (e.g. from
* an old config.php), uses $_SPX_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_spamx()
{
    global $_CONF, $_SPX_CONF, $_SPX_DEFAULT;
    if (is_array($_SPX_CONF) && count($_SPX_CONF) > 1) {
        $_SPX_DEFAULT = array_merge($_SPX_DEFAULT, $_SPX_CONF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('spamx')) {
        $enable_email = true;
        if (empty($_SPX_DEFAULT['notification_email']) || $_SPX_DEFAULT['notification_email'] == $_CONF['site_mail']) {
            $enable_email = false;
        }
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'spamx');
        $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'spamx');
        $c->add('logging', $_SPX_DEFAULT['logging'], 'select', 0, 0, 1, 10, true, 'spamx');
        $c->add('admin_override', $_SPX_DEFAULT['admin_override'], 'select', 0, 0, 1, 20, true, 'spamx');
        $c->add('timeout', $_SPX_DEFAULT['timeout'], 'text', 0, 0, null, 30, true, 'spamx');
        $c->add('notification_email', $_SPX_DEFAULT['notification_email'], 'text', 0, 0, null, 40, $enable_email, 'spamx');
        $c->add('action', $_SPX_DEFAULT['action'], 'text', 0, 0, null, 50, false, 'spamx');
        $c->add('fs_sfs', NULL, 'fieldset', 0, 1, NULL, 0, true, 'spamx');
        $c->add('sfs_username_check', $_SPX_DEFAULT['sfs_username_check'], 'select', 0, 1, 1, 10, true, 'spamx');
        $c->add('sfs_email_check', $_SPX_DEFAULT['sfs_email_check'], 'select', 0, 1, 1, 20, true, 'spamx');
        $c->add('sfs_ip_check', $_SPX_DEFAULT['sfs_ip_check'], 'select', 0, 1, 1, 30, true, 'spamx');
        $c->add('sfs_username_confidence', $_SPX_DEFAULT['sfs_username_confidence'], 'text', 0, 1, 1, 40, true, 'spamx');
        $c->add('sfs_email_confidence', $_SPX_DEFAULT['sfs_email_confidence'], 'text', 0, 1, 1, 50, true, 'spamx');
        $c->add('sfs_ip_confidence', $_SPX_DEFAULT['sfs_ip_confidence'], 'text', 0, 1, 1, 60, true, 'spamx');
        $c->add('fs_slc', NULL, 'fieldset', 0, 2, NULL, 0, true, 'spamx');
        $c->add('slc_max_links', 5, 'text', 0, 1, 1, 10, true, 'spamx');
    }
    return true;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:41,代码来源:install_defaults.php

示例3: links_upgrade

function links_upgrade()
{
    global $_TABLES, $_CONF, $_LI_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='links'");
    switch ($currentVersion) {
        case '2.0.0':
        case '2.0.1':
            $c = config::get_instance();
            $c->add('target_blank', FALSE, 'select', 0, 1, 0, 55, true, 'links');
        case '2.0.2':
        case '2.0.3':
        case '2.0.4':
        case '2.0.5':
        case '2.0.6':
        case '2.0.7':
        case '2.0.8':
        case '2.0.9':
        case '2.1.0':
        case '2.1.1':
        case '2.1.2':
            $c = config::get_instance();
            $c->add('displayblocks', 0, 'select', 0, 0, 13, 60, true, 'links');
        case '2.1.3':
        case '2.1.4':
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_LI_CONF['pi_version'] . "',pi_gl_version='" . $_LI_CONF['gl_version'] . "' WHERE pi_name='links' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='links'") == $_LI_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:34,代码来源:upgrade.php

示例4: polls_upgrade

function polls_upgrade()
{
    global $_TABLES, $_CONF, $_PO_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='polls'");
    switch ($currentVersion) {
        case '2.0.0':
        case '2.0.1':
        case '2.0.2':
        case '2.0.3':
        case '2.0.4':
        case '2.0.5':
        case '2.0.6':
        case '2.0.7':
        case '2.0.8':
        case '2.0.9':
        case '2.1.0':
            $c = config::get_instance();
            $c->add('displayblocks', 0, 'select', 0, 0, 13, 85, true, 'polls');
        case '2.1.1':
            DB_query("ALTER TABLE {$_TABLES['pollanswers']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT '';", 1);
            DB_query("ALTER TABLE {$_TABLES['pollquestions']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL;", 1);
            DB_query("ALTER TABLE {$_TABLES['polltopics']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL;", 1);
            DB_query("ALTER TABLE {$_TABLES['pollvoters']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT '';", 1);
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_PO_CONF['pi_version'] . "',pi_gl_version='" . $_PO_CONF['gl_version'] . "' WHERE pi_name='polls' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='polls'") == $_PO_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:JohnToro,项目名称:glfusion,代码行数:33,代码来源:upgrade.php

示例5: plugin_initconfig_xmlsitemap

/**
* Initialize XMLSitemap plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist.  Initial values will be taken from $_XMLSMAP_DEFAULT.
*
* @return   boolean     true: success; false: an error occurred
*/
function plugin_initconfig_xmlsitemap()
{
    global $_XMLSMAP_DEFAULT;
    $me = 'xmlsitemap';
    $c = config::get_instance();
    if (!$c->group_exists($me)) {
        $c->add('sg_main', null, 'subgroup', 0, 0, null, 0, true, $me, 0);
        $c->add('tab_main', null, 'tab', 0, 0, null, 0, true, $me, 0);
        $c->add('fs_main', null, 'fieldset', 0, 0, null, 0, true, $me, 0);
        $c->add('sitemap_file', $_XMLSMAP_DEFAULT['sitemap_file'], 'text', 0, 0, null, 10, true, $me, 0);
        $c->add('mobile_sitemap_file', $_XMLSMAP_DEFAULT['mobile_sitemap_file'], 'text', 0, 0, null, 20, false, $me, 0);
        $c->add('types', $_XMLSMAP_DEFAULT['types'], '%text', 0, 0, null, 30, true, $me, 0);
        $c->add('exclude', $_XMLSMAP_DEFAULT['exclude'], '%text', 0, 0, null, 40, true, $me, 0);
        $c->add('lastmod', $_XMLSMAP_DEFAULT['lastmod'], '%text', 0, 0, null, 50, true, $me, 0);
        // Priorities
        $c->add('tab_pri', null, 'tab', 0, 1, null, 0, true, $me, 1);
        $c->add('fs_pri', null, 'fieldset', 0, 1, null, 0, true, $me, 1);
        $c->add('priorities', $_XMLSMAP_DEFAULT['priorities'], '*text', 0, 1, null, 50, true, $me, 1);
        // Frequencies
        $c->add('tab_freq', null, 'tab', 0, 2, null, 0, true, $me, 2);
        $c->add('fs_freq', null, 'fieldset', 0, 2, null, 0, true, $me, 2);
        $c->add('frequencies', $_XMLSMAP_DEFAULT['frequencies'], '@select', 0, 2, 20, 60, true, $me, 2);
        // Ping targets
        $c->add('tab_ping', null, 'tab', 0, 3, null, 0, true, $me, 3);
        $c->add('fs_ping', null, 'fieldset', 0, 3, null, 0, true, $me, 3);
        $c->add('ping_google', $_XMLSMAP_DEFAULT['ping_google'], 'select', 0, 3, 1, 100, true, $me, 3);
        $c->add('ping_bing', $_XMLSMAP_DEFAULT['ping_bing'], 'select', 0, 3, 1, 110, true, $me, 3);
    }
    return true;
}
开发者ID:Geeklog-Core,项目名称:geeklog,代码行数:38,代码来源:install_defaults.php

示例6: plugin_initconfig_nexflow

/**
* Initialize plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $CONF_NEXPRO if available (e.g. from
* an old config.php), uses $_NEXPRO_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_nexflow()
{
    global $CONF_NF, $CONF_NF_DEFAULT;
    if (is_array($CONF_NF) && count($CONF_NF) > 1) {
        $CONF_NF_DEFAULT = array_merge($CONF_NF_DEFAULT, $CONF_NF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('nexflow')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'nexflow');
        $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'nexflow');
        $c->add('fs_attachments', NULL, 'fieldset', 0, 1, NULL, 0, true, 'nexflow');
        $c->add('debug', $CONF_NF_DEFAULT['debug'], 'select', 0, 0, 0, 5, true, 'nexflow');
        $c->add('TaskConsole_URL', $CONF_NF_DEFAULT['TaskConsole_URL'], 'text', 0, 0, 0, 10, TRUE, 'nexflow');
        $c->add('RequestDetailLink_URL', $CONF_NF_DEFAULT['RequestDetailLink_URL'], 'text', 0, 0, 0, 20, TRUE, 'nexflow');
        $c->add('export_dir', $CONF_NF_DEFAULT['export_dir'], 'text', 0, 0, 0, 30, TRUE, 'nexflow');
        $c->add('email_notifications_enabled', $CONF_NF_DEFAULT['email_notifications_enabled'], 'select', 0, 0, 0, 40, true, 'nexflow');
        $c->add('orchestrator_using_cron', $CONF_NF_DEFAULT['orchestrator_using_cron'], 'select', 0, 0, 0, 50, true, 'nexflow');
        $c->add('allow_task_delete', $CONF_NF_DEFAULT['allow_task_delete'], 'select', 0, 0, 0, 60, true, 'nexflow');
        $c->add('allrequestsloginrequired', $CONF_NF_DEFAULT['allrequestsloginrequired'], 'select', 0, 0, 0, 70, true, 'nexflow');
        $c->add('taskconsolepermrequired', $CONF_NF_DEFAULT['taskconsolepermrequired'], 'select', 0, 0, 0, 80, true, 'nexflow');
        $c->add('uploadpath', $CONF_NF_DEFAULT['uploadpath'], 'text', 0, 1, 0, 100, TRUE, 'nexflow');
        $c->add('downloadURL', $CONF_NF_DEFAULT['downloadURL'], 'text', 0, 1, 0, 110, TRUE, 'nexflow');
        $c->add('max_uploadfile_size', $CONF_NF_DEFAULT['max_uploadfile_size'], 'text', 0, 1, 0, 120, TRUE, 'nexflow');
        $c->add('allowablefiletypes', array('application/x-gzip-compressed' => array('.tar.gz' => 1, '.tgz' => 1), 'application/x-zip-compressed' => array('.zip' => 1), 'application/x-tar' => array('.tar' => 1), 'text/plain' => array('.php' => 1, '.txt' => 1), 'text/html' => array('.html' => 1, '.htm' => 1), 'image/bmp' => array('.bmp' => 1, '.ico' => 1), 'image/gif' => array('.gif' => 1), 'image/png' => array('.png' => 1), 'image/pjpeg' => array('.jpg' => 1, '.jpeg' => 1), 'image/jpeg' => array('.jpg' => 1, '.jpeg' => 1), 'audio/mpeg' => array('.mp3' => 1), 'audio/wav' => array('.wav' => 1), 'application/pdf' => array('.pdf' => 1), 'application/x-shockwave-flash' => array('.swf' => 1), 'application/msword' => array('.doc' => 1), 'application/vnd.ms-msexcel' => array('.xls' => 1), 'application/vnd.ms-powerpoint' => array('.ppt' => 1), 'application/vnd.ms-project' => array('.mpp' => 1), 'application/vnd.vision' => array('.vsd' => 1), 'application/octet-stream' => array('.vsd' => 1, '.fla' => 1, '.psd' => 1, '.pdf' => 1, '.jpg' => 1, '.png' => 1, '.doc' => 1, '.xls' => 1)), '**placeholder', 0, 1, NULL, 130, TRUE, 'nexflow');
    }
    return true;
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:37,代码来源:install_defaults.php

示例7: calendar_upgrade

function calendar_upgrade()
{
    global $_TABLES, $_CONF, $_CA_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='calendar'");
    switch ($currentVersion) {
        case '1.0.2':
            // add new configuration option
            $c = config::get_instance();
            $c->add('only_admin_submit', 0, 'select', 0, 0, 0, 15, true, 'calendar');
        case '1.0.3':
        case '1.0.4':
        case '1.0.5':
            DB_query("ALTER TABLE {$_TABLES['eventsubmission']} ADD  owner_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '1' AFTER url");
        case '1.0.6':
            $c = config::get_instance();
            $c->add('displayblocks', 0, 'select', 0, 0, 13, 115, true, 'calendar');
            // allow events to be enabled/disabled
            DB_query("ALTER TABLE {$_TABLES['events']} ADD status tinyint(3) NOT NULL DEFAULT '1' AFTER eid");
            DB_query("ALTER TABLE {$_TABLES['eventsubmission']} ADD status tinyint(3) NOT NULL DEFAULT '1' AFTER eid");
            DB_query("ALTER TABLE {$_TABLES['personal_events']} ADD status tinyint(3) NOT NULL DEFAULT '1' AFTER eid");
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_CA_CONF['pi_version'] . "',pi_gl_version='" . $_CA_CONF['gl_version'] . "' WHERE pi_name='calendar' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='calendar'") == $_CA_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:spacequad,项目名称:glfusion,代码行数:30,代码来源:upgrade.php

示例8: plugin_initconfig_ckeditor

/**
* Initialize CKEditor plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_ckeditor()
{
    global $_CK_CONF, $_CK_DEFAULT;
    if (is_array($_CK_CONF) && count($_CK_CONF) > 1) {
        $_CK_DEFAULT = array_merge($_CK_DEFAULT, $_CK_CONF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('ckeditor')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'ckeditor');
        $c->add('ck_public', NULL, 'fieldset', 0, 0, NULL, 0, true, 'ckeditor');
        $c->add('ck_integration', NULL, 'fieldset', 0, 1, NULL, 0, true, 'ckeditor');
        $c->add('enable_comment', $_CK_DEFAULT['enable_comment'], 'select', 0, 1, 0, 30, true, 'ckeditor');
        $c->add('enable_story', $_CK_DEFAULT['enable_story'], 'select', 0, 1, 0, 40, true, 'ckeditor');
        $c->add('enable_submitstory', $_CK_DEFAULT['enable_submitstory'], 'select', 0, 1, 0, 50, true, 'ckeditor');
        $c->add('enable_contact', $_CK_DEFAULT['enable_contact'], 'select', 0, 1, 0, 60, true, 'ckeditor');
        $c->add('enable_emailstory', $_CK_DEFAULT['enable_emailstory'], 'select', 0, 1, 0, 70, true, 'ckeditor');
        $c->add('enable_sp', $_CK_DEFAULT['enable_sp'], 'select', 0, 1, 0, 70, true, 'ckeditor');
        $c->add('enable_block', $_CK_DEFAULT['enable_block'], 'select', 0, 1, 0, 80, true, 'ckeditor');
        $c->add('fs_filemanager_general', NULL, 'fieldset', 0, 2, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_per_user_dir', true, 'select', 0, 2, 1, 10, true, 'ckeditor');
        $c->add('filemanager_browse_only', false, 'select', 0, 2, 1, 20, true, 'ckeditor');
        $c->add('filemanager_default_view_mode', 'grid', 'select', 0, 2, 2, 30, true, 'ckeditor');
        $c->add('filemanager_date_format', 'Y-m-d H:i:s', 'text', 0, 2, NULL, 40, true, 'ckeditor');
        $c->add('filemanager_fileperm', '0664', 'text', 0, 2, NULL, 50, true, 'ckeditor');
        $c->add('filemanager_dirperm', '0775', 'text', 0, 2, NULL, 60, true, 'ckeditor');
    }
    return true;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:37,代码来源:install_defaults.php

示例9: plugin_initconfig_captcha

/**
* Initialize Captcha plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $_CA_CONF if available (e.g. from
* an old config.php), uses $_CP_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_captcha()
{
    global $_CP_DEFAULT;
    $c = config::get_instance();
    if (!$c->group_exists('captcha')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'captcha', 0);
        $c->add('tab_main', NULL, 'tab', 0, 0, NULL, 0, true, 'captcha', 0);
        $c->add('fs_config', NULL, 'fieldset', 0, 0, NULL, 0, true, 'captcha', 0);
        $c->add('debug', $_CP_DEFAULT['debug'], 'select', 0, 0, 0, 50, true, 'captcha', 0);
        $c->add('logging', $_CP_DEFAULT['logging'], 'select', 0, 0, 0, 60, true, 'captcha', 0);
        $c->add('input_id', rand(), 'text', 0, 0, 0, 70, true, 'captcha', 0);
        $c->add('use_slider', 1, 'select', 0, 0, 0, 80, true, 'captcha', 0);
        $c->add('fs_integration', NULL, 'fieldset', 0, 10, NULL, 0, true, 'captcha', 0);
        $c->add('anonymous_only', $_CP_DEFAULT['anonymous_only'], 'select', 0, 10, 0, 10, true, 'captcha', 0);
        $c->add('remoteusers', $_CP_DEFAULT['remoteusers'], 'select', 0, 10, 0, 20, true, 'captcha', 0);
        $c->add('enable_comment', $_CP_DEFAULT['enable_comment'], 'select', 0, 10, 0, 40, true, 'captcha', 0);
        $c->add('enable_contact', $_CP_DEFAULT['enable_contact'], 'select', 0, 10, 0, 50, true, 'captcha', 0);
        $c->add('enable_emailstory', $_CP_DEFAULT['enable_emailstory'], 'select', 0, 10, 0, 60, true, 'captcha', 0);
        $c->add('enable_forum', $_CP_DEFAULT['enable_forum'], 'select', 0, 10, 0, 70, true, 'captcha', 0);
        $c->add('enable_registration', $_CP_DEFAULT['enable_registration'], 'select', 0, 10, 0, 80, true, 'captcha', 0);
        $c->add('enable_mediagallery', $_CP_DEFAULT['enable_mediagallery'], 'select', 0, 10, 0, 90, true, 'captcha', 0);
        $c->add('enable_rating', $_CP_DEFAULT['enable_rating'], 'select', 0, 10, 0, 100, true, 'captcha', 0);
        $c->add('enable_story', $_CP_DEFAULT['enable_story'], 'select', 0, 10, 0, 110, true, 'captcha', 0);
        $c->add('enable_calendar', $_CP_DEFAULT['enable_calendar'], 'select', 0, 10, 0, 120, true, 'captcha', 0);
        $c->add('enable_links', $_CP_DEFAULT['enable_links'], 'select', 0, 10, 0, 130, true, 'captcha', 0);
    }
    return true;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:38,代码来源:install_defaults.php

示例10: plugin_initconfig_nexproject

/**
* Initialize plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $CONF_NEXPRO if available (e.g. from
* an old config.php), uses $_NEXPRO_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_nexproject()
{
    global $_PRJCONF, $CONF_PRJ_DEFAULT;
    if (is_array($_PRJCONF) && count($_PRJCONF) > 1) {
        $CONF_PRJ_DEFAULT = array_merge($CONF_PRJ_DEFAULT, $_PRJCONF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('nexproject')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'nexproject');
        $c->add('prj_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'nexproject');
        $c->add('debug', $CONF_PRJ_DEFAULT['debug'], 'select', 0, 0, 0, 10, true, 'nexproject');
        $c->add('notifications_enabled', $CONF_PRJ_DEFAULT['notifications_enabled'], 'select', 0, 0, 0, 20, true, 'nexproject');
        $c->add('fonts_directory', $CONF_PRJ_DEFAULT['fonts_directory'], 'text', 0, 0, 0, 30, true, 'nexproject');
        $c->add('leftblocks', $CONF_PRJ_DEFAULT['leftblocks'], '%text', 0, 0, NULL, 40, true, 'nexproject');
        $c->add('project_name_length', $CONF_PRJ_DEFAULT['project_name_length'], 'text', 0, 0, 0, 50, true, 'nexproject');
        $c->add('lockduration', $CONF_PRJ_DEFAULT['lockduration'], 'text', 0, 0, 0, 60, true, 'nexproject');
        $c->add('min_graph_width', $CONF_PRJ_DEFAULT['min_graph_width'], 'text', 0, 0, 0, 70, true, 'nexproject');
        $c->add('project_block_rows', $CONF_PRJ_DEFAULT['project_block_rows'], 'text', 0, 0, 0, 80, true, 'nexproject');
        $c->add('task_block_rows', $CONF_PRJ_DEFAULT['task_block_rows'], 'text', 0, 0, 0, 90, true, 'nexproject');
        $c->add('project_task_block_rows', $CONF_PRJ_DEFAULT['project_task_block_rows'], 'text', 0, 0, 0, 100, true, 'nexproject');
        $c->add('subTaskImg', $CONF_PRJ_DEFAULT['subTaskImg'], 'text', 0, 0, 0, 110, true, 'nexproject');
        $c->add('subTaskOrderImg', $CONF_PRJ_DEFAULT['subTaskOrderImg'], 'text', 0, 0, 0, 120, true, 'nexproject');
        $c->add('THEME', $CONF_PRJ_DEFAULT['THEME'], 'text', 0, 0, 0, 130, true, 'nexproject');
        $c->add('ROWLIMIT', $CONF_PRJ_DEFAULT['ROWLIMIT'], 'text', 0, 0, 0, 140, true, 'nexproject');
        $c->add('TTF_DIR', $CONF_PRJ_DEFAULT['TTF_DIR'], 'text', 0, 0, 0, 140, true, 'nexproject');
        return true;
    }
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:38,代码来源:install_defaults.php

示例11: spamx_upgrade

function spamx_upgrade()
{
    global $_TABLES, $_CONF, $_SPX_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='spamx'");
    switch ($currentVersion) {
        case '1.1.0':
        case '1.1.1':
        case '1.1.2':
        case '1.1.3':
        case '1.1.4':
        case '1.1.5':
        case '1.1.6':
        case '1.1.7':
        case '1.1.8':
        case '1.1.9':
        case '1.2.0':
            $c = config::get_instance();
            $c->add('fs_sfs', NULL, 'fieldset', 0, 1, NULL, 0, true, 'spamx');
            $c->add('sfs_username_check', false, 'select', 0, 1, 1, 10, true, 'spamx');
            $c->add('sfs_email_check', true, 'select', 0, 1, 1, 20, true, 'spamx');
            $c->add('sfs_ip_check', true, 'select', 0, 1, 1, 30, true, 'spamx');
            $c->add('sfs_username_confidence', '99.00', 'text', 0, 1, 1, 40, true, 'spamx');
            $c->add('sfs_email_confidence', '50.00', 'text', 0, 1, 1, 50, true, 'spamx');
            $c->add('sfs_ip_confidence', '25.00', 'text', 0, 1, 1, 60, true, 'spamx');
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_SPX_CONF['pi_version'] . "',pi_gl_version='" . $_SPX_CONF['gl_version'] . "' WHERE pi_name='spamx' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='spamx'") == $_SPX_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:34,代码来源:upgrade.php

示例12: polls_update_ConfValues_2_1_3

function polls_update_ConfValues_2_1_3()
{
    global $_CONF, $_PO_DEFAULT, $_PO_CONF, $_GROUPS, $_TABLES;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    require_once $_CONF['path'] . 'plugins/polls/install_defaults.php';
    $c->add('tab_poll_block', NULL, 'tab', 0, 20, NULL, 0, true, 'polls', 20);
    $c->add('fs_block_settings', NULL, 'fieldset', 0, 10, NULL, 0, true, 'polls', 20);
    $c->add('block_enable', $_PO_DEFAULT['block_enable'], 'select', 0, 10, 0, 10, true, 'polls', 20);
    $c->add('block_isleft', $_PO_DEFAULT['block_isleft'], 'select', 0, 10, 0, 20, true, 'polls', 20);
    $c->add('block_order', $_PO_DEFAULT['block_order'], 'text', 0, 10, 0, 30, true, 'polls', 20);
    $c->add('block_topic_option', $_PO_DEFAULT['block_topic_option'], 'select', 0, 10, 15, 40, true, 'polls', 20);
    $c->add('block_topic', $_PO_DEFAULT['block_topic'], '%select', 0, 10, NULL, 50, true, 'polls', 20);
    $c->add('fs_block_permissions', NULL, 'fieldset', 0, 20, NULL, 0, true, 'polls', 20);
    $new_group_id = 0;
    if (isset($_GROUPS['Polls Admin'])) {
        $new_group_id = $_GROUPS['Polls Admin'];
    } else {
        $new_group_id = DB_getItem($_TABLES['groups'], 'grp_id', "grp_name = 'Polls Admin'");
        if ($new_group_id == 0) {
            if (isset($_GROUPS['Root'])) {
                $new_group_id = $_GROUPS['Root'];
            } else {
                $new_group_id = DB_getItem($_TABLES['groups'], 'grp_id', "grp_name = 'Root'");
            }
        }
    }
    $c->add('block_group_id', $new_group_id, 'select', 0, 20, NULL, 10, TRUE, 'polls', 20);
    $c->add('block_permissions', $_PO_DEFAULT['block_permissions'], '@select', 0, 20, 14, 20, true, 'polls', 20);
    return true;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:31,代码来源:install_updates.php

示例13: ckeditor_upgrade

function ckeditor_upgrade()
{
    global $_TABLES, $_CONF, $_CK_CONF;
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='ckeditor'");
    switch ($currentVersion) {
        case "1.0.0":
            require_once $_CONF['path_system'] . 'classes/config.class.php';
            $c = config::get_instance();
            $c->add('enable_block', 1, 'select', 0, 1, 0, 130, true, 'ckeditor');
        case "1.0.1":
            require_once $_CONF['path_system'] . 'classes/config.class.php';
            $c = config::get_instance();
            $c->add('fs_filemanager_general', NULL, 'fieldset', 0, 2, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_fileroot', '/images/library/userfiles/', 'text', 0, 2, NULL, 20, true, 'ckeditor');
            $c->add('filemanager_per_user_dir', true, 'select', 0, 2, 1, 30, true, 'ckeditor');
            $c->add('filemanager_browse_only', false, 'select', 0, 2, 1, 40, true, 'ckeditor');
            $c->add('filemanager_default_view_mode', 'grid', 'select', 0, 2, 2, 50, true, 'ckeditor');
            $c->add('filemanager_show_confirmation', true, 'select', 0, 2, 1, 60, true, 'ckeditor');
            $c->add('filemanager_search_box', true, 'select', 0, 2, 1, 70, true, 'ckeditor');
            $c->add('filemanager_file_sorting', 'default', 'select', 0, 2, 3, 80, true, 'ckeditor');
            $c->add('filemanager_chars_only_latin', true, 'select', 0, 2, 1, 90, true, 'ckeditor');
            $c->add('filemanager_date_format', 'Y-m-d H:i:s', 'text', 0, 2, NULL, 100, true, 'ckeditor');
            $c->add('filemanager_show_thumbs', true, 'select', 0, 2, 1, 120, true, 'ckeditor');
            $c->add('filemanager_generate_thumbnails', true, 'select', 0, 2, 1, 130, true, 'ckeditor');
            $c->add('fs_filemanager_upload', NULL, 'fieldset', 0, 3, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_upload_restrictions', 'jpg,jpeg,gif,png,svg,txt,pdf,odp,ods,odt,rtf,doc,docx,xls,xlsx,ppt,pptx,ogv,mp4,webm,ogg,mp3,wav', 'text', 0, 3, NULL, 10, true, 'ckeditor');
            $c->add('filemanager_upload_overwrite', false, 'select', 0, 3, 1, 20, true, 'ckeditor');
            $c->add('filemanager_upload_images_only', false, 'select', 0, 3, 1, 30, true, 'ckeditor');
            $c->add('filemanager_upload_file_size_limit', 16, 'text', 0, 3, NULL, 40, true, 'ckeditor');
            $c->add('filemanager_unallowed_files', '.htaccess,web.config', 'text', 0, 3, NULL, 50, true, 'ckeditor');
            $c->add('filemanager_unallowed_dirs', '_thumbs,.CDN_ACCESS_LOGS,cloudservers', 'text', 0, 3, NULL, 60, true, 'ckeditor');
            $c->add('filemanager_unallowed_files_regexp', '/^\\./uis', 'text', 0, 3, NULL, 70, true, 'ckeditor');
            $c->add('filemanager_unallowed_dirs_regexp', '/^\\./uis', 'text', 0, 3, NULL, 80, true, 'ckeditor');
            $c->add('fs_filemanager_images', NULL, 'fieldset', 0, 4, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_images_ext', 'jpg,jpeg,gif,png,svg', 'text', 0, 4, NULL, 10, true, 'ckeditor');
            $c->add('fs_filemanager_videos', NULL, 'fieldset', 0, 5, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_show_video_player', true, 'select', 0, 5, 1, 10, true, 'ckeditor');
            $c->add('filemanager_videos_ext', 'ogv,mp4,webm', 'text', 0, 5, NULL, 20, true, 'ckeditor');
            $c->add('filemanager_videos_player_width', 400, 'text', 0, 5, NULL, 30, true, 'ckeditor');
            $c->add('filemanager_videos_player_height', 222, 'text', 0, 5, NULL, 40, true, 'ckeditor');
            $c->add('fs_filemanager_audios', NULL, 'fieldset', 0, 6, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_show_audio_player', true, 'select', 0, 6, 1, 10, true, 'ckeditor');
            $c->add('filemanager_audios_ext', 'ogg,mp3,wav', 'text', 0, 6, NULL, 20, true, 'ckeditor');
            $c->add('fs_filemanager_editor', NULL, 'fieldset', 0, 7, NULL, 0, true, 'ckeditor');
            $c->add('filemanager_edit_enabled', false, 'select', 0, 7, 1, 10, true, 'ckeditor');
            $c->add('filemanager_edit_linenumbers', true, 'select', 0, 7, 1, 20, true, 'ckeditor');
            $c->add('filemanager_edit_linewrapping', true, 'select', 0, 7, 1, 30, true, 'ckeditor');
            $c->add('filemanager_edit_codehighlight', false, 'select', 0, 7, 1, 40, true, 'ckeditor');
            $c->add('filemanager_edit_editext', 'txt,csv', 'text', 0, 7, NULL, 50, true, 'ckeditor');
        default:
            DB_query("UPDATE {$_TABLES['plugins']} SET pi_version='" . $_CK_CONF['pi_version'] . "',pi_gl_version='" . $_CK_CONF['gl_version'] . "' WHERE pi_name='ckeditor' LIMIT 1");
            break;
    }
    if (DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='ckeditor'") == $_CK_CONF['pi_version']) {
        return true;
    } else {
        return false;
    }
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:59,代码来源:upgrade.php

示例14: plugin_initconfig_ckeditor

/**
* Initialize CKEditor plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_ckeditor()
{
    global $_CK_CONF, $_CK_DEFAULT;
    if (is_array($_CK_CONF) && count($_CK_CONF) > 1) {
        $_CK_DEFAULT = array_merge($_CK_DEFAULT, $_CK_CONF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('ckeditor')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'ckeditor');
        $c->add('ck_public', NULL, 'fieldset', 0, 0, NULL, 0, true, 'ckeditor');
        $c->add('ck_integration', NULL, 'fieldset', 0, 1, NULL, 0, true, 'ckeditor');
        $c->add('enable_comment', $_CK_DEFAULT['enable_comment'], 'select', 0, 1, 0, 30, true, 'ckeditor');
        $c->add('enable_story', $_CK_DEFAULT['enable_story'], 'select', 0, 1, 0, 40, true, 'ckeditor');
        $c->add('enable_submitstory', $_CK_DEFAULT['enable_submitstory'], 'select', 0, 1, 0, 50, true, 'ckeditor');
        $c->add('enable_contact', $_CK_DEFAULT['enable_contact'], 'select', 0, 1, 0, 60, true, 'ckeditor');
        $c->add('enable_emailstory', $_CK_DEFAULT['enable_emailstory'], 'select', 0, 1, 0, 70, true, 'ckeditor');
        $c->add('enable_sp', $_CK_DEFAULT['enable_sp'], 'select', 0, 1, 0, 120, true, 'ckeditor');
        $c->add('enable_block', $_CK_DEFAULT['enable_block'], 'select', 0, 1, 0, 130, true, 'ckeditor');
        $c->add('fs_filemanager_general', NULL, 'fieldset', 0, 2, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_fileroot', '/images/library/userfiles/', 'text', 0, 2, NULL, 20, true, 'ckeditor');
        $c->add('filemanager_per_user_dir', true, 'select', 0, 2, 1, 30, true, 'ckeditor');
        $c->add('filemanager_browse_only', false, 'select', 0, 2, 1, 40, true, 'ckeditor');
        $c->add('filemanager_default_view_mode', 'grid', 'select', 0, 2, 2, 50, true, 'ckeditor');
        $c->add('filemanager_show_confirmation', true, 'select', 0, 2, 1, 60, true, 'ckeditor');
        $c->add('filemanager_search_box', true, 'select', 0, 2, 1, 70, true, 'ckeditor');
        $c->add('filemanager_file_sorting', 'default', 'select', 0, 2, 3, 80, true, 'ckeditor');
        $c->add('filemanager_chars_only_latin', true, 'select', 0, 2, 1, 90, true, 'ckeditor');
        $c->add('filemanager_date_format', 'Y-m-d H:i:s', 'text', 0, 2, NULL, 100, true, 'ckeditor');
        $c->add('filemanager_show_thumbs', true, 'select', 0, 2, 1, 120, true, 'ckeditor');
        $c->add('filemanager_generate_thumbnails', true, 'select', 0, 2, 1, 130, true, 'ckeditor');
        $c->add('fs_filemanager_upload', NULL, 'fieldset', 0, 3, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_upload_restrictions', 'jpg,jpeg,gif,png,svg,txt,pdf,odp,ods,odt,rtf,doc,docx,xls,xlsx,ppt,pptx,ogv,mp4,webm,ogg,mp3,wav', 'text', 0, 3, NULL, 10, true, 'ckeditor');
        $c->add('filemanager_upload_overwrite', false, 'select', 0, 3, 1, 20, true, 'ckeditor');
        $c->add('filemanager_upload_images_only', false, 'select', 0, 3, 1, 30, true, 'ckeditor');
        $c->add('filemanager_upload_file_size_limit', 16, 'text', 0, 3, NULL, 40, true, 'ckeditor');
        $c->add('filemanager_unallowed_files', '.htaccess,web.config', 'text', 0, 3, NULL, 50, true, 'ckeditor');
        $c->add('filemanager_unallowed_dirs', '_thumbs,.CDN_ACCESS_LOGS,cloudservers', 'text', 0, 3, NULL, 60, true, 'ckeditor');
        $c->add('filemanager_unallowed_files_regexp', '/^\\./uis', 'text', 0, 3, NULL, 70, true, 'ckeditor');
        $c->add('filemanager_unallowed_dirs_regexp', '/^\\./uis', 'text', 0, 3, NULL, 80, true, 'ckeditor');
        $c->add('fs_filemanager_images', NULL, 'fieldset', 0, 4, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_images_ext', 'jpg,jpeg,gif,png,svg', 'text', 0, 4, NULL, 10, true, 'ckeditor');
        $c->add('fs_filemanager_videos', NULL, 'fieldset', 0, 5, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_show_video_player', true, 'select', 0, 5, 1, 10, true, 'ckeditor');
        $c->add('filemanager_videos_ext', 'ogv,mp4,webm', 'text', 0, 5, NULL, 20, true, 'ckeditor');
        $c->add('filemanager_videos_player_width', 400, 'text', 0, 5, NULL, 30, true, 'ckeditor');
        $c->add('filemanager_videos_player_height', 222, 'text', 0, 5, NULL, 40, true, 'ckeditor');
        $c->add('fs_filemanager_audios', NULL, 'fieldset', 0, 6, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_show_audio_player', true, 'select', 0, 6, 1, 10, true, 'ckeditor');
        $c->add('filemanager_audios_ext', 'ogg,mp3,wav', 'text', 0, 6, NULL, 20, true, 'ckeditor');
        $c->add('fs_filemanager_editor', NULL, 'fieldset', 0, 7, NULL, 0, true, 'ckeditor');
        $c->add('filemanager_edit_enabled', false, 'select', 0, 7, 1, 10, true, 'ckeditor');
        $c->add('filemanager_edit_linenumbers', true, 'select', 0, 7, 1, 20, true, 'ckeditor');
        $c->add('filemanager_edit_linewrapping', true, 'select', 0, 7, 1, 30, true, 'ckeditor');
        $c->add('filemanager_edit_codehighlight', false, 'select', 0, 7, 1, 40, true, 'ckeditor');
        $c->add('filemanager_edit_editext', 'txt,csv', 'text', 0, 7, NULL, 50, true, 'ckeditor');
    }
    return true;
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:67,代码来源:install_defaults.php

示例15: update_ConfValuesFor212

/**
 * Add new config options
 *
 */
function update_ConfValuesFor212()
{
    global $_CONF;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    $me = 'Core';
    $c->add('url_routing', FALSE, 'select', 0, 0, 36, 1850, TRUE, $me, 0);
    return true;
}
开发者ID:Geeklog-Core,项目名称:geeklog,代码行数:13,代码来源:mssql_2.1.0_to_2.1.2.php


注:本文中的config::get_instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。