本文整理汇总了PHP中GWF_Website::addJavascriptInline方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Website::addJavascriptInline方法的具体用法?PHP GWF_Website::addJavascriptInline怎么用?PHP GWF_Website::addJavascriptInline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_Website
的用法示例。
在下文中一共展示了GWF_Website::addJavascriptInline方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
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);
}
示例2: templateReplay
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);
}
示例3: execute
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);
}
示例4: execute
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();
}
示例5: includeAjaxLang
public function includeAjaxLang($iso = NULL)
{
GWF_Website::addJavascriptInline('var LANG_' . $this->getName() . ' = ' . json_encode($this->getLang()->getTrans($iso)) . ';');
}
示例6:
<?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'];
?>
示例7: array
$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);