更改MSN聊天状态图标
我正在使用此技巧将 MSN Messenger 集成到我的网站:http://en.kioskea.net/faq/3987-integrate-msn-chat-on-your-website-or-blog 它显示一个带有当前 MSN 状态(在线、离开等)的图标。我想改变这些图像。是否可以?
I'm using this tip to integrate MSN Messenger to my Website: http://en.kioskea.net/faq/3987-integrate-msn-chat-on-your-website-or-blog
It shows an icon with the current MSN status (online, away and so on). I want to change these images. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我第一次回答这个问题时遇到了麻烦:
转到这里:
http://messenger.services.live.com/users/[电子邮件受保护]/presence图像?mkt=en -GB
会将您重定向到:
http://www.wlmessenger。 net/static/img/presence/Offline.gif
这使得检测状态变得更加容易!
我错过了。
我在这里查看:
http://settings.messenger.live.com/Applications/CreateHtml.aspx
我选择了“状态图标”选项,并得到了如下代码:
无论您的状态如何,图像的路径都保持不变。无法根据其更改图像状态通过纯 HTML/CSS/JS 在图像中返回(据我所知)。 (即使在我意识到它重定向之后)
我可以想到一种技术来做到这一点,
但这并不容易并且不太难,但是您必须使用服务器端语言,例如 PHP 或 ASP.NET。您可以将该代码更改为如下所示:
proxyMyMsnImage.php
将执行以下操作:HEAD
请求(或GET
,如果是这样)不起作用)在图像上(http://messenger.services.live.com/users/[email protected]/presenceimage?mkt=en-GB
)Offline.gif
) ,您可以发送您自己的状态图像版本以及正确的 MIME 类型,例如image/gif
。弄清楚如何检测您发送的状态图像是
最困难的部分现在非常简单。I made a snafu answering this the first time:
Going here:
http://messenger.services.live.com/users/[email protected]/presenceimage?mkt=en-GB
will redirect you to:
http://www.wlmessenger.net/static/img/presence/Offline.gif
which makes detecting the status a whole lot easier!
I missed that.
I looked here:
http://settings.messenger.live.com/Applications/CreateHtml.aspx
I picked the Status Icon option, and was given code like this:
The path to the image remains the same no matter what your status.There is no way to change the image based on which status is returned in the image with pure HTML/CSS/JS (afaik). (even after I realised it redirects)
I can think of a technique to do it,
but it's not easyand it's not too hard, but you'll have to use a server side language such as PHP or ASP.NET.You would change that code to something like this:
proxyMyMsnImage.php
would do the following things:HEAD
request (orGET
, if that doesn't work) on the image (http://messenger.services.live.com/users/[email protected]/presenceimage?mkt=en-GB
)Offline.gif
), you send your own version of that status image, along with the correct mime type, for exampleimage/gif
.Figuring out how to detect which status image you were sent is
the most difficult partnow really easy.