Use script() to write out javascript <script> tags
This commit is contained in:
parent
9a9195ecd8
commit
5ba3383665
|
@ -56,10 +56,7 @@ class FBC_XDReceiverAction extends Action
|
||||||
'lang' => $language));
|
'lang' => $language));
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
$this->element('title', null, 'cross domain receiver page');
|
$this->element('title', null, 'cross domain receiver page');
|
||||||
$this->element('script',
|
$this->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js');
|
||||||
array('src' =>
|
|
||||||
'http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js',
|
|
||||||
'type' => 'text/javascript'), '');
|
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->elementEnd('body');
|
$this->elementEnd('body');
|
||||||
|
|
|
@ -144,11 +144,7 @@ class FBConnectPlugin extends Plugin
|
||||||
function onEndShowFooter($action)
|
function onEndShowFooter($action)
|
||||||
{
|
{
|
||||||
if ($this->reqFbScripts($action)) {
|
if ($this->reqFbScripts($action)) {
|
||||||
|
$action->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php');
|
||||||
$action->element('script',
|
|
||||||
array('type' => 'text/javascript',
|
|
||||||
'src' => 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'),
|
|
||||||
'');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,9 +84,7 @@ class RealtimePlugin extends Plugin
|
||||||
$scripts = $this->_getScripts();
|
$scripts = $this->_getScripts();
|
||||||
|
|
||||||
foreach ($scripts as $script) {
|
foreach ($scripts as $script) {
|
||||||
$action->element('script', array('type' => 'text/javascript',
|
$action->script($script);
|
||||||
'src' => $script),
|
|
||||||
' ');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
@ -201,8 +199,8 @@ class RealtimePlugin extends Plugin
|
||||||
|
|
||||||
function _getScripts()
|
function _getScripts()
|
||||||
{
|
{
|
||||||
return array(common_path('plugins/Realtime/realtimeupdate.js'),
|
return array('plugins/Realtime/realtimeupdate.js',
|
||||||
common_path('plugins/Realtime/json2.js'));
|
'plugins/Realtime/json2.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
function _updateInitialize($timeline, $user_id)
|
function _updateInitialize($timeline, $user_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user