Jag får inte det att funka, som jag fattde det så ska jag klistra in
mDelimit = Chr(0) Set re = New RegExp re.Global = True re.IgnoreCase = true re.Pattern = "(\\w+((-\\w+)|(\\.\\w+))\*\\@\[A-Za-z0-9\]+((\\.|-)\[A-Za-z0-9\]+)\*\\.\[A-Za-z0-9\]+)" strText = re.Replace(strText, "\<a href=""mailto" & mDelimit & ":$1""\>$1\</a\>") re.Pattern = "(http://|https://|ftp://|mailto:)(\\S)(\\S+)" strText = re.Replace(strText, "\<a href=""$1$2" & mDelimit & "$3""\>$2" & mDelimit & "$3\</a\>") re.Pattern = "(www\\.(\\S)(\\S+))" strText = re.Replace(strText, "\<a href=""http://$1""\>$1\</a\>") strText = Replace(strText, mDelimit, "")
i viewmsg.asp, så att filen set ur så här:
<!--#include file="functions.inc"-->
<%
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open Session("forumdb")
SQLStmt = "SELECT * FROM Forums where Id = " & Request("ForumId")
Set RS = Connection.Execute(SQLStmt)
SQLStmt = "SELECT *, Format$([date],'yyyy/mm/dd') AS FormDate, Format$([date],'hh:mm') AS FormTime FROM Entries where Id = " & Request("Id")
SQLStmt = SQLStmt & " AND OrgThread = True"
Set RS2 = Connection.Execute(SQLStmt)
SQLStmt = "SELECT *, Format$([date],'yyyy/mm/dd') AS FormDate, Format$([date],'hh:mm') AS FormTime FROM Entries where ReplyId = " & Request("Id")
SQLStmt = SQLStmt & " AND OrgThread = False Order by Id Desc"
Set RS3 = Connection.Execute(SQLStmt)
mDelimit = Chr(0) Set re = New RegExp re.Global = True re.IgnoreCase = true re.Pattern = "(\\w+((-\\w+)|(\\.\\w+))\*\\@\[A-Za-z0-9\]+((\\.|-)\[A-Za-z0-9\]+)\*\\.\[A-Za-z0-9\]+)" strText = re.Replace(strText, "\<a href=""mailto" & mDelimit & ":$1""\>$1\</a\>") re.Pattern = "(http://|https://|ftp://|mailto:)(\\S)(\\S+)" strText = re.Replace(strText, "\<a href=""$1$2" & mDelimit & "$3""\>$2" & mDelimit & "$3\</a\>") re.Pattern = "(www\\.(\\S)(\\S+))" strText = re.Replace(strText, "\<a href=""http://$1""\>$1\</a\>") strText = Replace(strText, mDelimit, "")
%>
<html>
<head>
<link REL="stylesheet" HREF="../godzilla/newcostodiastyle.css" TYPE="text/css">
<title>Costodia Forum</title>
<meta name="Author" content="Martin Persson">
<meta name="Company" content="Ebid Handelsbolag">
<meta name="Publishied" content="2000">
<meta name="Copyright" content="Ebid Handelsbolag">
</head>
<body MARGINHEIGHT="0" MARGINWIDTH="0" bgcolor="#FFFFFF" text="#000000" topmargin="0"
leftmargin="0" vlink="#0000FF">
<table border="0" width="601">
<tr>
<td width="200" valign="top" colspan="2"><img src="images/forumlogga.gif" WIDTH="265"
HEIGHT="108"></td>
</tr>
<tr>
<td width="168" valign="top"><p align="right"><img src="images/dottedvertical.gif"
alt="dottedvertical.gif (956 bytes)" WIDTH="2" HEIGHT="361"></td>
<td valign="top" width="532"><p align="left">Tänk på att använda ett vårdat språk
när du gör inlägg i<br>
våra forum. Oseriösa inlägg tas bort efter behov.</p>
<p align="left"><img src="dottedline.gif" alt="dottedline.gif (909 bytes)" WIDTH="360"
HEIGHT="2"></p>
<table border="0" width="400">
<tr>
<td width="239" align="center"><img src="images/back.gif" alt="back.gif (57 bytes)"
WIDTH="12" HEIGHT="9"> <a href="forumthreads.asp?ForumId=<%=RS("Id")%>">Tillbaka till <%=RS("Forum")%></a></td>
<td width="153" align="center"><img src="images/post.gif" alt="havemail.gif (513 bytes)"
WIDTH="12" HEIGHT="9"> <a
href="forumpost.asp?ForumId=<%=RS("Id")%>&MessageId=<%=RS2("Id")%>">Besvara inlägget</a></td>
</tr>
</table>
<table border="0" width="400" cellspacing="0">
<tr>
<td width="57" class="newmediaNORMALsheet" align="left">Forum: </td>
<td width="339" class="newmediaNORMALsheet"><%= HTMLTecken(RS("Forum"))%>
</td>
</tr>
<tr>
<td width="57" class="newmediaNORMALsheet" align="left">Rubrik: </td>
<td width="339" class="newmediaNORMALsheet"><%= HTMLTecken(RS2("Subject"))%>
</td>
</tr>
</table>
<table border="0" width="400">
<tr>
<td width="65%" class="newmediaNORMALsheet">Namn: <%= HTMLTecken(RS2("Name"))%></td>
<td width="35%" class="newmediaNORMALsheet">Datum: <%= HTMLTecken(RS2("FormDate"))%></td>
</tr>
<tr>
<td width="65%" class="newmediaNORMALsheet">E-post: <a href="mailto:<% = RS2("Email")%>"><% = HTMLTecken(RS2("Email"))%></a></td>
<td width="35%" class="newmediaNORMALsheet">Tid: <%=RS2("FormTime")%></td>
</tr>
<tr>
<td width="50%" colspan="2">Original post:<br>
<%= radbryt(HTMLTecken(RS2("Comment")))%> <br>
</td>
</tr>
<tr>
<td width="50%" colspan="2"><img src="dottedline.gif" width="360" height="2"
alt="dottedline.gif (909 bytes)"></td>
</tr>
</table>
<p>Uppföljare:</p>
<table border="0" width="400">
<tr>
<td width="100%"><ul>
<% Do until RS3.EOF %>
<li><a
href="viewmsg.asp?Id=<%=RS2("Id")%>&ForumId=<%=RS("Id")%>&Showsub=<%=RS3("Id")%>">Re:
<%= RS2("Subject")%> (<%= HTMLTecken(RS3("Name"))%>, <%= RS3("FormDate")%> <%= RS3("FormTime")%> ) </a></li>
<% If Len(Trim(Request("Showsub"))) > 0 And Trim(Request("Showsub")) = Trim(RS3("Id")) Then %>
<!-- Insert -->
<%=radbryt(HTMLTecken(RS3("Comment")))%>
<!-- End -->
<% End If%>
<%
RS3.MoveNext
Loop
%>
</ul>
</td>
</tr>
</table>
<p><img src="dottedline.gif" width="360" height="2" alt="dottedline.gif (909 bytes)"></p>
<p><a style="cursor:hand" class="standard10"
onclick="window.external.AddFavorite(location.href, document.title);">Lägg till denna
sida i dina Favoriter</a></td>
</tr>
</table>
<p> </p>
<p> </p>
</body>
</html>
<%
Rs.Close
Rs2.Close
rs3.close
Connection.Close %>
men på http://www.costodia.com/forum/viewmsg.asp?id=314&ForumId=10 visas skripterror nu.
------------------
Tack på förhand
Mvh Martin Persson
www.Costodia.com