Image in signature, not in body

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/59449?pagenum=1
05 November 2025, 10:53

Topic


jochovitch
Image in signature, not in body
16 September 2005, 04:15


Is there a way you can let people have images in their signatures and not in the body of the thread? So people can hav kind of an avatar in their signature, but are not able to post images in the text of their message.<

 

Replies ...


MarcelG
16 September 2005, 04:32


By default ; no. After some modding ; yes, certainly.
The first thing you'll have to do is enable dynamic signatures. In that way the sig is not added to the message, but it's pulled from the members-table along with the post.
Then there's the option 'allow images in posts' which currently works for both the actual image as well as the signature. Then we'd have to to the exact opposite of this mod.
I've got it!!! bigsmile in inc_func_common.asp, add this function ;
Code:
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:
Code:
formatStr(Reply_MemberSig)
by this:
Code:
formatSig(Reply_MemberSig)
and
Code:
formatStr(Topic_MemberSig)
by
Code:
formatSig(Topic_MemberSig)

After that find the following on line 70 of pop_preview_sig.asp:
Code:
"                <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:
Code:
"                <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:
Code:
strMessagePreview = formatStr(chkString(strMessagePreview,"preview")) & "<hr noshade size=""" & strFooterFontSize & """>" & formatStr(chkString(cleancode(GetSig(strSigAuthor)),"preview"))
And replace it with the following:
Code:
strMessagePreview = formatStr(chkString(strMessagePreview,"preview")) & "<hr noshade size=""" & strFooterFontSize & """>" & formatSig(chkString(cleancode(GetSig(strSigAuthor)),"preview"))

That't it ; this simply enables the image handling in the signatures, so the [img]-tags will allways be processed even if images in posts are disabled.
Hope this helps.<
© 2000-2021 Snitz™ Communications