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)
 Auto Subscribe to Topic in Quick Reply Box
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mister S
Starting Member

Greece
14 Posts

Posted - 23 February 2005 :  08:06:38  Show Profile  Visit Mister S's Homepage
Hi,

I've tweaked the code so that on a New Topic or Reply the tick box for "subscribe to this topic" is already ticked.

Now I'd like to have the Quick Reply enabled, but I don't know how I can make this by default so that the Subscribe to Topic is selected as ON by default.

Can anyone help with this?

Many thanks!

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 23 February 2005 :  08:12:09  Show Profile
You'll need to copy and paste the code for the chackbox from post.asp to topic.asp. At the very end of topic.asp there's a sub called QuickReply() which writes the quick reply form.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Mister S
Starting Member

Greece
14 Posts

Posted - 23 February 2005 :  09:03:47  Show Profile  Visit Mister S's Homepage
Excellent! Thanks for that.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 23 February 2005 :  09:06:33  Show Profile
You're welcome


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Mister S
Starting Member

Greece
14 Posts

Posted - 24 February 2005 :  07:37:19  Show Profile  Visit Mister S's Homepage
Ah, Shaggy, slight problem :(

I pasted this code into topic.asp:

Response.Write " <input name=""Tnotify"" id=""Tnotify"" type=""checkbox"" value=""1"" checked><label for=""Tnotify"">Subscribe to topic</label><br />" & vbNewLine

But... it now creates a subscription each time so that if a person writes two messages on the same thread there are 2 subscriptions created. They then get sent 2 emails when a new pot is made! I can't quite find the variable which shows if they've been subscribed already; if I can I'll just put a

IF VAR_ALREADYSUBSCRIBED = FALSE THEN

around the code above so they won't get re-subscribed.

Any help much appreciated.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 24 February 2005 :  07:53:55  Show Profile
This is the code you'll need for the check box itself:
'## Subscribe checkbox start ##
if strSubscription > 0 and postCat_Subscription > 0 and postForum_Subscription > 0 and strEmail = 1 then
	' -- Check for a topic subscription held by the user
	Dim strSubString, strSubArray, strBoardSubs, strCatSubs, strForumSubs, strTopicSubs
	if MySubCount > 0 then
		strSubString = PullSubscriptions(0, 0, 0)
		strSubArray  = Split(strSubString,";")
		if uBound(strSubArray) < 0 then
			strBoardSubs = ""
			strCatSubs = ""
			strForumSubs = ""
			strTopicSubs = ""
		else
			strBoardSubs = strSubArray(0)
			strCatSubs = strSubArray(1)
			strForumSubs = strSubArray(2)
			strTopicSubs = strSubArray(3)
		end If
	end if
	SubLinkFontStart = "                <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
	SubLinkFontEnd = "<br /></font>" & vbNewLine
	if InArray(strTopicSubs, strRqTopicID) and strRqMethod <> "Topic" then
		Response.Write SubLinkFontStart & ShowSubLink ("U", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd
	elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,strRqForumID) or InArray(strCatSubs,strRqCatID)) then
		Response.Write SubLinkFontStart & ShowSubLink ("S", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd
	end if
end if
'# Subscribe checkbox end ##
You'll need to replace a couple of variables in there which have different names in topic.asp than they do in post.asp, whicj is probably what's causing your problem.



Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07