skinname = 'smfcurve'; $this->stylename = 'smfcurve'; $this->template = 'smfcurveTemplate'; $this->useHeadElement = true; } /*var $skinname = 'SMF_Curve'; var $stylename = 'SMF_Curve'; var $template = 'SMF_CurveTemplate'; var $useHeadElement = true;*/ function setupSkinUserCss (OutputPage $out) { global $wgHandheldStyle; parent::setupSkinUserCss($out); // Append to the default screen common & print styles... $out->addStyle('smfcurve/main.css', 'screen'); if ($wgHandheldStyle) $out->addStyle($wgHandheldStyle, 'handheld'); $out->addStyle('smfcurve/IE50Fixes.css', 'screen', 'lt IE 5.5000'); $out->addStyle('smfcurve/IE55Fixes.css', 'screen', 'IE 5.5000'); $out->addStyle('smfcurve/IE60Fixes.css', 'screen', 'IE 6'); $out->addStyle('smfCurve/IE70Fixes.css', 'screen', 'IE 7'); $out->addStyle('smfcurve/rtl.css', 'screen', '', 'rtl'); // This file contains all the changes we have done to curve and css we need around the entire site and forum. $out->addStyle('http://www.simplemachines.org/community/Themes/smsite2/css/smsite.css', 'screen', ''); } } class smfcurveTemplate extends QuickTemplate { var $skin; function execute () { global $wgRequest, $imagesurl; $this->skin = $skin = $this->data['skin']; $action = $wgRequest->getText('action'); // Suppress warnings to prevent notices about missing indexes in $this->data //wfSuppressWarnings(); $this->html('headelement'); echo '
html('userlangattributes'), '>

User Info

html('userlangattributes') , '>'; foreach ($this->data['personal_urls'] as $key => $item) { echo '
  • tooltipAndAccesskey('pt-' . $key), (!empty($item['class']) ? ' class="' . htmlspecialchars($item['class']) . '"' : ''), '>', htmlspecialchars($item['text']), '
  • '; } echo '

    '; $sidebar = $this->data['sidebar']; if (!isset($sidebar['SEARCH'])) $sidebar['SEARCH'] = true; if (!isset($sidebar['TOOLBOX'])) $sidebar['TOOLBOX'] = true; if (!isset($sidebar['LANGUAGES'])) $sidebar['LANGUAGES'] = true; foreach ($sidebar as $boxName => $cont) { if ($boxName === 'SEARCH') $this->searchBox(); elseif ($boxName === 'TOOLBOX') $this->toolbox(); elseif ($boxName === 'LANGUAGES') $this->languageBox(); else $this->customBox($boxName, $cont); } echo '
    html('specialpageattributes') , '> ', ($this->data['sitenotice'] ? '
    ' . $this->html('sitenotice') . '
    ' : ''), '

    ', $this->html('title'), '

    ', $this->msg_ret('tagline'), '

    html('userlangattributes'), '>', $this->html('subtitle'), '
    ', ($this->data['undelete'] ? '
    ' . $this->html('undelete') . '
    ' : ''), ($this->data['newtalk'] ? '
    ' . $this->html('newtalk') . '
    ' : ''), ($this->data['showjumplinks'] ? ' ' : ''), $this->html('bodytext'), ($this->data['catlinks'] ? $this->html('catlinks') : ''), '

    ', ($this->data['dataAfterContent'] ? $this->html ('dataAfterContent') : '') , '

    ', $this->html('bottomscripts') /* JS call to runBodyOnloadHook */ , ' ', $this->html('reporttime'), ' ', ($this->data['debug'] ? ' ' : ''), ' '; //wfRestoreWarnings(); } // end of execute() method function template_search_box() { global $wgUseTwoButtonsSearchForm; echo '
    ', Html::input('search', (isset($this->data['search']) ? $this->data['search'] : ''), 'search', array( 'id' => 'searchInput', 'title' => $this->skin->titleAttrib('search'), 'accesskey' => $this->skin->accesskey('search') )), ' skin->tooltipAndAccesskey('search-go'), ' />'; if ($wgUseTwoButtonsSearchForm) echo '  skin->tooltipAndAccesskey('search-fulltext') . ' />'; else echo '
    '; echo '
    '; } // Search Box function searchBox () { global $wgUseTwoButtonsSearchForm; echo '

    Search

    ', Html::input( 'search', isset($this->data['search']) ? $this->data['search'] : '', 'search', array( 'id' => 'searchInput', 'title' => $this->skin->titleAttrib('search'), 'accesskey' => $this->skin->accesskey('search') ) ), '

    skin->tooltipAndAccesskey('search-go'), ' />', ($wgUseTwoButtonsSearchForm ? '  skin->tooltipAndAccesskey('search-fulltext') . ' />' : '
    '), '

    '; } /*************************************************************************************************/ function toolbox () { echo '

    ', $this->msg_ret('toolbox'), '


    '; } /*************************************************************************************************/ function languageBox () { if(!$this->data['language_urls']) return; echo ' html('userlangattributes'), ' class="catbg">', $this->msg_ret('otherlanguages'), '

    '; } /*************************************************************************************************/ function customBox ($bar, $cont) { $out = wfMsg($bar); echo '

    ', (wfEmptyMsg($bar, $out) ? htmlspecialchars($bar) : htmlspecialchars($out)), '

    skin->tooltip('p-' . $bar), '> '; if (is_array($cont)) { echo ' '; } else // allow raw HTML block to be defined by extensions echo $cont; echo '

    '; } // Why is there no function that does what msg() does but returns it? function msg_ret ($str) { return htmlspecialchars($this->translator->translate($str)); } // Same thing for text()! function text_ret ($str) { return htmlspecialchars($this->data[$str]); } function site_menu() { global $wgSMFPath, $user_settings, $context, $scripturl, $txt, $user_info, $sourcedir, $section, $menulink; // Setup our menu stuff. $section = $menulink = 'wiki'; require_once($wgSMFPath . '/Settings.php'); require_once($sourcedir . '/Subs-Site.php'); require_once($wgSMFPath . '/Themes/smsite2/languages/Site.english.php'); // First, try our SMF groups. $user_info['groups'] = !empty($user_settings['smf_groups']) ? $user_settings['smf_groups'] : array(); $scripturl = 'http://www.simplemachines.org/community/index.php'; // Now call our menu. setupSiteMenuContext(); echo ' '; } // Show me the money! function show_ad() { global $context; if (!file_exists('/home/sites/adsystem.simplemachines.org/public_html/www/delivery/alocal.php')) return; echo '
    '; // // No need to switch really. $zone = 3; // Uncomment this during an openx upgrade. // !! THIS IS LIKE THIS UNTIL WIKI IS TRUELY LIVE SO WE DON'T WASTE AD SPACE HERE. // $zone = -1; if ($zone == -1) echo 'Advertise with us!'; else { // It seems phpAdNews will use a combat code for register globals, the problem is that it allows $_GET['context']. $oldContext = $context; define('MAX_PATH', '/home/sites/adsystem.simplemachines.org/public_html'); if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) { if (!isset($phpAds_context)) $phpAds_context = array(); $phpAds_raw = view_local('', $zone, 0, 0, '', '', '0', $phpAds_context, ''); } echo '', $phpAds_raw['html']; // Revert! $context = $oldContext; } echo '
    '; // Fix the timezone because OpenX doesn't reset it. date_default_timezone_set('America/New_York'); } } // end of class