---
title: "Kan ni ändra koden..."
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/13614-kan-ni-ändra-koden"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "ampy"
published: "2002-01-06T13:56:00.000Z"
updated: "2002-01-07T18:46:00.000Z"
replies: 4
views: 187
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/13614-kan-ni-ändra-koden"
---

# Kan ni ändra koden...

## #1 — ampy, 2002-01-06T13:56Z

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.

Permalänk: https://www.webforum.nu/p/13614

## #2 — ampy, 2002-01-06T15:30Z

Ingen som har lust med det?

Permalänk: https://www.webforum.nu/p/303140

## #3 — Vide, 2002-01-06T16:00Z

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

Permalänk: https://www.webforum.nu/p/303141

## #4 — ampy, 2002-01-06T16:03Z

```

<%
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
```

Permalänk: https://www.webforum.nu/p/303142

## #5 — ampy, 2002-01-07T18:46Z

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

Permalänk: https://www.webforum.nu/p/303143

---

Tråden på webben: https://www.webforum.nu/amne/asp/13614-kan-ni-ändra-koden
