I found some codes but it doesn't work very well or some is not very good. I will give you a example.
Step 1: functions/functions_format_post.asp
'Return the function searchHighlighter = strTempMessage End Function
Open the functions_format_post.asp and find parent codes. After then add below codes.
'****************************************** '*** Hide Links *** '****************************************** Function AntiLinkForGuest(strMessage,lngTopicID,lngLoggedInUserID) Dim strHideMessage Dim lngStartPos Dim lngEndPos Dim strBuildHideBlock Dim strOriginalHideBlock if lngLoggedInUserID = 2 Then Do While InStr(1, strMessage, "<a", 1) > 0 AND InStr(1, strMessage, "</a>", 1) > 0 lngStartPos = InStr(1, strMessage, "<a", 1) + 2 lngEndPos = InStr(lngStartPos, strMessage, "</a>", 1) If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 2 If lngEndPos > lngStartPos Then
strBuildHideBlock = "IfLinkleri Görebilmek için " &_ "<link href=""login_user.asp"">Login</a> or " &_ " <link href=""registration_rules.asp"">register</a> to see hide links."
End if
lngStartPos = InStr(1, strMessage, "<a", 1) lngEndPos = InStr(lngStartPos, strMessage, "</a>", 1) + 4 If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 2 strOriginalHideBlock = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) If strBuildHideBlock <> "" Then strMessage = Replace(strMessage, strOriginalHideBlock, strBuildHideBlock, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalHideBlock, Replace(strOriginalHideBlock, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop strMessage = Replace(strMessage, "<link", "<a", 1, -1, 1) end if AntiLinkForGuest = strMessage End Function Step 2: forum_post.asp
If InStr(1, strMessage, " ", 1) > 0 AND InStr(1, strMessage, " ", 1) > 0 Then strMessage = formatCode(strMessage)
Open the forum_post.asp and find parent codes. After then add below codes.
If InStr(1, strMessage, "<a", 1) > 0 AND InStr(1, strMessage, "</a>", 1) > 0 Then strMessage = AntiLinkForGuest(strMessage,lngTopicID,lngLoggedInUserID)
So everything looks fine but ideas is not right. Because if I add more than 1 link then this codes show all links like that.
Login or register to see hide links.
Login or register to see hide links.
Login or register to see hide links.
Login or register to see hide links.
Login or register to see hide links.
I need to select all link and add first [*HIDE] and after then [*/HIDE] of course without * :) And then it we can see only one line "Login or register to see hide links." for all links. I am not server side developer or coder. If somebody help me about this modification I will be appreciate.
http://forums.webwiz.net/forum_posts.asp?TID=26683#137341 -
|