Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Subscribing New Members at Registration
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

arup
New Member

United Kingdom
63 Posts

Posted - 20 May 2003 :  07:54:20  Show Profile
I remember a previous thread on this subject, and that someone was going to write some code to enable this. Has it been done? I can't seem to find anything.

Regards,

Edited by - ruirib on 13 June 2003 09:53:44

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 May 2003 :  11:59:37  Show Profile  Send ruirib a Yahoo! Message
I can't remember it either. What did you want anyway? To add a board subscription for each new member?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 05 June 2003 :  08:33:03  Show Profile
Ruirib,

Yes that is exactly what I was after - adding a board level subscription for each new registration.

Can you help??

Regards,
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 June 2003 :  13:22:46  Show Profile  Send ruirib a Yahoo! Message
I suppose you have your forum set to allow board level subscriptions then, and each category and forum has been changed for that purpose?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 06 June 2003 :  06:07:13  Show Profile
I do indeed
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 June 2003 :  09:55:05  Show Profile  Send ruirib a Yahoo! Message
Then it's just a matter of creating a couple SQL scripts to add a entry to the subscriptions table for the new member. I'll have a look at it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 06 June 2003 :  10:28:38  Show Profile
Thanks I really appreciate your help on this.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 June 2003 :  11:56:17  Show Profile  Send ruirib a Yahoo! Message
I need to know what database system you're using, ok?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 11 June 2003 :  07:02:50  Show Profile
Sorry, should have said. I'm using Access 2000.

Thanks,
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 June 2003 :  07:32:59  Show Profile  Send ruirib a Yahoo! Message
Ok, will have a look at it tonight.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 13 June 2003 :  07:20:13  Show Profile
thanks rui. :-)
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 June 2003 :  07:22:32  Show Profile  Send ruirib a Yahoo! Message
Ok, will have a look at it in a little while, I've been quite busy lately. Sorry for the delay.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 June 2003 :  09:52:11  Show Profile  Send ruirib a Yahoo! Message
Ok, here it goes. Find line# 187, register.asp. Add the code in green:

                        my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

			'My additions to subscribe a member to board level

			strSql = "SELECT @@IDENTITY As NewID"
			Dim myRs, myMid

			set myRs = Server.CreateObject("ADODB.Recordset")

			myRs.Open strSQl, my_Conn, adOpenKeyset, adLockOptimistic, adCmdText
			
                        myMid = myRs(0)  'Obtain the member id to

			myRs.Close
			Set myRs = nothing

			strSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS (MEMBER_ID,CAT_ID, FORUM_ID,TOPIC_ID) VALUES (" 
			strSql = strSql & myMid & ",0,0,0)"

			'Add the entry to the subscriptions table

			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 

			Call DoCount

Then find line # 571 (already considering the addition of the previous lines). Again, add the code in green:

	                 my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 

			'My additions to subscribe a member to board level

			strSql = "SELECT @@IDENTITY As NewID"
			
			set myRs = Server.CreateObject("ADODB.Recordset")

			myRs.Open strSQl, my_Conn, adOpenKeyset, adLockOptimistic, adCmdText
			
                        myMid = myRs(0)  'Obtain the member id to

			myRs.Close
			Set myRs = nothing

			strSql = "INSERT INTO " & strTablePrefix & "SUBSCRIPTIONS (MEMBER_ID,CAT_ID, FORUM_ID,TOPIC_ID) VALUES (" 
			strSql = strSql & myMid & ",0,0,0)"

			'Add the entry to the subscriptions table

			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 


			if strEmail = "1" and strEmailVal = "1" then
				'Do Nothing
			else
				Call DoCount
			end if

I've tested the code both with email validation on and off and it worked in my test forum.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

arup
New Member

United Kingdom
63 Posts

Posted - 13 June 2003 :  11:51:00  Show Profile
Ruirib,

That's great, it works a treat.

Thanks very much indeed.

Regards,
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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07