Adding signatures to private messages - Posted (2517 Views)
Member Locked
philsbbs
Posts: 397
397
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.
<
Phil
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Average Member
cripto9t
Posts: 881
881
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.<
    _-/Cripto9t\-_
Posted
Member Locked
philsbbs
Posts: 397
397
got dynamic signatures turned off

tired this and no luck

any more ideas ?<
Phil
Posted
Senior Member
MaD2ko0l
Posts: 1053
1053
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<
© 1999-2010 MaD2ko0l
Posted
Member Locked
philsbbs
Posts: 397
397
turn it on and still does not work, can i send the two files to someone to double check.
thanks in advance.<
Phil
Posted
Average Member
cripto9t
Posts: 881
881
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. <
    _-/Cripto9t\-_
Posted
Member Locked
philsbbs
Posts: 397
397
http://philsbbs.com/privatesend.txt

http://philsbbs.com/privatesend_info.txt

Thanks in advance for your help.<
Phil
Posted
Member Locked
philsbbs
Posts: 397
397
any news on this.<
Phil
Posted
Member Locked
philsbbs
Posts: 397
397
cripto9t and news on this.<
Phil
Posted
Average Member
cripto9t
Posts: 881
881
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.<
    _-/Cripto9t\-_
Posted
Member Locked
philsbbs
Posts: 397
397
Sig to sig had no inpact, about to try next suggestion.<
Phil
You Must enter a message