$twig->addGlobal('image_corporation', $imageServer . 'Corporation/'); $twig->addGlobal('image_alliance', $imageServer . 'Alliance/'); $twig->addGlobal('image_item', $imageServer . 'Type/'); $twig->addGlobal('image_ship', $imageServer . 'Render/'); $twig->addGlobal('tqStatus', $redis->get('tqStatus')); $twig->addGlobal('tqCount', $redis->get('tqCount')); $twig->addGlobal('siteurl', $baseAddr); $twig->addGlobal('fullsiteurl', $fullAddr); $twig->addGlobal('requesturi', $_SERVER['REQUEST_URI']); $twig->addGlobal('topad', Google::ad($topCaPub, $topAdSlot, $adWidth = 728, $adHeight = 90)); $twig->addGlobal('bottomad', Google::ad($bottomCaPub, $bottomAdSlot, $adWidth = 728, $adHeight = 90)); $twig->addGlobal('mobiletopad', Google::ad($topCaPub, $topAdSlot, $adWidth = 320, $adHeight = 50)); $twig->addGlobal('mobilebottomad', Google::ad($bottomCaPub, $bottomAdSlot, $adWidth = 320, $adHeight = 50)); $twig->addGlobal('igbtopad', Google::ad($topCaPub, $topAdSlot, $adWidth = 728, $adHeight = 90)); $twig->addGlobal('igbbottomad', Google::ad($bottomCaPub, $bottomAdSlot, $adWidth = 728, $adHeight = 90)); $twig->addGlobal('analytics', Google::analytics($analyticsID, $analyticsName)); $disqus &= UserConfig::get('showDisqus', true); $twig->addGlobal('disqusLoad', $disqus); $noAdPages = array('/account/', '/moderator/', '/ticket', '/register/', '/information/', '/login'); foreach ($noAdPages as $noAdPage) { $showAds &= !Util::startsWith($uri, $noAdPage); $showAds &= $userShowAds; } $twig->addglobal('showAnalytics', $showAnalytics); if ($disqus) { $twig->addGlobal('disqusShortName', $disqusShortName); } if ($disqusSSO) { $twig->addglobal('disqusSSO', Disqus::init()); } // User's account balance