<%
Public Function imgmark_del(SearchString) '此为处理论坛帖子的函数。适用于雪人论坛。
		Dim  SearchChar1,SearchChar2, MyPos1,MyPos2,Result_string,max_len
		for loopvar= 1 to 24  
			replace_char=":em" & loopvar & ":"    '替换各种小表情
			SearchString=replace(SearchString,replace_char,"") 'replace :em24:  to space	
		next
		'SearchString=replace(SearchString,"<br>","<br/>") 'replace <br>  to <br/>
		SearchString=replace(SearchString,"[/color]","") 'replace [/color]  to space
		SearchString=replace(SearchString,"[/size]","") 'replace [/size]  to space
		SearchString=replace(SearchString,"<br>","") 'replace <br>  to space
		SearchString=replace(SearchString,"  "," ") 'replace double_spaces  to space
		SearchString=replace(SearchString,"　","") 'replace tab_space1  to space
		SearchString=replace(SearchString," ","") 'replace tab_space2  to space
		SearchString=replace(SearchString,"","") 'replace tab_space3  to space
		SearchString=replace(SearchString,"[/mp]","") 'replace [/mp]  to space
		imgmark_del=replace(SearchString,"[mp]","") 'replace [/mp]  to space
   		
	while Instr(1,SearchString, "[color=#",1)<>0
		max_len=len(SearchString)          'return the string long
		SearchChar1 = "[color=#" 
		MyPos1 = Instr(1,SearchString, SearchChar1,1)
		Result_string= right(SearchString,max_len-MyPos1-14)
		SearchString=Result_string '用于数据循环的使用
		imgmark_del=SearchString '用于返回的数据
	wend	
	while Instr(1,SearchString, "[size=",1)<>0
		max_len=len(SearchString)          'return the string long
		SearchChar1 = "[size=" 
		MyPos1 = Instr(1,SearchString, SearchChar1,1)
		Result_string= right(SearchString,max_len-MyPos1-7)
		SearchString=Result_string '用于数据循环的使用
		imgmark_del=SearchString '用于返回的数据
	wend	
	while Instr(1,SearchString, "[img]",1)<>0
		max_len=len(SearchString)          'return the string long
		SearchChar1 = "[IMG]" 
		MyPos1 = Instr(1,SearchString, SearchChar1,1)
		SearchChar2 = "[/IMG]" 
		MyPos2 = Instr(1,SearchString, SearchChar2,1) +len(SearchChar2)	
		Result_string=left(SearchString,MyPos1-1)
		Result_string=Result_string & "『图片省略』" & right(SearchString,max_len-MyPos2+1)
		SearchString=Result_string '用于数据循环的使用
		imgmark_del=SearchString '用于返回的数据
	wend

	while Instr(1,SearchString, "[uploadimg]",1)<>0		
		max_len=len(SearchString)          'return the string long
		SearchChar1 = "[uploadimg]" 
		MyPos1 = Instr(1,SearchString, SearchChar1,1)
		SearchChar2 = "[/uploadimg]" 
		MyPos2 = Instr(1,SearchString, SearchChar2,1) +len(SearchChar2)	
		Result_string=left(SearchString,MyPos1-1)
		Result_string=Result_string & "『图片省略』" & right(SearchString,max_len-MyPos2+1)
		SearchString=Result_string '用于数据循环的使用
		imgmark_del=SearchString '用于返回的数据
	wend	
	while Instr(1,SearchString, "[url=",1)<>0		
		max_len=len(SearchString)          'return the string long
		SearchChar1 = "[url=" 
		MyPos1 = Instr(1,SearchString, SearchChar1,1)
		SearchChar2 = "[/url]" 
		MyPos2 = Instr(1,SearchString, SearchChar2,1) +len(SearchChar2)	
		Result_string=left(SearchString,MyPos1-1)
		Result_string=Result_string & right(SearchString,max_len-MyPos2+1)
		SearchString=Result_string '用于数据循环的使用
		imgmark_del=SearchString '用于返回的数据
	wend


'This Function can delete the middle of the mark [img] & [/img] contents,and clear <br> and space.
End Function
%> 
