webForumDet fria alternativet

Kan ni ändra koden...

ASP

4 svar · 158 visningar · startad av ampy

Medlem sedan feb. 20011 498 inlägg
Frågan#1

Hej!

Är det någon här som har lust att ändra denna kod:

<%
	If strSplitted(1) = "public" Then 'Meddelande till alla
		ParseText = "<td width='600' bgcolor='#FFEFCE'><b><font color='#000080'>" & strSplitted(2) & "</font></b><i><font color='#999999'> - (" & strSplitted(0) & ")</i></font>: " & CheckForLinks(Free(Server.HTMLEncode(strSplitted(3)))) & "</td></tr>" & vbCrLf & vbCrLf
	ElseIf strSplitted(1) = "actionlogin" Then 'Nån har loggat in
		ParseText = "<tr><td width='600' bgcolor='#FFE784'><b><font color=""#000000"">" & Server.HTMLEncode(strSplitted(2)) & " stiger in i chatten (" & strSplitted(0) & ")</b></font></td></tr>" & vbCrLf & vbCrLf
	ElseIf strSplitted(1) = "actionlogoff" Then 'Nån har loggat ut
		ParseText = "<tr><td width='600' bgcolor='#FFE784'><b><font color=""#000000"">" & Server.HTMLEncode(strSplitted(2)) & " har lämnat chatten (" & strSplitted(0) & ")</font></b></td></tr>" & vbCrLf & vbCrLf
	ElseIf strSplitted(1) = "actionkicked" Then 'Nån har kickats ut ur chatten av en administratör
		ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#aaaaaa"">[" & Server.HTMLEncode(strSplitted(2)) & " har kickats ut ur chatten av " & Server.HTMLEncode(strSplitted(3)) & " (" & strSplitted(0) & ")]</font>" & vbCrLf & vbCrLf
	Else 'Privat meddelande
		If LCase(strSplitted(1)) = LCase(Session("Name")) Then
			strText = Server.HTMLEncode(Mid(strSplitted(3), 9 + Len(strSplitted(1)), Len(strSplitted(3))))
			ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#ff0000""><b>" & Server.HTMLEncode(strSplitted(2)) & "</b> - (" & strSplitted(0) & "): </font>" & CheckForLinks(Free(strText)) & "</td></tr>" & vbCrLf & vbCrLf
		ElseIf LCase(strSplitted(2)) = LCase(Session("Name")) Then
			strText = Server.HTMLEncode(Mid(strSplitted(3), 9 + Len(strSplitted(1)), Len(strSplitted(3))))
			ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#0000ff""><b>Skickat till " & Server.HTMLEncode(strSplitted(1)) & "</b> - (" & strSplitted(0) & "):</font>" & CheckForLinks(Free(strText)) & "</td></tr>" & vbCrLf & vbCrLf
		End If
	End If
End Function

Så att den blir som bilden som finns här:

"]http://www.rubensoft.d2g.com/ampy/Image2.gif

Jag kan inte göra det själv eftersom jag inte förstår mig på så mycket av den koden.

------------------
Ampy.cjb.net

[Redigerat av ampy den 06 jan 2002]

[Redigerat av ampy den 06 jan 2002]

[Redigerat av ampy den 06 jan 2002]

Medlem sedan feb. 20011 498 inlägg
#2

Ingen som har lust med det?

------------------
Ampy.cjb.net

Medlem sedan dec. 19998 577 inlägg
#3

Tror du får göra koden lite mer läsvänlig först... ;)

------------------
Mostly Harmless

Medlem sedan feb. 20011 498 inlägg
#4

<%
If strSplitted(1) = "public" Then 'Meddelande till alla

ParseText = "<td width='600' bgcolor='#FFEFCE'><b><font color='#000080'>" & strSplitted(2) & "</font></b><i><font color='#999999'> - (" & strSplitted(0) & ")</i></font>: " & CheckForLinks(Free(Server.HTMLEncode(strSplitted(3)))) & "</td></tr>" & vbCrLf & vbCrLf

ElseIf strSplitted(1) = "actionlogin" Then 'Nån har loggat in
ParseText = "<tr><td width='600' bgcolor='#FFE784'><b><font color=""#000000"">" & Server.HTMLEncode(strSplitted(2)) & " stiger in i chatten (" & strSplitted(0) & ")</b></font></td></tr>" & vbCrLf & vbCrLf

ElseIf strSplitted(1) = "actionlogoff" Then 'Nån har loggat ut
ParseText = "<tr><td width='600' bgcolor='#FFE784'><b><font color=""#000000"">" & Server.HTMLEncode(strSplitted(2)) & " har lämnat chatten (" & strSplitted(0) & ")</font></b></td></tr>" & vbCrLf & vbCrLf

ElseIf strSplitted(1) = "actionkicked" Then 'Nån har kickats ut ur chatten av en administratör
ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#aaaaaa"">[" & Server.HTMLEncode(strSplitted(2)) & " har kickats ut ur chatten av " & Server.HTMLEncode(strSplitted(3)) & " (" & strSplitted(0) & ")]</font>" & vbCrLf & vbCrLf

Else 'Privat meddelande
If LCase(strSplitted(1)) = LCase(Session("Name")) Then
strText = Server.HTMLEncode(Mid(strSplitted(3), 9 + Len(strSplitted(1)), Len(strSplitted(3))))
ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#ff0000""><b>" & Server.HTMLEncode(strSplitted(2)) & "</b> - (" & strSplitted(0) & "): </font>" & CheckForLinks(Free(strText)) & "</td></tr>" & vbCrLf & vbCrLf

ElseIf LCase(strSplitted(2)) = LCase(Session("Name")) Then
strText = Server.HTMLEncode(Mid(strSplitted(3), 9 + Len(strSplitted(1)), Len(strSplitted(3))))
ParseText = "<tr><td width='600' bgcolor='#FFE784'><font color=""#0000ff""><b>Skickat till " & Server.HTMLEncode(strSplitted(1)) & "</b> - (" & strSplitted(0) & "):</font>" & CheckForLinks(Free(strText)) & "</td></tr>" & vbCrLf & 
vbCrLf

End If
End If
End Function

------------------
Ampy.cjb.net

[Redigerat av ampy den 06 jan 2002]

Medlem sedan feb. 20011 498 inlägg
#5

Är det verkligen ingen som vill hjälpa mig?

------------------
Ampy.cjb.net

265 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
123 ms — deklarationer (db)
0 ms — hämta statistik (cache)
138 ms — hämta tråd, inlägg och bilagor (db)
123 ms — ändringar (db)