public function execute() { $user = GWF_User::getStaticOrGuest(); GWF_Website::addJavascriptInline($this->getInlineJS($user)); $tVars = array('worlds' => $this->getWorlds($user)); GWF3::setDesign('jqmsl4'); return $this->module->template('shadowclient.tpl', $tVars); }
public function templateReplay(GWF_AuditLog $log) { GWF_Website::addJavascriptInline('var al_script=' . $log->getAjaxScript() . ';'); GWF_Website::addJavascriptInline('var al_times=' . $log->getAjaxTimes() . ';'); GWF_Website::addJavascriptOnload('alReplay();'); $tVars = array('log' => $log); return $this->module->template('replay.tpl', $tVars); }
public function execute() { if (false !== ($error = $this->sanitize())) { return $error; } GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi'); GWF_Website::addJavascriptInline('google.load("language", "1");'); GWF_Website::setPageTitle($this->pm->display('pm_title')); return $this->templateShow(Common::getGet('translate') !== false); }
public function execute() { GWF_ForumBoard::init(true); if (false !== ($error = $this->sanitize())) { return $error; } GWF_Website::addJavascript(GWF_WEB_ROOT . 'js/module/Forum/gwf_forum.js'); if ($this->module->cfgUseGTranslate()) { GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi'); GWF_Website::addJavascriptInline('google.load("language", "1");'); } GWF_Website::setPageTitle($this->module->lang('pt_thread', array($this->thread->getBoard()->getVar('board_title'), $this->thread->getVar('thread_title')))); return $this->templateThread(); }
public function includeAjaxLang($iso = NULL) { GWF_Website::addJavascriptInline('var LANG_' . $this->getName() . ' = ' . json_encode($this->getLang()->getTrans($iso)) . ';'); }
<?php #https://embed.mibbit.com/?server=storm.psych0tik.net%3A%2B6697&channel=%23hbh&forcePrompt=true GWF_Website::addJavascript(GWF_WEB_ROOT . 'js/module/Chat/gwf_mibbit.js?v=1'); GWF_Website::addJavascriptInline("window.onload=gwfMibbitInit; window.onresize=gwfMibbitInit;"); ?> <h1><?php echo $tLang->lang('pt_irc_chat') . ' ( ' . GWF_HTML::display($tVars['module']->cfgIRCURL()) . ' )'; ?> </h1> <?php $buttons = ''; if ($tVars['gwf_chat']) { $buttons .= GWF_Button::generic($tLang->lang('btn_webchat'), $tVars['href_webchat'], 'generic', '', false); } if ($tVars['mibbit']) { $mib_url = $tVars['mibbit_url']; $onclick = "window.open('{$mib_url}', 'dummyname', 'height=undefined,width=undefined', false);"; $buttons .= GWF_Button::generic($tLang->lang('btn_ircchat'), $tVars['href_ircchat'], 'generic', '', true); $buttons .= GWF_Button::generic($tLang->lang('btn_ircchat_full'), '#', 'generic', '', false, $onclick); } if ($buttons !== '') { echo '<div class="gwf_buttons_outer">' . GWF_HTML::div($buttons, 'gwf_buttons') . '</div>' . PHP_EOL; } ?> <iframe id="gwf_mibbit" src="<?php echo $tVars['mibbit_url']; ?>
$convert[] = $msg->getVar('chatmsg_time'); } $jsaPub = GWF_Javascript::toJavascriptArray($convert); $convert = array(); foreach ($tVars['privmsgs'] as $msg) { $convert[] = $msg->getVar('chatmsg_time'); } $jsaPriv = GWF_Javascript::toJavascriptArray($convert); $convert = array(); foreach ($tVars['online'] as $online) { $convert[] = $online->display('chaton_name'); } $onlinelist = GWF_Javascript::toJavascriptArray($convert); ?> <?php if (GWF_Browser::isGecko()) { $script_html = 'window.onload = function() { '; $script_html .= sprintf('gwfchatInit(%d, %d, "%s", %d, %s);' . PHP_EOL, $tVars['maxmsg_pub'], $tVars['maxmsg_priv'], $tVars['nickname'], $tVars['peaktime'], $onlinelist); $script_html .= sprintf('gwfchatInitPub(%s);' . PHP_EOL, $jsaPub); $script_html .= sprintf('gwfchatInitPriv(%s);' . PHP_EOL, $jsaPriv); $script_html .= '};'; } else { $script_html = 'window.onload = function() { '; $script_html .= sprintf('gwfchatInitLaggy(%d, %d, "%s", %d, %s, %d);' . PHP_EOL, $tVars['maxmsg_pub'], $tVars['maxmsg_priv'], $tVars['nickname'], $tVars['peaktime'], $onlinelist, $tVars['lagtime']); $script_html .= sprintf('gwfchatInitPub(%s);' . PHP_EOL, $jsaPub); $script_html .= sprintf('gwfchatInitPriv(%s);' . PHP_EOL, $jsaPriv); $script_html .= '};'; } GWF_Website::addJavascriptInline($script_html);