示例#1
0
    /**
     * Step #5 - Ask Options...
     *
     */
    function step_5($data = null)
    {
        require_once DIR . '/includes/adminfunctions_options.php';
        if ($data['response']) {
            $this->registry->options = array('bbtitle' => $data['htmldata']['bbtitle'], 'hometitle' => $data['htmldata']['hometitle'], 'bburl' => $data['htmldata']['bburl'], 'homeurl' => $data['htmldata']['homeurl'], 'webmasteremail' => $data['htmldata']['webmasteremail']);
            if (!($xml = file_read(DIR . '/install/vbulletin-settings.xml'))) {
                $this->add_error(sprintf($this->phrase['vbphrase']['file_not_found'], 'vbulletin-settings.xml'), self::PHP_TRIGGER_ERROR, true);
                return;
            }
            $gdinfo = fetch_gdinfo();
            if ($gdinfo['version'] >= 2) {
                if ($gdinfo['freetype'] == 'freetype') {
                    $this->registry->options['regimagetype'] = 'GDttf';
                }
            } else {
                $this->registry->options['hv_type'] = '0';
                $this->registry->options['regimagetype'] = '';
            }
            if (empty($gdinfo['version'])) {
                $this->registry->options['imagetype'] = 0;
            }
            //if ($this->install_suite())
            //{
            // Hooks are enabled now because of Skimlinks
            $this->registry->options['enablehooks'] = 1;
            //}
            // Need to set default language id!
            $languageinfo = $this->db->query_first("\n\t\t\t\tSELECT languageid\n\t\t\t\tFROM " . TABLE_PREFIX . "language\n\t\t\t");
            $this->registry->options['languageid'] = $languageinfo['languageid'];
            // Need to import settings here to get the custom settings inserted ..
            xml_import_settings($xml);
            $this->show_message($this->phrase['install']['general_settings_saved']);
            return;
        }
        $port = intval($_SERVER['SERVER_PORT']);
        $port = in_array($port, array(80, 443)) ? '' : ':' . $port;
        $scheme = ($port == ':443' or isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] and $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://';
        $vboptions['bburl'] = $scheme . $_SERVER['SERVER_NAME'] . $port . substr(SCRIPTPATH, 0, strpos(SCRIPTPATH, '/install/'));
        $vboptions['homeurl'] = $scheme . $_SERVER['SERVER_NAME'] . $port;
        $webmaster = 'webmaster@' . preg_replace('#^www\\.#', '', $_SERVER['SERVER_NAME']);
        $html = '<table cellspacing="0" cellpadding="4" border="0" align="center" width="100%" id="cpform_table" class="" style="border-collapse: separate;">
<tbody>
<tr valign="top">
	<td class="alt1">' . $this->phrase['install']['bbtitle'] . '
		<span id="htmldata[bbtitle]_error" class="usererror hidden">' . $this->phrase['install']['field_required'] . '</span>
	</td>
	<td class="alt1"><input type="text" tabindex="1" dir="ltr" size="40" value="Forums" name="htmldata[bbtitle]" class="bginput" vbrequire="1" /></td>
</tr>
<tr valign="top">
	<td class="alt2">' . $this->phrase['install']['hometitle'] . '
	</td>
	<td class="alt2"><input type="text" tabindex="1" dir="ltr" size="40" value="" name="htmldata[hometitle]" class="bginput" /></td>
</tr>
<tr valign="top">
	<td class="alt1">' . $this->phrase['install']['bburl'] . '
		<span id="htmldata[bburl]_error" class="usererror hidden">' . $this->phrase['install']['field_required'] . '</span>
	</td>
	<td class="alt1"><input type="text" tabindex="1" dir="ltr" size="40" value="' . $vboptions['bburl'] . '" name="htmldata[bburl]" class="bginput" vbrequire="1" /></td>
</tr>
<tr valign="top">
	<td class="alt2">' . $this->phrase['install']['homeurl'] . '
		<span id="htmldata[homeurl]_error" class="usererror hidden">' . $this->phrase['install']['field_required'] . '</span>
	</td>
	<td class="alt2"><input type="text" tabindex="1" dir="ltr" size="40" value="' . $vboptions['homeurl'] . '" name="htmldata[homeurl]" class="bginput" vbrequire="1" /></td>
</tr>
<tr valign="top">
	<td class="alt1">' . $this->phrase['install']['webmasteremail'] . '
		<span id="htmldata[webmasteremail]_error" class="usererror hidden">' . $this->phrase['install']['field_required'] . '</span>
	</td>
	<td class="alt1"><input type="text" tabindex="1" dir="ltr" size="40" value="' . $webmaster . '" name="htmldata[webmasteremail]" class="bginput" vbrequire="1" /></td>
</tr>
</tbody></table>';
        return array('html' => $html, 'width' => '640px', 'hidecancel' => true, 'title' => $this->phrase['install']['general_settings'], 'reset' => true);
    }
示例#2
0
		print_cp_footer();
	}

	// Enable fulltext search for new installs
	$vbulletin->options['fulltextsearch'] = 1;

	if ($vbulletin->GPC['cookiepath_other'] AND $vbulletin->GPC['cookiepath_value'])
	{
		$vbulletin->options['cookiepath'] = $vbulletin->GPC['cookiepath_value'];
	}
	if ($vbulletin->GPC['cookiedomain_other'] AND $vbulletin->GPC['cookiedomain_value'])
	{
		$vbulletin->options['cookiedomain'] = $vbulletin->GPC['cookiedomain_value'];
	}

	$gdinfo = fetch_gdinfo();
	if ($gdinfo['version'] >= 2)
	{
		if ($gdinfo['freetype'] == 'freetype')
		{
			$vbulletin->options['regimagetype'] = 'GDttf';
		}
	}
	else
	{
		$vbulletin->options['hv_type'] = '0';
		$vbulletin->options['regimagetype'] = '';
	}

	if (empty($gdinfo['version']))
	{
示例#3
0
 /**
  * Step #96
  *
  */
 function step_96()
 {
     if ($this->db->query_first("SELECT varname FROM " . TABLE_PREFIX . "setting WHERE varname = 'regimagetype' AND value IN ('GDttf', 'GD')")) {
         require_once DIR . '/includes/adminfunctions_options.php';
         $gdinfo = fetch_gdinfo();
         if ($gdinfo['freetype'] != 'freetype') {
             // they won't be able to use the simple text version and they don't have FreeType support, so no image verification
             $this->run_query(sprintf($this->phrase['vbphrase']['update_table'], TABLE_PREFIX . 'setting'), "INSERT IGNORE INTO " . TABLE_PREFIX . "setting\n\t\t\t\t\t\t(varname, grouptitle, value, volatile, product)\n\t\t\t\t\tVALUES\n\t\t\t\t\t\t('hv_type', 'version', '0', 1, 'vbulletin')");
             $this->add_adminmessage('after_upgrade_37_image_verification_disabled', array('dismissable' => 1, 'script' => 'verify.php', 'action' => '', 'execurl' => 'verify.php', 'method' => 'get', 'status' => 'undone'));
         } else {
             $this->skip_message();
         }
     } else {
         $this->skip_message();
     }
 }