Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Please is there any way to hide links on visitors

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AHMEDHHH1 Posted - 25 October 2010 : 22:09:49

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

so we can post a reply in the topic
15   L A T E S T    R E P L I E S    (Newest First)
AHMEDHHH1 Posted - 12 November 2010 : 07:33:32
The members here sometimes put links with this from and it shows for everybody

you do your best brother but many links don't show up to the visitors unless if they registered and for the members unless if they add a reply

it still just this kind, i will try to solve that problem inchallah thank you brother podge for the cooperation


Podge Posted - 09 November 2010 : 19:28:49
<FONT color=#008000 size=4>forum.snitz</FONT> is not a link.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=69731&whichpage=2 is caught by the regex and not shown to users that are not logged in.
AHMEDHHH1 Posted - 09 November 2010 : 16:35:26
link the example that i already post
HTML
<A href="http://forum.snitz.com/forum/topic.asp?TOPIC_ID=69731&whichpage=2"><FONT color=#008000 size=4>forum.snitz</FONT></A>
Podge Posted - 07 November 2010 : 07:44:08
I tested the link you sent me and it is caught by the regex. Its not shown to users that are not logged in.

I'm not sure what you are trying to hide as what you're pointing to isn't a link.
AHMEDHHH1 Posted - 06 November 2010 : 16:19:08
the site is in arabic and you'll face some defficulties to understand it*

but a message is being sent to you through e-mail as a link

the example that i already post*

but is there a way to hide links like the one in the picture below

Podge Posted - 05 November 2010 : 07:27:42
Can you give me a link to the original post?
AHMEDHHH1 Posted - 04 November 2010 : 11:19:17

quote:
Originally posted by Podge

If you notice any links that are shown to users that are not logged in can you post them here? There may be some that are not caught by the regex.


Yes
Podge Posted - 01 November 2010 : 07:25:31
If you notice any links that are shown to users that are not logged in can you post them here? There may be some that are not caught by the regex.
Carefree Posted - 29 October 2010 : 20:35:33
Any time. Podge did the hard part, my regex abilities are about nil.
AHMEDHHH1 Posted - 29 October 2010 : 17:40:04
The structure was perfectly working
Thank you very much brother Podge + Carefree


Carefree Posted - 28 October 2010 : 16:29:51
Here you go Podge. I have it working on the test site. If you see something to change, feel free.

Save the following as "dbs_links.asp". Run from admin console.


Allowed Links Mod v1.0

[ALTER]
FORUM
ADD#F_TOPICLINK#INT#NULL#1
ADD#F_REPLYLINK#INT#NULL#1
[END]

[UPDATE]
FORUM
F_TOPICLINK#1#
F_REPLYLINK#1#
[END]


Change the following files as indicated:

"inc_func_common.asp"


Add the following to the end of the file:

'########################################## Links Mod ##############################################
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
	if intLAllowed = 0 and strDBNTUserName > "" then
		if Reply_ReplyID > 0 then
			WithoutLinks = rx.Replace(strInput, "(Links not allowed in replies.  Go <a href=""post.asp?method=Edit&TOPIC_ID=" & TopicID & "&REPLY_ID=" & Reply_ReplyID & "&FORUM_ID=" & FORUM_ID & """ target=""_self"">back</a> to edit this reply.)")
		else
			WithoutLinks = rx.Replace(strInput, "(Links not allowed in topics.  Go <a href=""post.asp?method=EditTopic&TOPIC_ID=" & TopicID & "&REPLY_ID=" & TopicID & "&FORUM_ID=" & FORUM_ID & """ target=""_self"">back</a> to edit this topic.)")
		end if
	else
		WithoutLinks = rx.Replace(strInput, "(<a href=""login.asp"" target=""_blank"">Login</a> to see this link.)")
	end if
end Function
'########################################## Links Mod ##############################################



"post.asp"


Look for the following lines (appx 618-621):

	Response.Write	"                </select>" & vbNewLine & _
			"                <a href=""Javascript:openWindow3('pop_help.asp?mode=options#category')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "</a></td>" & vbNewLine & _
			"              </tr>" & vbNewLine
end if

After them, insert these:

