100RMB对JS脚本熟悉的进来看看,调用JS处理出想要的东西
这是部分的JS代码目的是想处理出群的管理员和创建者
附件里提供完整的JS代码和需要用到的处理代码内容
this.setGroupInfo = function(W) {
var V = W.ginfo;
var N = W.minfo;
var J = W.stats;
var al = {};
for (var ag = J.length; ag--;) {
var Y = J;
al = J;
}
var Q = W.cards || [];
var U = this.getGroupByCode(V.code);
U.setLevel(V.level);
var ab = this.getSelfUin();
U.setAnnouncement(V.memo || " ");
var af = V.members;
var ak = [];
var T = false;
var ai = 0;
for (var ae = 0; ae < af.length; ae++) {
var ad = "common";
if (af.mflag & 1) {
ad = "manager";
if (af.muin === ab) {
T = true;
}
} else {
if (af.mflag & 2) {
ad = "manager2";
if (af.muin === ab) {
T = true;
}
}
}
if (af.muin == V.owner) {
ad = "master";
if (af.muin === ab) {
T = true;
}
}
var O = af.muin;
var aj = N.nick;
var S = N.nick;
if (S == "") {
S = String(O);
}
var R = (al && al["stat"]) || 20;
var aa = (al && al["client_type"]) || 10000;
if (R != 20 || O === ab) {
ai++;
}
var X = aj;
var ah = aj;
for (var ac = 0; ac < Q.length; ac++) {
if (Q.muin == O) {
S = Q.card;
break;
}
}
var an = this.getUserByUin(af.muin);
if (an) {
var P = alloy.util.code2state(R);
if (an.uin != ab) {
an.setState(P);
an.gstate = R;
}
if (an.type === "groupBuddy" || an.uin === ab) {
var am = (S ? S: an.showName);
an.setUsercard(V.code, am);
} else {
S = S === aj ? an.showName: S;
}
an.setClientType(aa);
} else {
var Z = {
uin: O,
nick: aj,
clientType: aa,
state: alloy.util.code2state(R)
};
an = this.createUser(Z);
an.type = "groupBuddy";
an.group = U;
an.gstate = R;
}
var am = (S ? S: an.showName);
an.setUsercard(V.code, am);
ak = {
uin: O,
flag: ad,
gcode: V.code,
nick: aj,
htmlNick: j.string.encodeHtmlSimple(aj),
titleNick: (aj),
showName: X,
htmlShowName: j.string.encodeHtmlSimple(X),
titleShowName: j.string.encodeHtmlAttributeSimple(X),
allName: ah,
htmlAllName: j.string.encodeHtmlSimple(ah),
titleAllName: ah,
usercard: j.string.encodeHtmlSimple(S)
};
ak.info = an;
U.uin2members = ak;
}
U.isLoadInfo = true;
U.hasManageAuthority = T;
U.updateMembers(ak, ai);
s.notifyObservers(this, "GroupInfoChange", U);
}; 其中common 为普通成员
manager和manager2 属于管理员
master 就属于创建者 本帖最后由 AUFS 于 2011-8-24 00:07 编辑
这个怎么编辑已解决呀编辑不了{:face (229):} 提示 您的主题售价扣除积分交易税后为 0,请返回修改
页:
[1]