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)
 New topic with subject pre-filled?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gort
New Member

84 Posts

Posted - 27 April 2009 :  14:33:19  Show Profile
Snitz allows a direct link to a new topic. Is there a way for this link to "pre fill" the subject heading? So when user clicks a link they'd automatically see a new topic page with subject already filled in

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 27 April 2009 :  15:33:01  Show Profile  Visit HuwR's Homepage
not without writing the code yourself
Go to Top of Page

Carefree
Advanced Member

Philippines
4208 Posts

Posted - 27 April 2009 :  16:06:48  Show Profile
What did you plan to use for the auto-filled subject?

Example: Based on a hyperlink in a message, on a hyperlink which is static (unchanging), on the user's name, on the date, etc....

If using a static hyperlink, you could do something like this:

For the link: (replace the italicized text with your desired subject)

Response.Write	"<a href=""http://forum.snitz.com/FORUM/post.asp?method=Topic&FORUM_ID=" & ForumID & "&Subject=" & (your subject) & "' >New Topic</a>" & vbNewLine

For post.asp

Immediately after this routine:

if strRqMethod = "Category" or _
strRqMethod = "EditCategory" or _
strRqMethod = "URL" or _
strRqMethod = "EditURL" or _
strRqMethod = "Forum" or _
strRqMethod = "EditForum" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Topic" then

insert the following:

if not isNull(Request.Querystring("Subject")) then 
	TxtSub = (Request.Querystring("Subject"))
end if


Edited to fix link. Thanks, Huwr.

Edited by - Carefree on 27 April 2009 16:36:59
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20587 Posts

Posted - 27 April 2009 :  16:28:29  Show Profile  Visit HuwR's Homepage
this bit "?Subject=" should be "&Subject="
Go to Top of Page

Gort
New Member

84 Posts

Posted - 28 April 2009 :  12:56:47  Show Profile
Cool, thanks! I'll try that out!

I have a website with movie reviews so I'd want the auto-filled subject to be equal to the name of the movie. The name is dynamic but I should be able to incorporate that into the code.

Go to Top of Page

Gort
New Member

84 Posts

Posted - 28 April 2009 :  13:00:08  Show Profile
Worked like a charm. I may use this code for other applications. Very handy.
Go to Top of Page

Carefree
Advanced Member

Philippines
4208 Posts

Posted - 28 April 2009 :  13:32:30  Show Profile
You're welcome.
Go to Top of Page

Gort
New Member

84 Posts

Posted - 28 April 2009 :  17:26:42  Show Profile
When I edit a post, the subject is now blanked....that's odd
Go to Top of Page

Gort
New Member

84 Posts

Posted - 28 April 2009 :  17:32:55  Show Profile
Fixed it (exclude edit topic cases):

if not isNull(Request.Querystring("Subject")) AND strRqMethod <> "EditTopic"   then 
	TxtSub = (Request.Querystring("Subject"))
end if

Edited by - Gort on 28 April 2009 17:33:12
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.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07