Ejemplo n.º 1
0
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;
    }
}
Ejemplo n.º 2
0
/**
* 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;
}
Ejemplo n.º 3
0
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;
    }
}
Ejemplo n.º 4
0
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;
    }
}
Ejemplo n.º 5
0
/**
* 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;
}
Ejemplo n.º 6
0
/**
* 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;
}
Ejemplo n.º 7
0
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;
    }
}
Ejemplo n.º 8
0
/**
* 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;
}
Ejemplo n.º 9
0
/**
* 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;
}
Ejemplo n.º 10
0
/**
* 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;
    }
}
Ejemplo n.º 11
0
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;
    }
}
Ejemplo n.º 12
0
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;
}
Ejemplo n.º 13
0
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;
    }
}
Ejemplo n.º 14
0
/**
* 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;
}
Ejemplo n.º 15
0
/**
 * 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;
}
Ejemplo n.º 16
0
function update_ConfValues_2_1_0()
{
    global $_CONF, $_PO_DEFAULT;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    // meta tag config options.
    $c->add('meta_tags', $_PO_DEFAULT['meta_tags'], 'select', 0, 0, 0, 100, true, 'polls');
    return true;
}
Ejemplo n.º 17
0
/**
 * Add new config options
 *
 */
function update_ConfValuesFor170()
{
    global $_CONF, $_TABLES;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    // search config options.
    $c->add('search_def_sort', 'hits|desc', 'select', 0, 6, 27, 676, TRUE);
    return true;
}
Ejemplo n.º 18
0
function spamx_update_ConfValues_1_2_1()
{
    global $_CONF;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    // Add in all the New Tabs
    $c->add('tab_main', NULL, 'tab', 0, 0, NULL, 0, true, 'spamx', 0);
    return true;
}
Ejemplo n.º 19
0
function SP_update_ConfValues_1_6_5()
{
    global $_CONF, $_TABLES, $_SP_DEFAULT;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    require_once $_CONF['path'] . 'plugins/staticpages/install_defaults.php';
    // Cache Time
    $c->add('default_cache_time', $_SP_DEFAULT['default_cache_time'], 'text', 0, 0, null, 129, true, 'staticpages', 0);
    return true;
}
Ejemplo n.º 20
0
function bad_behavior2_upgrade()
{
    global $_TABLES, $_CONF, $_BB2_CONF;
    $sql = '';
    $currentVersion = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name='bad_behavior2'");
    switch ($currentVersion) {
        case '2.0.13':
        case '2.0.13a':
        case '2.0.24':
        case '2.0.26':
        case '2.0.27':
        case '2.0.28':
        case '2.0.29':
        case '2.0.35':
        case '2.0.36':
        case '2.0.37':
        case '2.0.38':
        case '2.0.39':
        case '2.0.40':
        case '2.0.41':
        case '2.0.42':
        case '2.0.43':
        case '2.0.44':
        case '2.0.45':
        case '2.0.46':
        case '2.0.47':
        case '2.0.48':
        case '2.0.49':
            $sql .= "CREATE TABLE IF NOT EXISTS {$_TABLES['bad_behavior2_ban']} (\n                `id` smallint(5) unsigned NOT NULL auto_increment,\n                `ip` varbinary(16) NOT NULL,\n                `type` tinyint(3) unsigned NOT NULL,\n                `timestamp` int(8) NOT NULL DEFAULT '0',\n                `reason` VARCHAR(255) NULL DEFAULT NULL,\n                PRIMARY KEY  (id),\n                UNIQUE ip (ip),\n                INDEX type (type),\n                INDEX timestamp (timestamp) ) ENGINE=MyISAM;";
            DB_query($sql, 1);
            require_once $_CONF['path_system'] . 'classes/config.class.php';
            $c = config::get_instance();
            // Subgroup: Spam / Bot Protection
            $c->add('sg_spam', NULL, 'subgroup', 8, 0, NULL, 0, TRUE);
            $c->add('fs_spam_config', NULL, 'fieldset', 8, 1, NULL, 0, TRUE);
            $c->add('bb2_enabled', 1, 'select', 8, 1, 0, 10, TRUE);
            $c->add('bb2_ban_enabled', 0, 'select', 8, 1, 0, 20, TRUE);
            $c->add('bb2_ban_timeout', 24, 'text', 8, 1, 0, 30, TRUE);
            $c->add('bb2_display_stats', 0, 'select', 8, 1, 0, 40, TRUE);
            $c->add('bb2_strict', 0, 'select', 8, 1, 0, 50, TRUE);
            $c->add('bb2_verbose', 0, 'select', 8, 1, 0, 60, TRUE);
            $c->add('bb2_logging', 1, 'select', 8, 1, 0, 70, TRUE);
            $c->add('bb2_httpbl_key', '', 'text', 8, 1, NULL, 80, TRUE);
            $c->add('bb2_httpbl_threat', 25, 'text', 8, 1, NULL, 90, TRUE);
            $c->add('bb2_httpbl_maxage', 30, 'text', 8, 1, NULL, 100, TRUE);
            $c->add('bb2_offsite_forms', 0, 'select', 8, 1, 0, 110, TRUE);
            $c->add('bb2_eu_cookie', 0, 'select', 8, 1, 0, 120, TRUE);
            break;
        default:
            break;
    }
    DB_query("UPDATE {$_TABLES['plugins']} SET pi_version = '" . $_BB2_CONF['pi_version'] . "', pi_gl_version = '" . $_BB2_CONF['gl_version'] . "', pi_homepage = 'https://www.glfusion.org' WHERE pi_name = 'bad_behavior2'");
    return true;
}
Ejemplo n.º 21
0
function SEARCHRANK_update_ConfValues_1_0_0()
{
    global $_CONF, $_SR_DEFAULT;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $me = 'searchrank';
    $c = config::get_instance();
    $c->add('showstats', false, 'select', 0, 0, 1, 5, true, $me, 0);
    $c->add('itemsperpage', 20, 'text', 0, 0, null, 60, true, $me, 0);
    $c->add('blockorder', 1, 'text', 0, 0, null, 25, true, $me, 0);
    $c->add('rootonly', false, 'select', 0, 0, 1, 20, true, $me, 0);
    return true;
}
Ejemplo n.º 22
0
function custommenu_update_ConfValues_0_5_0()
{
    global $_TABLES;
    //    global $_CONF;
    //    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    // Add in all the New Tabs
    $c->add('tab_main', NULL, 'tab', 0, 0, NULL, 0, true, 'custommenu', 0);
    $c->add('tab_permissions', NULL, 'tab', 0, 2, NULL, 0, true, 'custommenu', 1);
    DB_query("UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name = 'custommenu'");
    return true;
}
Ejemplo n.º 23
0
function xmlsitemap_update_ConfValues_1_0_0()
{
    global $_CONF;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    $me = 'xmlsitemap';
    // Add in all the New Tabs
    $c->add('tab_main', NULL, 'tab', 0, 0, NULL, 0, TRUE, $me, 0);
    $c->add('tab_pri', NULL, 'tab', 0, 1, NULL, 0, TRUE, $me, 1);
    $c->add('tab_freq', NULL, 'tab', 0, 2, NULL, 0, TRUE, $me, 2);
    return true;
}
Ejemplo n.º 24
0
/**
* Initialize monitor 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_monitor()
{
    global $_CONF, $_monitor_DEFAULT;
    $c = config::get_instance();
    if (!$c->group_exists('monitor')) {
        //This is main subgroup #0
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'monitor');
        //Main settings
        $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, 'monitor');
        $c->add('emails', $_monitor_DEFAULT['emails'], 'text', 0, 0, 0, 10, true, 'monitor');
    }
    return true;
}
Ejemplo n.º 25
0
function spamx_update_ConfValues_1_3_0()
{
    global $_CONF, $_SPX_DEFAULT;
    // Now add in new Config options
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    $c = config::get_instance();
    require_once $_CONF['path'] . 'plugins/spamx/install_defaults.php';
    // Add in new config options
    $c->add('max_age', $_SPX_DEFAULT['max_age'], 'text', 0, 0, null, 60, true, 'spamx', 0);
    $c->add('sfs_confidence', $_SPX_DEFAULT['sfs_confidence'], 'text', 0, 0, null, 20, true, 'spamx', 10);
    $c->add('records_delete', $_SPX_DEFAULT['records_delete'], '%text', 0, 0, null, 70, true, 'spamx', 0);
    return true;
}
Ejemplo n.º 26
0
/**
* Initialize hello 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_hello()
{
    global $_CONF, $_HE_DEFAULT;
    $c = config::get_instance();
    if (!$c->group_exists('hello')) {
        //This is main subgroup #0
        $c->add('sg_0', NULL, 'subgroup', 0, 0, NULL, 0, true, 'hello');
        //This is fieldset #1  in subgroup #0
        $c->add('fs_01', NULL, 'fieldset', 0, 0, NULL, 0, true, 'hello');
        $c->add('max_email', $_HE_DEFAULT['max_email'], 'text', 0, 0, 0, 10, true, 'hello');
    }
    return true;
}
Ejemplo n.º 27
0
/**
 * Add new config options
 *
 */
