Please is there any way to hide links on visitors - Posted (3801 Views)
Junior Member
AHMEDHHH1
Posts: 105
105

Please is there any way to hide links on visitors and members inside the topics

so we can post a reply in the topic
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Admin
HuwR
Posts: 20611
20611
Posted
Junior Member
AHMEDHHH1
Posts: 105
105
Please is there any way to hide links on visitors and members inside the topics

so we can post a reply in the topic
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
No, there is no such way. It's either full access to topic (actually to the forum where the topic is located) or no access to the topic at all.
Posted
Junior Member
AHMEDHHH1
Posts: 105
105
could you add this characteristic?x

or could anyone explain to me how to do it ?x
Posted
Support Moderator
Podge
Posts: 3776
3776
Are you talking about showing external links within topics only to members that are logged in?
Posted
Junior Member
AHMEDHHH1
Posts: 105
105

Yes

Originally posted by Podge
Are you talking about showing external links within topics only to members that are logged in?
Posted
Support Moderator
Podge
Posts: 3776
3776
I did that recently and its not that difficult. I will post instructions later.
Posted
Support Moderator
Podge
Posts: 3776
3776
Instructions for a default version of V3.4.07

Open inc_func_common.asp
About line 1553 add the following code

Code:
function withoutLinks (strInput)
Set rx = New RegExp
With rx
.Pattern = "<(a*)([^/]*)/([A-Za-z0-9]?[^>]+)"">([A-Za-z0-9]?[^>]+)</a>"
.IgnoreCase = True
.Global = True
End With
withoutLinks = rx.Replace (strInput, "<a href=""login.asp"" target=""_blank"">You must be logged in to see this link.</a>")
end Function

More in a few minutes.
Posted
Support Moderator
Podge
Posts: 3776
3776
Open topic.asp
About line 646 find the following code
Code:
            if Request.QueryString("SearchTerms") <> "" then
Response.Write SearchHiLite(formatStr(Reply_Content))
else
Response.Write formatStr(Reply_Content)
end if

Replace it with
Code:
            if strDBNTUserName = "" then
Cleaned_Reply_Content = withoutLinks(formatStr(Reply_Content))
else
Cleaned_Reply_Content = formatStr(Reply_Content)
end if
if Request.QueryString("SearchTerms") <> "" then
Response.Write SearchHiLite(Cleaned_Reply_Content)
else
Response.Write formatStr(Cleaned_Reply_Content)
end if
Posted
Support Moderator
Podge
Posts: 3776
3776
Still in topic.asp
Around line 852 find the following code
Code:
    if Request.QueryString("SearchTerms") <> "" then
Response.Write SearchHiLite(formatStr(Topic_Message))
else
Response.Write formatStr(Topic_Message)
end if

Replace it with
Code:
    if strDBNTUserName = "" then
Cleaned_Topic_Message = withoutLinks(formatStr(Topic_Message))
else
Cleaned_Topic_Message = formatStr(Topic_Message)
end if
if Request.QueryString("SearchTerms") <> "" then
Response.Write SearchHiLite(Cleaned_Topic_Message)
else
Response.Write Cleaned_Topic_Message
end if

This code is largely untested and I suspect that the regex needs a little work. Please post comments, suggestions and improvements and I'll package it in a mod and put it on SnitzBitz.
I think something like this should be included in the base code so that Snitz would be less of a target for spammers.
You Must enter a message