예제 #1
0
파일: profile.php 프로젝트: holandacz/nb4
        $usercss->save();
        $vbulletin->url = "profile.php?" . $vbulletin->session->vars['sessionurl'] . "do=customize";
        eval(print_standard_redirect('usercss_saved'));
    } else {
        if (!empty($usercss->error)) {
            standard_error(implode("<br />", $usercss->error));
        } else {
            // have invalid, no errors
            $_REQUEST['do'] = 'customize';
            define('HAVE_ERRORS', true);
        }
    }
}
// #######################################################################
if ($_REQUEST['do'] == 'customize') {
    $cssdisplayinfo = $usercss->build_display_array();
    $errors = '';
    // if we don't have errors, the displayed values are the existing ones
    // otherwise, use the form submission
    if (!defined('HAVE_ERRORS')) {
        $selectors_saved = $usercss->existing;
    }
    ($hook = vBulletinHook::fetch_hook('profile_customize_start')) ? eval($hook) : false;
    $usercssbits = '';
    foreach ($cssdisplayinfo as $selectorname => $selectorinfo) {
        $selector = $selector_base;
        $selectorinvalid = array();
        $field_names = array();
        $invalidpropertyphrases = array();
        if (empty($selectorinfo['properties'])) {
            $selectorinfo['properties'] = $usercss->cssedit["{$selectorname}"]['properties'];
예제 #2
0
	/**
	* Build an array of information about how to display the user CSS editor page
	*
	* @return	array
	*/
	function build_display_array()
	{
		$display = parent::build_display_array();

		$display['entryposter'] = array(
			'phrasename' => 'usercss_entryposter',
			'properties' => array(
				'background_color',
				'background_image',
				'background_repeat',
				'color',
				'linkcolor' => 'entryposter_a'
			)
		);

		return $display;
	}