Adding signatures to private messages

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/66829?pagenum=1
05 November 2025, 12:47

Topic


philsbbs
Adding signatures to private messages
11 April 2008, 09:51


Hi,

I want to have the option to include profile signatures in private messages.
So far I've coded :-

Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><textarea cols=""45"" name=""Message"" rows=""10"" wrap=""VIRTUAL""

onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) &

"</textarea><hr><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Sig"" id=""Sig"" type=""checkbox"" value=""yes""

checked><label for=""Sig"">Check here to include your profile signature.</label></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _

In privatesend.asp

What do I add next.
<

 

Replies ...


cripto9t
11 April 2008, 19:57


I don't have pm running but I do have a copy, so I'm guessing at this.
Open privatesend_info.asp

find this
Code:
		txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")

Add this after it
Code:
		if strSignatures = "1" and strDSignatures <> "1" then
if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
end if
end if
find this
Code:
		txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(strPMSubject,"SQLString")
txtSubject = Replace(txtSubject, "RE: ", "")
txtSubject = Replace(txtSubject, "FWD: ", "")
And add the same code as above under it

I think that will work smile ps: this won't work for dynamic sigs. You'll have to make changes in another file for that. Search for "sig" in "topic.asp" to see how it's done there.<
philsbbs
12 April 2008, 15:43


got dynamic signatures turned off

tired this and no luck

any more ideas ?<
MaD2ko0l
12 April 2008, 17:07


u need dynamic sigs turned on for that bit of code to work

if strSignatures = "1" and strDSignatures <> "1" then
that line is saying that if sigs and dynamic sigs are on then get the sig<
philsbbs
13 April 2008, 01:25


turn it on and still does not work, can i send the two files to someone to double check.
thanks in advance.<
cripto9t
13 April 2008, 13:27


You should be getting an error saying it can't find the GetSig() function :)
Add in_func_members.asp to the includes
Code:
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" --> <%

If that doesn't work, post a link to a txt file and I'll look at them. <
philsbbs
14 April 2008, 04:37


http://philsbbs.com/privatesend.txt

http://philsbbs.com/privatesend_info.txt

Thanks in advance for your help.<
philsbbs
16 April 2008, 07:30


any news on this.<
philsbbs
17 April 2008, 15:25


cripto9t and news on this.<
cripto9t
17 April 2008, 18:57


Phil, I don't see anything wrong with it.
The input name is spelled "Sig" in Privatesend and "sig" in privatesend_info, so you can start there.
The next step I would take is see if I am getting all the right values.
Add these lines after "<%" in privatesend_info near the top of the page. and try to post a test pm.
Code:
Response.Write Request.Form("sig") & "<br >" & strSignatures & "<br />" & strDSignatures & "<br />" GetSig(strDBNTUserName)
Request.End

You should get

yes
1
0
signature text

if one of those values is missing then that's your problem, If not it should be working.<
philsbbs
19 April 2008, 19:00


Sig to sig had no inpact, about to try next suggestion.<
philsbbs
19 April 2008, 19:04


i got:-

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/privatesend_info.asp, line 48

Response.Write Request.Form("sig") & "<br >" & strSignatures & "<br />" & strDSignatures & "<br />" GetSig(strDBNTUserName)
----------------------------------------------------------------------------------------------------^
<
MaD2ko0l
19 April 2008, 21:17


Response.Write Request.Form("sig") & "<br >" & strSignatures & "<br />" & strDSignatures & "<br />" & GetSig(strDBNTUserName)
Request.End

;-) add the part in red<
cripto9t
20 April 2008, 18:20


Code:
Response.Write Request.Form("sig") & "<br >" & strSignatures & "<br />" & strDSignatures & "<br />" GetSig(strDBNTUserName)
Request.End
also Request.End should be Response.End
Code:
Response.Write Request.Form("sig") & "<br >" & strSignatures & "<br />" & strDSignatures & "<br />" & GetSig(strDBNTUserName)
Response.End
Sorry about that :)<
philsbbs
21 April 2008, 18:11


Done that change and got

1
1
Phil Forum Admin

But the message was not sent, not even in out box.
I've uploaded new .txt see previous message for link.
Please advise. <
philsbbs
30 April 2008, 10:14


bump<
cripto9t
04 May 2008, 10:13


But the message was not sent, not even in out box.
Response.End stopped it. Those lines were temporary to see the form output.<
philsbbs
05 May 2008, 06:31


Can you send me the working file.<
philsbbs
24 May 2008, 16:50


has anyone found a solution ?<
Carefree
24 May 2008, 23:50


My files are a bit different than yours, but I got mine working. I noticed that you deleted the second inclusion of inc_func_posting, they specifically said that it was necessary to leave that in. May want to consider putting it back.
I modified the checking routine a wee bit to say:
Code:

'	##################################### Include SIGs Mod ###############################
if strSignatures = "1" and strDSignatures <> "1" then
if ViewSig(MemberID) <> "0" then
CanShowSignature = 1
if Request.Form("Sig") = "yes" and GetSig(strDBNTUserName) <> " " then
txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature")
end if
end if
end if
' ##################################### Include SIGs Mod End ###########################

I included inc_func_common.asp in my privatesend_info.asp

Here are links to the two files in .txt format:

http://98.25.191.199/privatesend_info.txt
http://98.25.191.199/privatesend.txt<
philsbbs
25 May 2008, 18:38


Thanks it does the trick.<
Carefree
25 May 2008, 18:47


You're welcome. Glad I could help.<
© 2000-2021 Snitz™ Communications