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: MOD Implementation
 Auto Insert subject in a PM
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gargoyle
Junior Member

USA
280 Posts

Posted - 15 December 2004 :  22:11:07  Show Profile  Visit Gargoyle's Homepage
I am trying to create a link for users to click to private message me their answers to a contest. I would like the link to "Automatically" insert the subject as well as my name. This is what I have so far ----

privatesend.asp?method=Topic&mname=Gargoyle


I just need to know what I need to add to it to make this link fill out the subject field as well. Anyone done this before ??

Here is a link to my Snitz powered Drag Racing site.

rasure
Junior Member

289 Posts

Posted - 16 December 2004 :  09:02:29  Show Profile  Visit rasure's Homepage
I asked a similar question here a while back but no one seemed to know the answer.

Psychic & Spiritual Development Resources
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 16 December 2004 :  11:04:32  Show Profile  Visit muzishun's Homepage
I tested this real quickly with just hard coding something into the right place. It should work just fine with a variable.

Around line 161 in privatesend.asp find the following code:

if strRqMethod = "Topic" then
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject:</b></font></td>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""" & Trim(ChkString(TxtSub,"display")) & """ size=""50""></td>" & vbNewLine & _
			"        </tr>" & vbNewLine
end if

Change it to look like this:

Dim strPMSubject
strPMSubject = Request.QueryString("mname")
if strRqMethod = "Topic" then
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject:</b></font></td>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""Contest Answers:" & strPMSubject & """ size=""50""></td>" & vbNewLine & _
			"        </tr>" & vbNewLine
end if

Change the code in red as you see fit, and that ought to get you working.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

Gargoyle
Junior Member

USA
280 Posts

Posted - 16 December 2004 :  19:58:06  Show Profile  Visit Gargoyle's Homepage
Well I appreciate your help but I was thinking more of adding it to a link rather than editing the code. Or do I have to edit the code to add it to a link ?

Here is a link to my Snitz powered Drag Racing site.
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 16 December 2004 :  20:34:16  Show Profile  Visit PeeWee.Inc's Homepage
you'll have to edit the code no matter what

De Priofundus Calmo Ad Te Damine
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 16 December 2004 :  21:16:05  Show Profile  Visit rasure's Homepage
Ok I think I've figured it out, tried it on my forums and works great

Replace the code in red...
if strRqMethod = "Topic" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""" & Trim(ChkString(TxtSub,"display")) & """ size=""50""></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

with...
& Request.Querystring("subject") &

then to fill in the subject field as a hyperlink use...
privatesend.asp?method=Topic&mname=rasure&subject=test pm

I suppose you could even go as far as filling in the message field too if needed.

Psychic & Spiritual Development Resources

Edited by - rasure on 16 December 2004 21:21:05
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 17 December 2004 :  01:21:10  Show Profile  Visit muzishun's Homepage
Glad you got it working.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

Gargoyle
Junior Member

USA
280 Posts

Posted - 17 December 2004 :  19:22:22  Show Profile  Visit Gargoyle's Homepage
Works awesome dude!! Thanks!! I edited the code a bit more to allow a message to be inserted from the link as well. Very cool!

Here is a link to my Snitz powered Drag Racing site.
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 17 December 2004 :  19:26:49  Show Profile  Visit rasure's Homepage
quote:
Originally posted by Gargoyle

I edited the code a bit more to allow a message to be inserted from the link as well.

What changes did you make to use the message field as well? just for reference

Psychic & Spiritual Development Resources
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 17 December 2004 :  22:04:47  Show Profile  Visit muzishun's Homepage
Around line 196, find this line:
		"          <td bgColor=""" & strPopUpTableColor & """><textarea cols=""45"" name=""Message"" rows=""8"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea></td>" & vbNewLine & _

Change the red text the same way you did the other one to suit your needs.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 17 December 2004 :  22:18:58  Show Profile  Visit rasure's Homepage
thank you

Psychic & Spiritual Development Resources
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 18 December 2004 :  01:23:42  Show Profile  Visit muzishun's Homepage
You're welcome.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07