function display() { parent::display(); $config = \ManiaHost\Config::getInstance(); if (static::$showBackground) { $ui = new Quad(320, 180); $ui->setAlign('center', 'center'); $ui->setImage($config->background, true); $ui->setPosZ(-3); $ui->save(); } $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl('manialib.xml', false); $ui->save(); Manialink::beginFrame(110, -81, 0.1); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $query = array(); $query['url'] = \ManiaLib\Application\Config::getInstance()->manialink; $query['name'] = $config->appName; $ui->setUrl('http://maniahome.maniaplanet.com/add/?' . http_build_query($query, '', '&')); $ui->save(); Manialink::endFrame(); }
Manialink::beginFrame(-100, -83, 0.2); $ui = new Label(175); $ui->setValign('center2'); $ui->setPosition(3, -3.5, 0); $ui->setScale(0.75); $ui->setStyle(Label::TextInfoSmall); $ui->setText(sprintf('$<$000%s$> is proudly powered by $l[http://wordpress.org/]WordPress$l and $l[http://code.google.com/p/maniapress/]ManiaPress$l.', maniapress_get_bloginfo('name'))); $ui->save(); if (maniapress_get_option('manialink')) { Manialink::beginFrame(150, 1.5, 0.1); $params['url'] = maniapress_get_option('manialink'); if (maniapress_get_option('manialink-name')) { $params['name'] = maniapress_get_option('manialink-name'); } $url = 'http://maniahome.maniaplanet.com/add/?' . http_build_query($params); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl($url); $ui->save(); Manialink::endFrame(); } Manialink::beginFrame(188, -1, 0.1); $ui = new Icons64x64_1(5); $ui->setSubStyle(Icons64x64_1::ToolUp); $ui->setScriptEvents(); $ui->setId('view-external'); //$ui->setUrl(ManiaLib\Utils\URI::getCurrent()); $ui->save(); UI::tooltip('view-external', 'Visit the Website'); Event::addListener('view-external', Event::mouseClick, array(Action::external, \ManiaLib\Utils\URI::getCurrent())); $ui = new Icons64x64_1(5); $ui->setPosition(5.5);
* @see http://code.google.com/p/maniapress/ * @copyright Copyright (c) 2011-2012 NADEO (http://www.nadeo.com) * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3 * @version $Revision$: * @author $Author$: * @date $Date$: */ use ManiaLib\Gui\Manialink; use ManiaLib\Gui\Cards\Panel; use ManiaLib\Gui\Elements\Label; use ManiaLib\Gui\Elements\Quad; use ManiaLib\Gui\Elements\Icons128x128_1; use ManiaLib\Gui\Elements\Icons64x64_1; use ManiaLib\Gui\Elements\UIConstructionSimple_Buttons; Manialink::load(); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl('manialib.xml', false); $ui->save(); \ManiaLib\ManiaScript\Main::begin(); $background = maniapress_get_option('theme-background'); $ui = new Quad(320, 180); $ui->setAlign('center', 'center'); if ($background) { if (ctype_xdigit($background) && strlen($background) < 4) { $ui->setBgcolor($background); } else { $ui->setImage($background, true); } } else { $ui->setImage('bg.jpg'); }