function update_ConfValues()
{
    global $_CONF, $_TABLES;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    // remove pdf_enabled option; this also makes room for new search options
    DB_delete($_TABLES['conf_values'], 'name', 'pdf_enabled');
    // move num_search_results options
    DB_query("UPDATE {$_TABLES['conf_values']} SET sort_order = 651 WHERE sort_order = 670");
    // change default for num_search_results
    $thirty = addslashes(serialize(30));
    DB_query("UPDATE {$_TABLES['conf_values']} SET value = '{$thirty}', default_value = '{$thirty}' WHERE name = 'num_search_results'");
    // fix censormode dropdown
    DB_query("UPDATE {$_TABLES['conf_values']} SET selectionArray = 18 WHERE name = 'censormode'");
    $c = config::get_instance();
    // new options
    $c->add('jpeg_quality', 75, 'text', 5, 23, NULL, 1495, FALSE);
    $c->add('advanced_html', array('img' => array('width' => 1, 'height' => 1, 'src' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'alt' => 1)), '**placeholder', 7, 34, NULL, 1721, TRUE);
    // squeeze search options between 640 (lastlogin) and 680 (loginrequired)
    $c->add('fs_search', NULL, 'fieldset', 0, 6, NULL, 0, TRUE);
    $c->add('search_style', 'google', 'select', 0, 6, 19, 644, TRUE);
    $c->add('search_limits', '10,15,25,30', 'text', 0, 6, NULL, 647, TRUE);
    // see above: $c->add('num_search_results',30,'text',0,6,NULL,651,TRUE);
    $c->add('search_show_limit', TRUE, 'select', 0, 6, 1, 654, TRUE);
    $c->add('search_show_sort', TRUE, 'select', 0, 6, 1, 658, TRUE);
    $c->add('search_show_num', TRUE, 'select', 0, 6, 1, 661, TRUE);
    $c->add('search_show_type', TRUE, 'select', 0, 6, 1, 665, TRUE);
    $c->add('search_separator', ' > ', 'text', 0, 6, NULL, 668, TRUE);
    $c->add('search_def_keytype', 'phrase', 'select', 0, 6, 20, 672, TRUE);
    $c->add('search_use_fulltext', FALSE, 'hidden', 0, 6);
    // 675
    // filename mask for db backup files
    $c->add('mysqldump_filename_mask', 'geeklog_db_backup_%Y_%m_%d_%H_%M_%S.sql', 'text', 0, 5, NULL, 185, TRUE);
    // DOCTYPE declaration, for {doctype} in header.thtml
    $c->add('doctype', 'html401strict', 'select', 2, 10, 21, 195, TRUE);
    // new comment options
    $c->add('comment_edit', 0, 'select', 4, 21, 0, 1680, TRUE);
    $c->add('commentsubmission', 0, 'select', 4, 21, 0, 1682, TRUE);
    $c->add('comment_edittime', 1800, 'text', 4, 21, NULL, 1684, TRUE);
    $c->add('article_comment_close_days', 30, 'text', 4, 21, NULL, 1686, TRUE);
    $c->add('comment_close_rec_stories', 0, 'text', 4, 21, NULL, 1688, TRUE);
    $c->add('allow_reply_notifications', 0, 'select', 4, 21, 0, 1689, TRUE);
    // cookie to store name of anonymous commenters
    $c->add('cookie_anon_name', 'anon_name', 'text', 7, 30, NULL, 577, TRUE);
    // enable/disable clickable links
    $c->add('clickable_links', 1, 'select', 7, 31, 1, 1753, TRUE);
    // experimental: compress output before sending it to the browser
    $c->add('compressed_output', 0, 'select', 7, 31, 1, 1756, TRUE);
    // for the X-FRAME-OPTIONS header (Clickjacking protection)
    $c->add('frame_options', 'DENY', 'select', 7, 31, 22, 1758, TRUE);
    return true;
}
Ejemplo n.º 28
0
/**
* Initialize evList plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $CONF_EVLIST if available (e.g. from
* an old config.php), uses $CONF_EVLIST_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_evlist()
{
    global $_EV_CONF, $CONF_EVLIST_DEFAULT;
    if (is_array($_EV_CONF) && count($_EV_CONF) > 1) {
        $CONF_EVLIST_DEFAULT = array_merge($CONF_EVLIST_DEFAULT, $_EV_CONF);
    }
    $c = config::get_instance();
    if (!$c->group_exists('evlist')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'evlist');
        $c->add('ev_access', NULL, 'fieldset', 0, 0, NULL, 0, true, 'evlist');
        $c->add('allow_anon_view', $CONF_EVLIST_DEFAULT['allow_anon_view'], 'select', 0, 0, 0, 10, true, 'evlist');
        $c->add('can_add', $CONF_EVLIST_DEFAULT['allow_anon_add'], 'select', 0, 0, 15, 20, true, 'evlist');
        /*$c->add('allow_anon_add',$CONF_EVLIST_DEFAULT['allow_anon_add'], 'select',
                  0, 0, 0, 20, true, 'evlist');
          $c->add('allow_user_add',$CONF_EVLIST_DEFAULT['allow_user_add'], 'select',
                  0, 0, 0, 30, true, 'evlist');*/
        $c->add('allow_html', $CONF_EVLIST_DEFAULT['allow_html'], 'select', 0, 0, 0, 40, true, 'evlist');
        $c->add('enable_menuitem', $CONF_EVLIST_DEFAULT['enable_menuitem'], 'select', 0, 0, 0, 50, true, 'evlist');
        $c->add('enable_categories', $CONF_EVLIST_DEFAULT['enable_categories'], 'select', 0, 0, 0, 55, true, 'evlist');
        $c->add('reminder_speedlimit', $CONF_EVLIST_DEFAULT['reminder_speedlimit'], 'text', 0, 0, NULL, 60, true, 'evlist');
        $c->add('post_speedlimit', $CONF_EVLIST_DEFAULT['post_speedlimit'], 'text', 0, 0, NULL, 70, true, 'evlist');
        $c->add('enable_reminders', $CONF_EVLIST_DEFAULT['enable_reminders'], 'select', 0, 0, 0, 80, true, 'evlist');
        $c->add('reminder_days', $CONF_EVLIST_DEFAULT['reminder_days'], 'text', 0, 0, NULL, 90, true, 'evlist');
        $c->add('ev_gui', NULL, 'fieldset', 0, 1, NULL, 0, true, 'evlist');
        $c->add('enable_menuitem', $CONF_EVLIST_DEFAULT['enable_menuitem'], 'select', 0, 1, 0, 10, true, 'evlist');
        $c->add('usermenu_option', $CONF_EVLIST_DEFAULT['usermenu_option'], 'select', 0, 1, 2, 20, true, 'evlist');
        $c->add('displayblocks', $CONF_EVLIST_DEFAULT['displayblocks'], 'select', 0, 1, 13, 25, true, 'evlist');
        $c->add('event_passing', $CONF_EVLIST_DEFAULT['event_passing'], 'select', 0, 1, 6, 60, true, 'evlist');
        $c->add('limit_list', $CONF_EVLIST_DEFAULT['limit_list'], 'text', 0, 1, 0, 70, true, 'evlist');
        $c->add('limit_block', $CONF_EVLIST_DEFAULT['limit_block'], 'text', 0, 1, 0, 80, true, 'evlist');
        $c->add('default_view', $CONF_EVLIST_DEFAULT['default_view'], 'select', 0, 1, 14, 90, true, 'evlist');
        $c->add('max_upcoming_days', $CONF_EVLIST_DEFAULT['max_upcoming_days'], 'text', 0, 1, 0, 100, true, 'evlist');
        $c->add('use_locator', $CONF_EVLIST_DEFAULT['use_locator'], 'select', 0, 1, 0, 110, true, 'evlist');
        $c->add('use_weather', $CONF_EVLIST_DEFAULT['use_weather'], 'select', 0, 1, 0, 120, true, 'evlist');
        $c->add('cal_tmpl', $CONF_EVLIST_DEFAULT['cal_tmpl'], 'select', 0, 1, 16, 130, true, 'evlist');
        $c->add('ev_centerblock', NULL, 'fieldset', 0, 2, NULL, 0, true, 'evlist');
        $c->add('enable_centerblock', $CONF_EVLIST_DEFAULT['enable_centerblock'], 'select', 0, 2, 9, 10, true, 'evlist');
        $c->add('pos_centerblock', $CONF_EVLIST_DEFAULT['pos_centerblock'], 'select', 0, 2, 7, 20, true, 'evlist');
        $c->add('topic_centerblock', $CONF_EVLIST_DEFAULT['topic_centerblock'], 'select', 0, 2, NULL, 30, true, 'evlist');
        $c->add('range_centerblock', $CONF_EVLIST_DEFAULT['range_centerblock'], 'select', 0, 2, 8, 40, true, 'evlist');
        $c->add('limit_block', $CONF_EVLIST_DEFAULT['limit_block'], 'text', 0, 2, 0, 50, true, 'evlist');
        $c->add('limit_summary', $CONF_EVLIST_DEFAULT['limit_summary'], 'text', 0, 2, 0, 60, true, 'evlist');
        $c->add('ev_permissions', NULL, 'fieldset', 0, 3, NULL, 0, true, 'evlist');
        $c->add('default_permissions', $CONF_EVLIST_DEFAULT['default_permissions'], '@select', 0, 3, 12, 10, true, 'evlist');
        $c->add('sg_rsvp', NULL, 'subgroup', 20, 0, NULL, 0, true, 'evlist');
        $c->add('ev_rsvp', NULL, 'fieldset', 20, 10, NULL, 0, true, 'evlist');
        $c->add('enable_rsvp', $CONF_EVLIST_DEFAULT['enable_rsvp'], 'select', 20, 10, 0, 10, true, 'evlist');
        $c->add('rsvp_print', $CONF_EVLIST_DEFAULT['rsvp_print'], 'select', 20, 10, 17, 20, true, 'evlist');
    }
    return true;
}
Ejemplo n.º 29
0
function xmlsitemap_update_ConfValues_1_0_1()
{
    global $_CONF, $_XMLSMAP_DEFAULT;
    require_once $_CONF['path_system'] . 'classes/config.class.php';
    require_once $_CONF['path'] . 'plugins/xmlsitemap/install_defaults.php';
    $c = config::get_instance();
    $me = 'xmlsitemap';
    // Content types to include lastmod element
    $c->add('lastmod', $_XMLSMAP_DEFAULT['lastmod'], '%text', 0, 0, null, 50, true, $me, 0);
    // 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);
}
Ejemplo n.º 30
0
/**
* Initialize plugin configuration
*
* Creates the database entries for the configuation if they don't already
* exist. Initial values will be taken from $CONF_NS if available (e.g. from
* an old config.php), uses $_NEXSCAN_DEFAULT otherwise.
*
* @return   boolean     true: success; false: an error occurred
*
*/
function plugin_initconfig_nexscan()
{
    global $CONF_NS, $_NEXSCAN_DEFAULT;
    if (is_array($CONF_NS) && count($CONF_NS) > 1) {
        $_NEXSCAN_DEFAULT = array_merge($_NEXSCAN_DEFAULT, $CONF_NS);
    }
    $c = config::get_instance();
    if (!$c->group_exists('nexscan')) {
        $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, 'nexscan');
        $c->add('fs_libraries', NULL, 'fieldset', 0, 0, NULL, 0, true, 'nexscan');
        $c->add('valid_wrap_chars', $_NEXSCAN_DEFAULT['valid_wrap_chars'], 'text', 0, 0, 1, 10, true, 'nexscan');
        $c->add('types_to_scan', $_NEXSCAN_DEFAULT['types_to_scan'], '%text', 0, 0, 1, 20, true, 'nexscan');
    }
    return true;
}