Siteweaver动易的登录提示修改技巧asp
会员登录提示修改
很多网友为了让自己的动易在用户登录时要体现个性化,都想在登录文件上作一些小修改,但是大多数的网友对其中的语句调用、修改不是很熟悉,为此特意整理了一些修改技巧给大家分享一下。
JS篇:
主要是修改动易的JS目录内checklogin.js文件,由于该文件是使用UTF-8编写,所以要使用动易提供的UTF-8转换工具来进行转换成我们所熟悉的汉字。
1、删除“资金余额:”
查找UTF8码资金余额:
删除
tempstr += "</div><div
id=\"userlogined\">资金余额:
<b><font color=\"blue\">" +
root.item(0).getElementsByTagName("balance").item(0).text +
"</font></b> 元";
2、删除“经验积分:”
查找UTF8码经验积分:
删除tempstr += "</div><div
id=\"userlogined\">经验积分: <b><font
color=\"blue\">" + root.item(0).getElementsByTagName("exp").item(0).text + "</font></b> 分";
3、删除“可用点券:”(其中“点券”是另一个函数代码,根据你在后台的设定而定,如金币等)
查找UTF8码可用点券:
删除tempstr += "</div><div
id=\"userlogined\">可用" + root.item(0).getElementsByTagName("point/pointname").item(0).text + ":
<b><font color=\"gray\">" +
root.item(0).getElementsByTagName("point/userpoint").item(0).text + "</font></b> " +
root.item(0).getElementsByTagName("point/unit").item(0).text
4、删除“剩余天数:”
查找UTF8码剩余天数:
删除tempstr += "</div><div
id=\"userlogined\">剩余天数: <b><font
color=\"blue\">";
if(root.item(0).getElementsByTagName("day").item(0).text=='unlimit'){
tempstr
+= "无限期";
}else{
tempstr +=
root.item(0).getElementsByTagName("day").item(0).text;
}
tempstr +=
"</font></b>";
5、删除“待签文章:”
查找UTF8码待签文章:
删除tempstr += "</div><div
id=\"userlogined\">待签文章: <b><font
color=\"gray\">" + root.item(0).getElementsByTagName("article").item(0).text
+ "</font></b> 篇";
6、删除“待阅短信:”
查找UTF8码待阅短信:
删除if(root.item(0).getElementsByTagName("unreadmessage/stat").item(0).text=='full'){
tempstr += "</div><div id=\"usermessage\" class=\"havemessage\" onmouseover=\"havemessage();\"
onmouseout=\"hidemessage();\" onclick=\"Element.toggle('messagelist');\"
style=\"cursor:hand;\">待阅短信:
<b><font color=\"gray\">" +
root.item(0).getElementsByTagName("message").item(0).text +
"</font></b> 条";
tempstr += "</div><div
id=\"messagelist\" style=\"display:none\";>";
var
messageloop = root.item(0).getElementsByTagName("unreadmessage/item");
var
openurl;
for(i=0;i<messageloop.length;i++){
tempstr +=
"<li><a href=\"" + siteroot + "User/User_Message.asp?Action=ReadInbox&MessageID=" +
messageloop.item(i).getElementsByTagName("id").item(0).text + "\" title=\"来自:" +
messageloop.item(i).getElementsByTagName("sender").item(0).text + "\n时间:" +
messageloop.item(i).getElementsByTagName("time").item(0).text + "\">" +
messageloop.item(i).getElementsByTagName("title").item(0).text +
"</a></li>";
}
}else{
tempstr += "</div><div id=\"userlogined\">待阅短信:
<b><font color=\"gray\">" + root.item(0).getElementsByTagName("message").item(0).text +
"</font></b> 条"; }
7、删除“登录次数:”
查找UTF8码登录次数:
删除tempstr += "</div><div
id=\"userlogined\">登录次数:<b><font color=\"blue\">" +
root.item(0).getElementsByTagName("logined").item(0).text + "</font></b> 次";
8、增加会员提示(见下图)
查找<font
color=\"green\"><b>" + username +
"</b></font>
在后面加上 ,会员为与后面的登录时间提示有点间隔,所以要在员后面再加一个空格
其它的诸如修改字体大小、颜色、粗细可自行调试,还有的就是横向的登录提示代码修改也可以参照以上所说进行添加、删除,也就不再重复了。
ASP篇:
有些网友(包括我)觉得用checklogin.js登录比较慢,改为使用原动易2005的方式(Userlogin.asp),以<IFRAME id=UserLogin src="{$InstallDir}UserLogin.asp?ShowType=2"
frameBorder=0 width=680 scrolling=no height=24
name="I1"></IFRAME>进行调用,由于ASP使用的是汉字,修改也相对容易,我就以“把待签文章改为会员类型”为例,其它的我就懒一点不多说了,自己参考着来修改吧,呵呵:)
查找
Response.Write "待签文章:" &
vbCrLf
If Trim(UnsignedItems & "") = "" Then
Response.Write " <b><font color=gray>0</font></b>
篇"
Else
Dim UnsignedItemNum, arrUser
arrUser = Split(UnsignedItems, ",")
UnsignedItemNum =
UBound(arrUser) + 1
Response.Write " <b><font
color=red>" & UnsignedItemNum & "</font></b>
篇"
End If
If ShowType = 1 Then
Response.Write "<br> "
Else
Response.Write "</td><td>"
End If
用Response.Write "会员类别: <font color=blue>" & GroupName
&
"</font>"替换即可
我自己使用的是Userlogin.asp作为登录调用,举例如下:
我要评论