'########################################## Links Mod ##############################################
if strRqMethod = "Forum" or strRqMethod = "EditForum" then
	Response.Write	"			<tr>" & vbNewLine & _
	 	"	  	<td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Links Permission:</b></font><br /><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>(Links Allowed?)</font></td>" & vbNewLine & _
		"	  	<td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
		"	  	<select name=""LinkAuth"" size=""1"">" & vbNewLine
	if strRqMethod = "Forum" then
		intTLink = 0
		intRLink = 0
	else
		strSQL = "SELECT F_TOPICLINK, F_REPLYLINK FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & strRqForumID
		set rsLinks = my_Conn.Execute(strSQL)
		if not rsLinks.EOF then
			intTLink = rsLinks("F_TOPICLINK")
			intRLink = rsLinks("F_REPLYLINK")
			rsLinks.Close
		end if
		set rsLinks = Nothing
	end if
	Response.Write "			<option value=""0"""
	if intTLink = 0 and intRLink = 1 then Response.Write(" selected")
	Response.Write ">Don't Allow Links in Topics</option>" & vbNewLine & _
		"			<option value=""1"""
	if intTLink = 1 and intRLink = 0 then Response.Write(" selected")
	Response.Write ">Don't Allow Links in Replies</option>" & vbNewLine & _
		"			<option value=""2"""
	if intTLink = 0 and intRLink = 0 then Response.Write(" selected")
	Response.Write ">Don't Allow Links in Topics or Replies</option>" & vbNewLine & _
		"			<option value=""3"""
	if intTLink = 1 and intRLink = 1 then Response.Write(" selected")
	Response.Write ">Allow Links in Topics and Replies</option>" & vbNewLine & _
		"		</select>" & vbNewLine & _
		"		<a href=""Javascript:openWindow3('pop_help.asp?mode=linksmod#permission')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "</a></td>" & vbNewLine & _
		"	  </tr>" & vbNewLine
end if
'########################################## Links Mod ##############################################


"post_info.asp"


Look for the following lines (appx 1428-1429):

		strSql = strSql & ",   F_DEFAULTDAYS = " & cLng(Request.Form("DefaultDays"))
		strSql = strSql & ",   F_COUNT_M_POSTS = " & cLng("0" & Request.Form("ForumCntMPosts"))

After them, insert these:

'########################################## Links Mod ##############################################
		if ChkString(Request.Form("LinkAuth"), "SQLString") = 3 then
			strSql = strSql & ", F_TOPICLINK = 1, F_REPLYLINK = 1"
		elseif ChkString(Request.Form("LinkAuth"), "SQLString") = 2 then
			strSql = strSql & ", F_TOPICLINK = 0, F_REPLYLINK = 0"
		elseif ChkString(Request.Form("LinkAuth"), "SQLString") = 1 then
			strSql = strSql & ", F_TOPICLINK = 1, F_REPLYLINK = 0"
		else
			strSql = strSql & ", F_TOPICLINK = 0, F_REPLYLINK = 1"
		end if
'########################################## Links Mod ##############################################

Next, look for the following lines (appx 1220-1221):

		strSql = strSql & ", " & ChkString(Request.Form("DefaultDays"), "SQLString")
		strSql = strSql & ", " & ChkString(Request.Form("ForumCntMPosts"), "SQLString")

After them, insert these:

'########################################## Links Mod ##############################################
		if ChkString(Request.Form("LinkAuth"), "SQLString") = 3 then
			strSql = strSql & ", 1, 1"
		elseif ChkString(Request.Form("LinkAuth"), "SQLString") = 2 then
			strSql = strSql & ", 0, 0"
		elseif ChkString(Request.Form("LinkAuth"), "SQLString") = 1 then
			strSql = strSql & ", 1, 0"
		else
			strSql = strSql & ", 0, 1"
		end if
'########################################## Links Mod ##############################################

Next, look for the following lines (appx 1189-1190):

		strSql = strSql & ", F_DEFAULTDAYS "
		strSql = strSql & ", F_COUNT_M_POSTS "

After them, insert these:

'########################################## Links Mod ##############################################
		strSql = strSql & ", F_TOPICLINK "
		strSql = strSql & ", F_REPLYLINK "
'########################################## Links Mod ##############################################


"topic.asp"


Look for the following lines (appx 848-852):

	if Request.QueryString("SearchTerms") <> "" then
		Response.Write	SearchHiLite(formatStr(Topic_Message))
	else
		Response.Write	formatStr(Topic_Message)
	end if

Change them to say:

