Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

65 lines (57 sloc) 2.208 kB
<?php
header("Content-type: application/javascript");
include_once('common.php');
$menu = array();
if($_SCONFIG['my_status']) {
if(is_array($_SGLOBAL['userapp'])) {
foreach($_SGLOBAL['userapp'] as $value) {
$menu[] = array("title" => iconv(UC_DBCHARSET,'utf-8',$value['appname']),"icon" =>"http://appicon.manyou.com/icons/".$value['appid'],"link" => "userapp.php?id=".$value['appid']);
}
}
}
$setting = json_encode(setting());
?>
//custom
(function(webim){
var path = "plugins/";
var menu = webim.JSON.decode('<?php echo json_encode($menu) ?>');
webim.extend(webim.setting.defaults.data, webim.JSON.decode('<?php echo $setting ?>'));
var webim = window.webim;
webim.route( {
online: path + "im.php?webim_action=online&domain=webim20.cn",
offline: path + "im.php?webim_action=offline",
deactivate: path + "im.php?webim_action=refresh",
message: path + "im.php?webim_action=message",
presence: path + "im.php?webim_action=presence",
status: path + "im.php?webim_action=status",
setting: path + "im.php?webim_action=setting",
history: path + "im.php?webim_action=history",
clear: path + "im.php?webim_action=clear_history",
download: path + "im.php?webim_action=download_history",
members: path + "im.php?webim_action=members",
join: path + "im.php?webim_action=join",
leave: path + "im.php?webim_action=leave",
buddies: path + "im.php?webim_action=buddies",
notifications: path + "im.php?webim_action=notifications"
} );
webim.ui.emot.init({"dir": path + "webim/static/images/emot/default"});
var soundUrls = {
lib: path + "webim/static/assets/sound.swf",
msg: path + "webim/static/assets/sound/msg.mp3"
};
var ui = new webim.ui(document.body, {
soundUrls: soundUrls
}), im = ui.im;
ui.addApp("menu", {"data": menu});
//rm shortcut in uchome
//ui.layout.addShortcut( menu);
ui.addApp("buddy");
ui.addApp("room");
ui.addApp("notification");
ui.addApp("setting", {"data": webim.setting.defaults.data});
if(<?php echo var_export(!$_IMC['disable_chatlink']) ?>)ui.addApp("chatlink", {
link_wrap: document.getElementById("profilecontent")
});
ui.render();
im.autoOnline() && im.online();
})(webim);
Jump to Line
Something went wrong with that request. Please try again.