Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Prohibit images in signatures?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jess
Starting Member

15 Posts

Posted - 06 September 2005 :  17:20:30  Show Profile  Visit Jess's Homepage
Is there a way to prohibit users from putting images in their signatures? I did some searching and found ways to limit the image sizes, which I will try for the time being, but I wonder if it would be possible to just disallow use of the "[img]" tag in the sigs?

I've got users putting images in their sigs that are 400x400 and it's getting ridiculous!

Thanks in advance for any help!

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 September 2005 :  17:33:28  Show Profile  Send ruirib a Yahoo! Message
Not aware of a mod for that, but could be done.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 06 September 2005 :  20:46:20  Show Profile
There was a semi-mod here before that created a div or layer in the sig - then you could set it to expand only so far then chop off the rest of the image. I didn't get it fully working though, but I think CSS is your answer.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 September 2005 :  03:36:02  Show Profile  Visit MarcelG's Homepage
Well, you can mod inc_func_common.asp to skip parsing the [img] tags if it's a (dynamic) signature....
But, be aware ; this eliminates ALL images in signatures.
in inc_func_common.asp find this code:

fString = ReplaceImageTags(fString)

replace it by this:
if fField_Type <> "signature" then
	fString = ReplaceImageTags(fString)
end if

Haven't tested it though, but I think it should work ok.

Static signatures are added to the message (T_MESSAGE), so you won't be able to filter those out, unless you filter out all images.

Handy tool
Some time ago I got this handy page from a member here at snitz:
http://www.oxle.com/source.asp?page=admin_SigImage.asp (log on at oxle with user demo/demo if you are not yet registered or do not wish to register)
Just copy that code, and save it as admin_sigimage.asp.
Add a link to that page from admin_home.asp, and you can edit all signatures which contain images, from 1 page.

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 07 September 2005 03:36:14
Go to Top of Page

Jess
Starting Member

15 Posts

Posted - 08 September 2005 :  19:04:27  Show Profile  Visit Jess's Homepage
Wow! Cool tool -- thanks! And thanks for the code, I'm going to try that first.

Jess
Go to Top of Page

Jess
Starting Member

15 Posts

Posted - 08 September 2005 :  19:10:11  Show Profile  Visit Jess's Homepage
OK, I replaced the code as you suggested, and it doesn't seem to have made any difference. Hmmm... I am using dynamic sigs, so that's not it. Guess I'll just try that tool and use it as you suggested to modify the images down.

Thanks for your help!
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 09 September 2005 :  04:03:26  Show Profile  Visit MarcelG's Homepage
Mmm...I'll experiment some more here, and let you know what I find out.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 September 2005 :  04:35:28  Show Profile
quote:
Originally posted by marcelgoertz
fString = ReplaceImageTags(fString)

replace it by this:
if fField_Type <> "signature" then
	fString = ReplaceImageTags(fString)
end if

Marcel, the problem there is that the FormatStr function doesn't have an fField_Type argument, that's in the chkString function. chkString is called when inserting the message in the database and FormatStr when it's pulled from the database, i.e., the [img] tag is not parsed before the message is inserted in the database.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 09 September 2005 :  04:54:34  Show Profile  Visit MarcelG's Homepage
I've got it!!!

in inc_func_common.asp, add this function ;
function FormatSig(fString)
	on Error resume next
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10), "<br />")
	if strBadWordFilter = 1 or strBadWordFilter = "1" then
		fString = ChkBadWords(fString)
	end if

	if strAllowForumCode = "1" then
		fString = ReplaceURLs(fString)
		fString = ReplaceCodeTags(fString)
	end if

	fString = ChkURLs(fString, "http://", 1)
	fString = ChkURLs(fString, "https://", 2)
	fString = ChkURLs(fString, "www.", 3)
	fString = ChkMail(fString)
	fString = ChkURLs(fString, "ftp://", 5)
	fString = ChkURLs(fString, "file:///", 6)

	if strIcons = "1" then
		fString = smile(fString)
	end if
	if strAllowForumCode = "1" then
		fString = extratags(fString)
	end if
	FormatSig = fString
	on Error goto 0
end function

Now, in topic.asp, replace this:
formatStr(Reply_MemberSig)

by this:
formatSig(Reply_MemberSig)

and
formatStr(Topic_MemberSig)

by
formatSig(Topic_MemberSig)
That't it ; this simply removes the image handling in the signatures, so the [img]-tags will not be processed.
Hope this helps.

Shaggy ; I understood that after I read that it didn't work...makes sense now

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 09 September 2005 04:55:50
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 September 2005 :  05:22:39  Show Profile
Also, find the following on line 70 of pop_preview_sig.asp:
"                <td bgcolor=""" & strForumCellColor & """ valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"">" & formatStr(chkString(strSigPreview,"preview")) & "</span></font></td>" & vbNewLine & _
And replace it with the following:
"                <td bgcolor=""" & strForumCellColor & """ valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"">" & formatSig(chkString(strSigPreview,"preview")) & "</span></font></td>" & vbNewLine & _

And, on line 89 of pop_preview.asp, find the following:
strMessagePreview = formatStr(chkString(strMessagePreview,"preview")) & "<hr noshade size=""" & strFooterFontSize & """>" & formatStr(chkString(cleancode(GetSig(strSigAuthor)),"preview"))
And replace it with the following:
strMessagePreview = formatStr(chkString(strMessagePreview,"preview")) & "<hr noshade size=""" & strFooterFontSize & """>" & formatSig(chkString(cleancode(GetSig(strSigAuthor)),"preview"))

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 09 September 2005 :  05:40:57  Show Profile  Visit MarcelG's Homepage
Indeed, forgot about the preview feature! Thanks Shaggy!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 September 2005 :  05:44:48  Show Profile
No probs

Anyone running the PM Mod will also need to make the relevant changes to those files, as well.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Jess
Starting Member

15 Posts

Posted - 15 September 2005 :  22:18:27  Show Profile  Visit Jess's Homepage
Thanks, you guys! I'll give this a shot.... :)
Go to Top of Page

Jess
Starting Member

15 Posts

Posted - 18 December 2005 :  13:14:23  Show Profile  Visit Jess's Homepage
I have to apologize... I never came back and let you know, but this worked beautifully. So thank you so much for your help!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.57 seconds. Powered By: Snitz Forums 2000 Version 3.4.07