Skip to content

Commit

Permalink
iFlyChat Oxwall - lazy load from cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Lakhera authored and Vivek Lakhera committed Nov 27, 2014
1 parent 37ed69b commit a81d4d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Binary file modified .DS_Store
Binary file not shown.
21 changes: 9 additions & 12 deletions components/toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,20 @@ public function render()
'smileyURL' => OW::getPluginManager()->getPlugin('iflychat')->getStaticUrl() . 'smileys/very_emotional_emoticons-png/png-32x32/',
'addUrl' => '',
'notificationSound' => $obj->params('iflychat_notification_sound'),
'exurl' => OW::getRouter()->getBaseUrl().'iflychat/iflychat/auth',
'geturl' => OW::getRouter()->getBaseUrl().'iflychat/iflychat/auth',
'mobileWebUrl' => OW::getRouter()->getBaseUrl().'iflychat/iflychat/mobileauth',
'soffurl' => '',
'chat_type' => $obj->params('iflychat_show_admin_list'),
'guestPrefix' => $obj->params('iflychat_anon_prefix'),
'changeurl' => OW::getRouter()->getBaseUrl().'iflychat/iflychat/changeguestname',
'allowSmileys' => $obj->params('iflychat_enable_smileys'),
'admin' => $obj->iflychat_check_chat_admin()?'1':'0'

'admin' => $obj->iflychat_check_chat_admin()?'1':'0',
'theme' => $iflychat_theme,
);
if($obj->iflychat_check_chat_admin()) {

$iflychat_settings['arole'] = $obj->roleArray();;


}



$iflychat_settings['iup'] = $obj->params('iflychat_user_picture');
if($obj->params('iflychat_user_picture')==1) {
$iflychat_settings['default_up'] = OW::getPluginManager()->getPlugin('iflychat')->getStaticUrl() . 'themes/' . $iflychat_theme . '/images/default_avatar.png';
Expand Down Expand Up @@ -139,8 +134,6 @@ public function render()
$iflychat_settings['text_support_chat_init_label_off'] = $obj->params('iflychat_support_chat_init_label_off');
}
$iflychat_settings['open_chatlist_default'] = ($obj->params('iflychat_minimize_chat_user_list')==2)?'1':'2';


$iflychat_settings['useStopWordList'] = $obj->params('iflychat_use_stop_word_list');
$iflychat_settings['blockHL'] = $obj->params('iflychat_stop_links');
$iflychat_settings['allowAnonHL'] = $obj->params('iflychat_allow_anon_links');
Expand All @@ -149,8 +142,12 @@ public function render()
$iflychat_settings['text_search_bar'] = $language->text('iflychat','MOD_TYPE_HERE_TO_SEARCH');

if($obj->iflychat_path_check()){
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('iflychat')->getStaticJsUrl() . 'iflychat.js');
OW::getDocument()->addScriptDeclarationBeforeIncludes("Drupal={};Drupal.settings={};Drupal.settings.drupalchat=" . json_encode($iflychat_settings).";\n ");
if(($obj->params('iflychat_show_admin_list') == 1)) {
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('iflychat')->getStaticJsUrl() . 'ba-emotify.js');
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('iflychat')->getStaticJsUrl() . 'jquery.titlealert.min.js');
}
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('iflychat')->getStaticJsUrl() . 'iflychat.min.js');
OW::getDocument()->addScriptDeclarationBeforeIncludes("iflychat = " . json_encode($iflychat_settings).";\n ");
OW::getDocument()->addScriptDeclarationBeforeIncludes('window.my_var_handle ="' . OW::getPluginManager()->getPlugin('iflychat')->getStaticUrl() . '"');
return parent::render();
} }
Expand Down
1 change: 1 addition & 0 deletions static/js/iflychat.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a81d4d0

Please sign in to comment.