Discuz!X同步好友到漫游应用

将Discuz!X好友关系同步至Manyou平台,以便在应用里看到他们。

<!--{if $_G['setting']['my_userapp'] && $_G[uid]}-->
 <!-- 同步好友至Manyou 开始 -->
 <script type="text/javascript">
 function my_sync_tip(msg, close_time) {;
 var my_tip = document.getElementById("my_tip");
 if (!my_tip) {
 my_tip = document.createElement("div");
 document.getElementsByTagName("body")[0].appendChild(my_tip);
 my_tip.id = "my_tip";
 }
 my_tip.style.display = 'block';
 my_tip.innerHTML = '<div style="position: absolute; top: 200px; right: 500px; padding: 20px; width: 300px; height: 15px; z-index:9999;">' + msg + '</div>';
 if (close_time) {
 setTimeout("document.getElementById('my_tip').style.display = 'none';", close_time);
 }
 }
 function my_sync_friend() {
 my_sync_tip('正在同步好友信息...', 0);
 var my_scri = document.createElement("script");
 document.getElementsByTagName("head")[0].appendChild(my_scri);
 my_scri.charset = "UTF-8";
 my_scri.src = "http://uchome.manyou.com/user/syncFriends?sId=$_G['setting'][my_siteid]&uUchId=$_G[uid]&ts=$_G[timestamp]&key=<!--{eval echo md5($_G['setting'][my_siteid] . $_G['setting'][my_sitekey] . $_G[uid] . $_G[timestamp]);}-->";
 }
 </script>
 <div><div><div><div><div>
 <p>在游戏中找不到自己的好友?请点击下面的的按钮,将好友信息同步到里面。</p>
 <p style="text-align: center;padding: 20px 0 0;"> <a href="#" onclick="my_sync_friend(); return false;" title="将好友关系同步至Manyou平台,以便在应用里看到他们"><img alt="刷新好友信息" src="image/syncfriend.gif"/></a> </p>
 </div></div></div></div></div>
 <!-- 同步好友至Manyou 结束 -->
 <!--{/if}-->

Leave a Reply