|   
 
 | 
| 【技巧】分组式表情在短消息发送中的修改 
 题记:因为测试不够,忽略了发送短消息中也受影响,如果后台允许超过16个表情,这儿也会显示得一塌糊涂,惭愧呵。。
 现做修改如下:
 因为这儿和发帖处使用的函数等都不尽相同,所以,请不要尝试用以前的修改方法修改这儿,否则没有效果的,还会出错。
 时间仓促,今天上班前的一小时,难免有错,发现请回复。
 
 打开user/sendmessage.asp找到:
 -------------------
 
 <tr bgcolor="<%=def_bbs_lightestcolor%>" class=tbbg9>
 <td align=left width=70>插入表情</td>
 <td height=24 valign=top>
 <%
 dim temp_n
 for temp_n = 1 to def_ubbiconnumber%><a href="javascript:smilie('[EM<%=right("0" & temp_n,2)%>]');"><img src="/ubbicon/em<%=right("0" & temp_n,2)%>.gif" width="20" height="20" align="absmiddle" border=0></a>
 <%next%>
 </td>
 </tr><%end if%>
 
 ---------------------
 
 替换为以下内容
 
 ---------------------
 
 <!-- 修改部分开始 -->
 <tr bgcolor="<%=def_bbs_lightestcolor%>" class=tbbg9>
 <td align=left width=70>插入表情<br><a href=../user/help/ubb.asp target=_blank>ubb帮助</a</td>
 <td height=24 valign=top>
 <table border="0" cellspacing="0" cellpadding="0"><tr><td>
 <%
 dim a_count
 a_count = fix(def_ubbiconnumber/16)
 if def_ubbiconnumber/16 > fix(def_ubbiconnumber/16) then a_count =  fix(def_ubbiconnumber/16) + 1
 dim temp_a
 for temp_a = 1 to a_count
 dim temp_n,lasticon_n,firsticon_n,spanstyle
 firsticon_n = (temp_a - 1) * 16 + 1
 lasticon_n = temp_a * 16
 if temp_a = a_count then lasticon_n = def_ubbiconnumber
 if temp_a = 1 then spanstyle = "" else spanstyle = " style='display:none'"
 %><span name=icon<%=temp_a%> id=icon<%=temp_a%> <%=spanstyle%>> <%for temp_n = firsticon_n to lasticon_n%><img src="/ubbicon/em<%=right("0" & temp_n,2)%>.gif" style="cursor:hand" onclick="smilie('[EM<%=right("0" & temp_n,2)%>]');" width="20" height="20" align="absmiddle" border=0  title=表情<%=temp_n%> ><%next%></span>
 <%next%>
 </td></tr></table>
 <br> <span style="cursor:hand" onclick="iconpage();">更多表情……</span>
 </td>
 <script language=javascript>
 var iconp = 1;
 var iconmp = <%=a_count%>;
 function iconpage()
 {
 eval("icon" + iconp).style.display = "none";
 iconp ++ ;
 if(iconp>iconmp)iconp=1;
 eval("icon" + iconp).style.display = "block";
 }
 </script>
 </tr>
 <%end if%>
 <!-- 修改部分结束 -->
 
 -----------------------
 
 保存,上传,ok
 
 
 改完后,发短信的页面变宽了
 
 自己解决了。呵,我把表情的每行显示个数16,改为10个,就ok了。
 
 http://w.leadbbs.com/a/a.asp?b=200&id=1726674
 | 
 |