'########################################## Links Mod ##############################################
	strSQL = "SELECT F_TOPICLINK FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID
	set rsLAllowed = my_Conn.Execute(strSQL)
	intLAllowed = 0
	if not rsLAllowed.EOF then
		intLAllowed = rsLAllowed("F_TOPICLINK")
		rsLAllowed.Close
	end if
	set rsLAllowed = Nothing
	strSQL = "SELECT REPLY_ID FROM " & strTablePrefix & "REPLY WHERE TOPIC_ID = " & TopicID & " AND REPLY_ID = " & MemberID
	set rsReplied = my_Conn.Execute(strSQL)
	intReplied = 0
	if not rsReplied.EOF or (TopicID = MemberID) then
		intReplied = 1
		rsReplied.Close
	end if
	set rsReplied = Nothing
	if ((strDBNTUserName = "") or (intReplied = 0)) and (intLAllowed = 0) 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(formatStr(Cleaned_Topic_Message))
	else
		Response.Write SearchHiLite(formatStr(Cleaned_Topic_Message))
	end if
'########################################## Links Mod ##############################################

Next, look for the following lines (appx 644-647):

			Response.Write	"                      <hr noshade size=""" & strFooterFontSize & """></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine & _
					"                    <tr>" & vbNewLine & _
					"                      <td valign=""top"" height=""100%""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"" id=""msg"">"

After them, insert these:

'########################################## Links Mod ##############################################
			strSQL = "SELECT F_REPLYLINK FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID
			set rsLAllowed = my_Conn.Execute(strSQL)
			intLAllowed = 0
			if not rsLAllowed.EOF then
				intLAllowed = rsLAllowed("F_REPLYLINK")
				rsLAllowed.Close
			end if
			set rsLAllowed = Nothing
			if ((strDBNTUserName = "") or (intReplied = 0)) and (intLAllowed = 0) then
				Cleaned_Reply_Content = WithoutLinks(formatStr(Reply_Content))
			else
				Cleaned_Reply_Content = FormatStr(chkString(Reply_Content, "SQLString"))
			end if
'########################################## Links Mod ##############################################


"pop_help.asp"


Look for the following line (appx 160):

	case else

Above it, insert these:

'########################################## Links Mod ##############################################
	case "linksmod"
		'### Links Permission Help
		Response.Write	"              <tr>" & vbNewLine & _
				"                <td bgcolor=""" & strCategoryCellColor & """><a name=""permission""></a><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """ ><b>What is Links Permissions?</b></font></td>" & vbNewLine & _
				"              </tr>" & vbNewLine & _
				"              <tr>" & vbNewLine & _
				"                <td bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
				"					  Links Permission allows you to choose whether links are allowed in topics or replies for a particular forum.<br /><br />" & vbNewLine & _
				"                <li><b>Don't Allow Links in Topics:</b> Links will be allowed in replies within a forum, but not in new topics.</li>" & vbNewLine & _
				"                <li><b>Don't Allow Links in Replies:</b> Links will be allowed in topics within a forum, but not in replies.</li>" & vbNewLine & _
				"                <li><b>Don't Allow Links in Topics or Replies:</b> No links will be allowed in either topics or replies within a forum.</li>" & vbNewLine & _
				"                <li><b>Allow Links in Topics and Replies:</b> This is the default setting.  Links will be allowed in both topics and replies within a forum.</li></font>" & vbNewLine & _
				"                <a href=""#top"">" & getCurrentIcon(strIconGoUp,"Go To Top Of Page","align=""right""") & "</a>" & vbNewLine & _
				"                </td>" & vbNewLine & _
				"              </tr>" & vbNewLine
'##################################################################################################
Podge Posted - 28 October 2010 : 12:37:22
It will be a few hours before I can take a look at it (still at work).
AHMEDHHH1 Posted - 28 October 2010 : 10:42:52
everything is done we have left just hiding links on members who didn't post a reply in my topic
AHMEDHHH1 Posted - 28 October 2010 : 10:21:46
Add this code

[ALTER]
FORUM
ADD#F_Lenk#int#NULL#0
[END]
AHMEDHHH1 Posted - 28 October 2010 : 10:14:22
Open topic.asp
Around line 101 find the following code

", F.F_STATUS, F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE"
Replace it with

", F.F_STATUS, F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE, F_Lenk"

Around line 101 find the following code

Topic_Message = rsTopic("T_MESSAGE")

And add below it:

ForumLenk = rsTopic("F_Lenk")


Around line 852 find the following code

if Request.QueryString("SearchTerms") <> "" then
Response.Write SearchHiLite(formatStr(Topic_Message))
else
Response.Write formatStr(Topic_Message)
end if


Replace it with

if strDBNTUserName = "" and ForumLenk = 0 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


Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07