本帖最后由 yvsm 于 2009-4-14 10:57 编辑
WEBIM让您的UC Home拥有校内网、Facebook一样的WEBIM!(已去除错误提示!)
(本人可代为安装,收费2元!)
什么是WEBIM?
下载地址:http://all.58blog.net/down/Code/PHP/2009/0216/580.html
WEBIM是为UCenter Home专门开发的WEB即时通信系统,可以让UC Home拥有搜狐小纸条、校内网、Facebook一样WEBIM。
新版演示地址
http://www.58blog.net
新版功能特点
WEBIM与搜狐小纸条、校内通、Facebook IM的功能类似,实现UC Home好友间的在线聊天;WEBIM新版主要拓展了WEBIM服务器容量,实现100万并发用户支持。
安装步骤:
1. 修改config_im.php的参数设置:
// MySQL Database Configuration
$sql_user = 'admin'; //数据库用户
$sql_pass = '58blog.net'; //数据库密码
$sql_host = 'localhost';
$sql_db = '58blog'; //数据库
// This is the prefix for the ajax im MySQL tables -- this can usually be left alone.
// (If upgrading from a version < 3.1, set the prefix to '')
define('UC_PREFIX', 'uc_'); //uc的前缀
define('SQL_PREFIX', 'uchome_'); //uchome的前缀
$maxBuddyIconSize = 1000;
3.上传程序到根目录
在浏览器中打开以下网址安装数据表
/install.php 安装完后请删除此文件!
4. 打开 /template/default/header.htm 加入红色的部份
找到<script language="javascript" type="text/javascript" src="source/script_face.js"></script>后面添加:- <script src="/js/prototype.js" type="text/javascript"></script>
- <script src="/js/effects.js" type="text/javascript"></script>
- <script src="/js/window.js" type="text/javascript"></script>
- <script src="/js/sm2.js" type="text/javascript"></script>
- <script src="/js/utils.js" type="text/javascript"></script>
- <script src="/js/config.js" type="text/javascript"></script>
- <script src="/js/im.basic.js" type="text/javascript"></script>
- <script src="/js/ajax_im.js" type="text/javascript"></script>
- <script >
- function isgoodok(){return true;}
- window.onerror=isgoodok;
- </script>
复制代码 在导航的地方插入:- <a href="#" onclick="javascript:System.login('$_SGLOBAL[supe_username]','qwe');">IM 聊天</a>
复制代码 5. 打开 /template/default/footer.htm 加入红色的部份
在</body>前面加入:- <div align="left">
- <div id="modal" style="display:none;" align="left">
- <div id="loginDialog" style="display:none;" align="left">
- <p style="display:none;"><span id="login_error_msg" class="dialog_error" style="display:none"> </span></p>
- <p style="display:none;" > <span class="dialog_input"><input type="text" id="username" style="display:block" /></span></p>
- <div style="clear:both"></div>
- <p style="display:none;" ><span class="dialog_label lang-password langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="password" onfoucs="this.select();" onkeypress="System.keyHandler(event, System.login);" /></span></p>
- <div style="clear:both;display:none;"></div>
- <p style="display:none;" >
- <span id="login_dialog_links" class="dialog_links" style="width:285px;" onselectstart="return false;" onmousedown="return false;" style="display:block" >
- <a href="#" class="stdButton lang-signOn" id="signon_button" onclick="System.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- <a href="#" class="stdButton lang-register registerObject" onclick="Dialogs.register();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- <a href="#" class="stdButton lang-forgotPassword langinsert-pre" onclick="Dialogs.forgotPass();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"> </a>
- </span>
- </p>
- <div style="clear:both;display:none;"></div>
- </div>
- <div id="registerDialog" class="registerObject" style="display:none;" align="left">
- <p><span class="dialog_modal_title lang-register"></span></p>
- <div style="clear:both;display:none;"></div>
- <p><span id="register_error_msg" class="dialog_error" style="display:none"> </span></p>
- <div style="clear:both;display:none;"></div>
- <p><span class="dialog_label lang-username langinsert-pre">:</span> <span class="dialog_input"><input type="text" id="newusername" onkeypress="System.keyHandler(event, System.register);" /></span></p>
- <div style="clear:both;display:none;"></div>
- <p><span class="dialog_label lang-password langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="newpassword" onkeypress="System.keyHandler(event, System.register);" /></span></p>
- <div style="clear:both;display:none;"></div>
- <p><span class="dialog_label lang-confirm langinsert-pre">:</span> <span class="dialog_input"><input type="password" id="newpassword2" onkeypress="System.keyHandler(event, System.register);" /></span></p>
- <div style="clear:both"style="display:none;"></div>
- <p><span class="dialog_label lang-email langinsert-pre">:</span> <span class="dialog_input"><input type="text" id="newemail" onkeypress="System.keyHandler(event, System.register);" /></span></p>
- <div style="clear:both;display:none;"></div>
- <p>
- <span class="dialog_links" style="width:190px;" onselectstart="return false;" onmousedown="return false;">
- <a href="#" class="stdButton lang-register" id="register_button" onclick="System.register();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- <a href="#" class="stdButton lang-cancel" onclick="Dialogs.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- </span>
- </p>
- <div style="clear:both;display:none;"></div>
- </div>
-
- <div id="forgotPassDialog" style="display:none;" align="left">
- <p><span class="dialog_modal_title lang-passwordReset"></span></p>
- <div style="clear:both;display:none;"></div>
- <p><span id="forgotpass_error_msg" class="dialog_error" style="display:none"> </span></p>
- <div style="clear:both;display:none;"></div>
- <p><span class="dialog_label lang-emailAddress langinsert-pre">: </span> <span class="dialog_input"><input type="text" id="resetto" onkeypress="System.keyHandler(event, System.resetPass);" /></span></p>
- <div style="clear:both;display:none;"></div>
- <p>
- <span class="dialog_links" style="width:190px;" onselectstart="return false;" onmousedown="return false;" style="display:none;">
- <a href="#" class="stdButton lang-reset" id="forgotpass_button" onclick="System.resetPass();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- <a href="#" class="stdButton lang-cancel" onclick="Dialogs.login();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);"></a>
- </span>
- </p>
- <div style="clear:both;display:none;"></div>
- </div>
- </div>
- <div class="itemList" id="statusList" style="display:none;" align="left">
- <a href="#" class="lang-available langinsert-post" onclick="Status.set(0, Languages.get('available'));return false;"><img src="/themes/dark/online.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-friendsOnly langinsert-post" style="border-bottom: 1px solid #bfbcb8;" onclick="Status.set(99, Languages.get('friendsOnly'));return false;"><img src="/themes/dark/online.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-busy langinsert-post" onclick="Status.set(1, Languages.get('busy'));return false;"><img src="/themes/dark/away.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-beBackLater langinsert-post" onclick="Status.set(1, Languages.get('beBackLater'));return false;"><img src="/themes/dark/away.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-away langinsert-post" onclick="Status.set(1, Languages.get('away'));return false;"><img src="/themes/dark/away.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-custom langinsert-post" id="customMessage" style="border-top: 1px solid #bfbcb8;" onclick="Status.customAway();$('statusList').style.display='none';return false;"><img src="/themes/dark/away.png" style="border:0;" alt="" title="" /> </a>
- <a href="#" class="lang-invisible langinsert-post" style="border-top: 1px solid #bfbcb8;" onclick="Status.set(49, Languages.get('invisible'));return false;"><img src="/themes/dark/offline.png" style="border:0;" alt="" title="" /> </a>
- </div>
- <div class="itemList" id="fontsList" style="display:none;" align="left">
- <a href="#" onclick="IM.active.setFont('宋体');return false;">宋体</a>
- <a href="#" onclick="IM.active.setFont('楷体');return false;">楷体</a>
- <a href="#" onclick="IM.active.setFont('隶书');return false;">隶书</a>
- <a href="#" onclick="IM.active.setFont('黑体');return false;">黑体</a>
- <a href="#" onclick="IM.active.setFont('Arial');return false;">Arial</a>
- <a href="#" onclick="IM.active.setFont('Comic Sans MS');return false;">Comic Sans MS</a>
- <a href="#" onclick="IM.active.setFont('Courier New');return false;">Courier New</a>
- <a href="#" onclick="IM.active.setFont('Garamond');return false;">Garamond</a>
- <a href="#" onclick="IM.active.setFont('Georgia');return false;">Georgia</a>
- <a href="#" onclick="IM.active.setFont('Impact');return false;">Impact</a>
- <a href="#" onclick="IM.active.setFont('Tahoma');return false;">Tahoma</a>
- <a href="#" onclick="IM.active.setFont('Times New Roman');return false;">Times New Roman</a>
- <a href="#" onclick="IM.active.setFont('Verdana');return false;">Verdana</a>
- </div>
- <div class="itemList" id="fontSizeList" oncontextmenu="return false;" style="display:none;" align="left">
- <a href="#" onclick="IM.active.setFontSize(8);return false;">8</a>
- <a href="#" onclick="IM.active.setFontSize(10);return false;">10</a>
- <a href="#" onclick="IM.active.setFontSize(12);return false;">12</a>
- <a href="#" onclick="IM.active.setFontSize(14);return false;">14</a>
- <a href="#" onclick="IM.active.setFontSize(16);return false;">16</a>
- <a href="#" onclick="IM.active.setFontSize(18);return false;">18</a>
- <a href="#" onclick="IM.active.setFontSize(20);return false;">20</a>
- <a href="#" onclick="IM.active.setFontSize(22);return false;">22</a>
- <a href="#" onclick="IM.active.setFontSize(24);return false;">24</a>
- </div>
- <div class="itemList" id="fontColorList" style="cursor: pointer;display:none;" align="left">
- <table class="tTable">
- <tr>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#000000;" onclick="IM.active.setFontColor('#000000');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b8b8b8;" onclick="IM.active.setFontColor('#b8b8b8');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#b4ad3b;" onclick="IM.active.setFontColor('#b4ad3b');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#bb5c54;" onclick="IM.active.setFontColor('#bb5c54');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#755a5c;" onclick="IM.active.setFontColor('#755a5c');"></td>
- </tr>
- <tr>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a9b5ef;" onclick="IM.active.setFontColor('#a9b5ef');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#d65a20;" onclick="IM.active.setFontColor('#d65a20');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#e39230;" onclick="IM.active.setFontColor('#e39230');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#a71334;" onclick="IM.active.setFontColor('#a71334');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#590099;" onclick="IM.active.setFontColor('#590099');"></td>
- </tr>
- <tr>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#d40088;" onclick="IM.active.setFontColor('#d40088');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#0030ac;" onclick="IM.active.setFontColor('#0030ac');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#676f11;" onclick="IM.active.setFontColor('#676f11');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#769321;" onclick="IM.active.setFontColor('#769321');"></td>
- <td class="colorItem" style="width:13px;height:13px;border:1px solid #000;background-color:#3966fe;" onclick="IM.active.setFontColor('#3966fe');"></td>
- </tr>
- </table>
- </div>
- <div class="itemList" id="divContext" oncontextmenu="return false;" style="display:none;" align="left">
- <a href="#" class="lang-contextGetInfo" onclick="Context.profile();return false;"></a>
- <a href="#" class="lang-contextIM" onclick="Context.createIM();return false;"></a>
- <a href="#" id="contextBlock" class="lang-contextBlock" onclick="Context.blockBuddy();return false;"></a>
- <a href="#" class="lang-contextRemove" onclick="Context.removeBuddy();return false;"></a>
- </div>
- <div id="languageList" style="display:none;" align="left">
- </div>
- </div>
复制代码 如有问题,请联系:www.58blog.net
不好意思,论坛限制了上传大小,我这边没法分卷所以就上传到自己的论坛了
http://bbs.58blog.net/viewthread.php?tid=504&extra=
|