The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
For some time I've been thinking of implementing a system where members of a forum can become a 'Site Supporter' by way of making a contribution such as an Annual or Quarterly subscription and receive acknowledgement for doing so.
Having searched for a mod that could acomplish this I found the 'Sponsoring Members Mod' by MarcelG and used this as the basis to my 'Site Supporter Mod'
The functionality of the mod is reasonably simple and is in Four parts:
Edit: The mod is now available with MarcelG's Sponsor Mod integrated into it:
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=284
Disclaimer: This mod is offered with no guarantees, and offered 'as is'
It has been tested on a MySql database, please back up all files before making any changes
Notes: If changing a member from 'Annual' or 'Quarterly' to 'None' in their profile, a date must still be entered in 'Supporter End Date:'
This has the advantage of showing that a member once supported and a suggested date is the date their subscription ran out
Enjoy [^]
<
Having searched for a mod that could acomplish this I found the 'Sponsoring Members Mod' by MarcelG and used this as the basis to my 'Site Supporter Mod'
The functionality of the mod is reasonably simple and is in Four parts:
- (1) The base code - 'Sponsoring Members Mod' by MarcelG
- (2) The 'Site Supporter' add-on in topic.asp to show whether or not a member is a 'Site Supporter'
- (3) An add-on to show an expiration date to a member's subscription which will also determine if the above shows in the mini-profile, or not
- (4) Modifications to members.asp to add two additional columns to show if a member is a Site Supporter, whether Annual or Quarterly, and also the expiration date of the member's subscription
Edit: The mod is now available with MarcelG's Sponsor Mod integrated into it:
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=284
Disclaimer: This mod is offered with no guarantees, and offered 'as is'
It has been tested on a MySql database, please back up all files before making any changes
Notes: If changing a member from 'Annual' or 'Quarterly' to 'None' in their profile, a date must still be entered in 'Supporter End Date:'
This has the advantage of showing that a member once supported and a suggested date is the date their subscription ran out
Enjoy [^]
<
Last edited by Webbo on 30 October 2008, 02:47
Posted
Hi Webbo,
Thanks so much for your contribution. I am sure it will be also appreciated by many others!
Thanks again!
Sincerely,
Etymon
<
Thanks so much for your contribution. I am sure it will be also appreciated by many others!
Thanks again!
Sincerely,
Etymon
<
Posted
Nice work Dave!<
portfolio - linkshrinker - oxle - twitter
Posted
Thanks Etymon and Marcel
I have now integrated Marcel's 'Sponsor Mod' and the 'Site Supporters Mod' as one and Carefree has repackaged it for me
It has now been released as 'Site Supporter Mod ver1.1' and can be downloaded from SnitzBitz:
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=284
<
I have now integrated Marcel's 'Sponsor Mod' and the 'Site Supporters Mod' as one and Carefree has repackaged it for me
It has now been released as 'Site Supporter Mod ver1.1' and can be downloaded from SnitzBitz:
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=284
<
Last edited by Webbo on 30 October 2008, 02:46
Posted
There was an error in the code.
_______________________________________________________________
Step 5b : Setting/Updating the M_SPONSORLEVEL, M_SPONSORDATE
Find this: (around line 1552) find this:
strSql = strSql & ", M_LEVEL = " & cLng("0" & Request.Form("Level"))
Paste this code right below it.
'---------- Site Supporter Mod
strSql = strSql & ", M_SPONSORLEVEL = " & cLng("0" & Request.Form("Sponsorlevel"))
strSql = strSql & ", M_SPONSORDATE = " & DatetoStr(cDate(Request.Form("Sponsordate")))
'---------- end Site Supporter Mod
_______________________________________________________________
The parts in red must be removed or errors in formatting will result when making changes to the profile that do NOT change already specified sponsor information.
The line should read:
strSql = strSql & ", M_SPONSORDATE = " & DatetoStr(Request.Form("Sponsordate"))
The readme.htm, the SiteSupporter 12.rtf, the pop_profile.asp & the zip file contents have been updated in SnitzBitz. <
_______________________________________________________________
Step 5b : Setting/Updating the M_SPONSORLEVEL, M_SPONSORDATE
Find this: (around line 1552) find this:
strSql = strSql & ", M_LEVEL = " & cLng("0" & Request.Form("Level"))
Paste this code right below it.
'---------- Site Supporter Mod
strSql = strSql & ", M_SPONSORLEVEL = " & cLng("0" & Request.Form("Sponsorlevel"))
strSql = strSql & ", M_SPONSORDATE = " & DatetoStr(cDate(Request.Form("Sponsordate")))
'---------- end Site Supporter Mod
_______________________________________________________________
The parts in red must be removed or errors in formatting will result when making changes to the profile that do NOT change already specified sponsor information.
The line should read:
strSql = strSql & ", M_SPONSORDATE = " & DatetoStr(Request.Form("Sponsordate"))
The readme.htm, the SiteSupporter 12.rtf, the pop_profile.asp & the zip file contents have been updated in SnitzBitz. <
Last edited by Webbo on 31 October 2008, 14:48
Posted
I've found a small bug in the code that affects the optional "slev = " function
In topic.asp this line (about 131) remove this line:
sLev = rsTopic("M_SPONSORLEVEL")
It doesn't perform any function and was left in when the mod was merged with MarcelG's
Edit: The Zip files in SnitzBitz have been updated<
In topic.asp this line (about 131) remove this line:
sLev = rsTopic("M_SPONSORLEVEL")
It doesn't perform any function and was left in when the mod was merged with MarcelG's
Edit: The Zip files in SnitzBitz have been updated<
Last edited by Webbo on 18 January 2009, 18:10
Posted
Can someone point me in the direction of how to add an automatic notification by either PM or Email when a member's Site Support is about to run out
eg: Check to see if member is a Site Supporter when visiting board and if so check expiry date and if equal to or less than 30days from expiration send Email or PM inviting them to renew
It sounds simple enough but i can't seem to get my head around it
Thanks
eg: Check to see if member is a Site Supporter when visiting board and if so check expiry date and if equal to or less than 30days from expiration send Email or PM inviting them to renew
It sounds simple enough but i can't seem to get my head around it
Thanks
Posted
In the modified "inc_header.asp"
Then make a "inc_sponsor_renew.asp" page to handle the check if PMs are allowed, use PM if so; else send EMail.
Code:
Look for the following lines:
' ########## Sponsor Mod ##########
strSql = "SELECT M_NAME, M_SPONSORLEVEL, M_SPONSORDATE"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME= '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND M_SPONSORDATE > '" & DatetoStr(strForumTimeAdjust) & "'"
set rsSponsor = my_Conn.Execute (strSql)
if rsSponsor.EOF or rsSponsor.BOF then
sLev = 0
else
sLev = rsSponsor("M_SPONSORLEVEL")
end if
rsSponsor.close
set rsSponsor = nothing
' ######## Sponsor Mod End ########
Change those to say:
' ########## Sponsor Mod ##########
strSql = "SELECT M_NAME, M_SPONSORLEVEL, M_SPONSORDATE"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME= '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND M_SPONSORDATE > '" & DatetoStr(strForumTimeAdjust) & "'"
set rsSponsor = my_Conn.Execute (strSql)
if rsSponsor.EOF or rsSponsor.BOF then
sLev = 0
else
sLev = rsSponsor("M_SPONSORLEVEL")
SponsorDate = rsSponsor("M_SPONSORDATE")
if SponsorDate <= DatetoStr(DateAdd("d",-30,strForumTimeAdjust)) then
' Send PM or EM
%>
<!--#INCLUDE FILE="inc_sponsor_renew.asp" -->
<%
end if
end if
rsSponsor.close
set rsSponsor = nothing
' ######## Sponsor Mod End ########
Posted
Looks good Carefree but what would you have in the inc_sponsor_renew.asp file?
Posted
I haven't tested this and there may be errors in the syntax, my head hurts and it's hard to concentrate. Give it a try and if you have errors, I'll try and fix later.
Code:
<%
if strPMStatus="1" then
' PMs allowed, send PM
set rsAdmin=Nothing
strSql = "INSERT INTO " & strTablePrefix & "PM (M_SUBJECT, M_FROM, M_TO, M_SENT, M_MESSAGE, M_MAIL, M_READ, M_OUTBOX) VALUES ("
strSql = strSql & "'" & strForumTitle & "&" Sponsor Renewal "'"
strSql = strSql & ", " & intAdminMemberID
strSql = strSql & ", " & MEMBERID
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strMessage = strMessage & ", '"You have previously chosen to become a forum sponsor. The sponsorship period "'"
if SponsorDate <= DatetoStr(strForumTimeAdjust) then
strMessage = strMessage & "'"will expire on: "'"
else
strMessage = strMessage & "'"expired on: "'"
end if
strMessage = strMessage & "'" & SponsorDate & "'"&". " & vbNewLine & vbNewLine
strMessage = strMessage & "'"You can extend your sponsorship of "" & strForumTitle & " within "<a href=""& strForumURL & pop_profile.asp?mode=edit>"your profile."</a>"'" & vbNewLine & vbNewLine
strSql = strSql & strMessage
strSql = strSql & ", " & TF
strSql = strSql & ", " & "0"
set rsPM=my_Conn.Execute(strSql)
else
' PMs not allowed, send EM
strRecipientsName = chkString(rsKey("M_NAME"),"SQLString")
strRecipients = chkString(rsKey("M_EMAIL"),"SQLString")
strFrom = strSender
strFromName = strForumTitle
strSubject = strForumTitle & " Sponsor Renewal "
strMessage = "Hello " & chkString(rsKey("M_NAME"),"SQLString") & vbNewLine & vbNewLine
strMessage = strMessage & "You received this message from " & strForumTitle & ". You have previously chosen to become a forum sponsor." & vbNewLine & vbNewLine
strMessage = strMessage & "The sponsorship period "
if SponsorDate <= DatetoStr(strForumTimeAdjust) then
strMessage = "will expire on: "
else
strMessage = "expired on: "
end if
strMessage = strMessage & SponsorDate & ". " & vbNewLine & vbNewLine
strMessage = strMessage & "You can extend your sponsorship of " & strForumTitle & " within "<a href="""& strForumURL & "& pop_profile.asp?mode=edit>""your profile.</a>" & vbNewLine & vbNewLine
Response.Write "strRecipientsName = " & strRecipientsName & "<br>"
Response.Write "strRecipients = " & strRecipients & "<br>"
Response.Write "strFrom = " & strFrom & "<br>"
Response.Write "strFromName = " & strFromName & "<br>"
Response.Write "strsubject = " & strsubject & "<br><br>"
Response.Write "strMessage = " & strMessage & "<br><br>"
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
%>
Posted
Hi Carefree, I'm getting Expected end of statement errors on lines 6 & 10 using the above inc_sponsor_renew.asp
Any help would be appreciated
Any help would be appreciated
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...