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 DEV-Group
 DEV Bug Reports (Open)
 Bug + fix: pop_subscription.asp
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 January 2008 :  11:05:41  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
The fix I posted before will correct all issues of repeated posts subscriptions, by clicking the various subscription links, except when you try to click the link to subscribe a topic to which you already had subscribed. In order to fix it for this situation too, two changes to in pop_subscriptio.asp are needed.

Change 1. Around line#83, where you now have

elseif (sublevel = "TOPIC" or sublevel = "FORUM") and (CheckSubscriptionCount("CAT", Member_ID, CatId, 0, 0) > 0) then
SendHigherLevelMsg "CAT", CatId
elseif sublevel = "TOPIC" and (CheckSubscriptionCount("FORUM", Member_ID, CatID, ForumID, 0) > 0) then
SendHigherLevelMsg "FORUM", ForumId
else
' Delete any lower subscriptions to prevent duplicates emails.....
if SubLevel = "FORUM" or SubLevel = "CAT" or SubLevel = "BOARD" then

Replace it by

elseif sublevel = "TOPIC" and (CheckSubscriptionCount("FORUM", Member_ID, CatID, ForumID, 0) > 0) then
SendHigherLevelMsg "FORUM", ForumId
elseif sublevel = "TOPIC" and (CheckSubscriptionCount("TOPIC", Member_ID, CatID, ForumID, TopicID) > 0) then
SendHigherLevelMsg "TOPIC", ForumId

else
' Delete any lower subscriptions to prevent duplicates emails.....
if SubLevel = "FORUM" or SubLevel = "CAT" or SubLevel = "BOARD" then


Then another change is needed in the function SendHigherLevelMessage. I will post the full code, highlighting the changes

Replace the current function

sub SendHigherLevelMsg(SubLevel, Id)
' -- If an overriding subscription is found, return the appropriate error message.
dim rs
Response.Write "You currently are subscribed to "
if sublevel = "BOARD" then
Response.Write "<br />all posts in " & strForumTitle & ""
elseif sublevel = "CAT" then
strSql = "SELECT CAT_NAME "
strSql = strSql & "FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & "WHERE CAT_ID = " & Id

set rs = my_Conn.Execute (strSql)
strCategory = rs("CAT_NAME")

rs.close
set rs = nothing

Response.Write "<br />all posts in "
Response.Write "<br />" & strCategory

elseif sublevel = "FORUM" then
strSql = "SELECT F_SUBJECT "
strSql = strSql & "FROM " & strTablePrefix & "FORUM "
strSql = strSql & "WHERE FORUM_ID = " & Id

set rs = my_Conn.Execute (strSql)
strForum = rs("F_SUBJECT")

rs.close
set rs = nothing

Response.Write "<br />all posts in "
Response.Write "<br />" & strForum

end if
Response.Write "<br />This will also mail you notification at the level you requested.</font></p>" & vbNewline & _
" <script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
end sub

by

sub SendHigherLevelMsg(SubLevel, Id)
' -- If an overriding subscription is found, return the appropriate error message.
dim rs
Response.Write "You currently are subscribed to "
if sublevel = "BOARD" then
Response.Write "<br />all posts in " & strForumTitle & ""
elseif sublevel = "CAT" then
strSql = "SELECT CAT_NAME "
strSql = strSql & "FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & "WHERE CAT_ID = " & Id

set rs = my_Conn.Execute (strSql)
strCategory = rs("CAT_NAME")

rs.close
set rs = nothing

Response.Write "<br />all posts in "
Response.Write "<br />" & strCategory

elseif sublevel = "FORUM" then
strSql = "SELECT F_SUBJECT "
strSql = strSql & "FROM " & strTablePrefix & "FORUM "
strSql = strSql & "WHERE FORUM_ID = " & Id

set rs = my_Conn.Execute (strSql)
strForum = rs("F_SUBJECT")

rs.close
set rs = nothing

Response.Write "<br />all posts in "
Response.Write "<br />" & strForum

ElseIf sublevel="TOPIC" Then
Response.Write "<br />this topic."
end If

If sublevel <> "TOPIC" Then
Response.Write "<br />This will also mail you notification at the level you requested." & vbNewline
End If

Response.Write "</font></p><script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine

end sub




<


Snitz 3.4 Readme | Like the support? Support Snitz too

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 18 January 2008 :  12:38:18  Show Profile  Visit HuwR's Homepage
I'm not convinced about this either, if I subscribe to a forum I do not get any choices to subcribe to topics at all so subscribing to both is not possible<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 January 2008 :  12:45:55  Show Profile  Send ruirib a Yahoo! Message
This also fixes a repeated topic subscription, but I do agree that the default behavior is for the link to change to unsubscribe. So, as much as the other one, the change isn't required in an unchanged base code forum.

Won't do any harm either, though .<


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

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 18 January 2008 :  12:49:32  Show Profile  Visit HuwR's Homepage
but you can't get a repeated topic subscription, not without bypassing the forum code anyway<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 18 January 2008 :  12:51:10  Show Profile  Send ruirib a Yahoo! Message
Yeah, I just checked that and changed my reply above. It must be something specific to Bobby's forum.

I guess I could argue that this will not rely on the interface code alone, but it's forcing the argument a bit .<


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

Lon2
Junior Member

USA
151 Posts

Posted - 27 February 2009 :  12:04:31  Show Profile
quote:
Originally posted by HuwR

but you can't get a repeated topic subscription, not without bypassing the forum code anyway

We do. How do we fix this? I posted here: Bug + fix, post_info.asp<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 28 February 2009 :  10:28:27  Show Profile  Send ruirib a Yahoo! Message
You can try and apply both fixes. It will stop repeated subscriptions, but will not delete the existing ones...


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

Lon2
Junior Member

USA
151 Posts

Posted - 12 March 2009 :  15:06:09  Show Profile
Ok I'm confused. I don't have a sub SendHigherLevelMsg(SubLevel, Id) routine in my pop_subscription... but I have it in post_info.asp. Is it possible you got these two mod files names mixed up, rui?

This mod (pop_subscription) and post_info.asp

Edited by - Lon2 on 12 March 2009 16:34:46
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 March 2009 :  16:42:39  Show Profile  Send ruirib a Yahoo! Message
I don't know man, it's been a long time since I did that.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07