T O P I C R E V I E W |
Webbo |
Posted - 28 October 2008 : 17:38:23 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: - (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
Enjoy: 'Site Supporter Mod' by Webbo
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
< |
15 L A T E S T R E P L I E S (Newest First) |
Webbo |
Posted - 28 October 2009 : 16:30:54 Hi Carefree - I'm not ignoring you just been too busy of late and not had chance to get back on with it |
Carefree |
Posted - 16 October 2009 : 21:40:31 That's odd because it works fine here. Did you make sure to set the sponsorship date at least 31 days in advance (so it didn't automatically reset to 1 again)? |
Webbo |
Posted - 16 October 2009 : 18:16:51 I couldn't get that to work Carefree, it didn't make any changes to the M_SPONSORREMIND value in the db when the sponsor date was changed to a later date than the forum date
I had a go at adding a checked checkbox to inc_profile and achieved this:
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor& """ align=right valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Reset Reminder:</b>" & vbNewline & _
" <input type=""checkbox"" name=""SPONSORREMIND"" value=""1"" checked=""true"">" & vbNewLine
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
if request("SPONSORREMIND") = "1" then
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_SPONSORREMIND=0 WHERE MEMBER_ID="&MEMBERID
my_Conn.Execute(strSql)
end if
However, I cannot get that to change the value to 0 either when the Submit button is clicked when editing a profile as admin
Any idea whats missing? |
Carefree |
Posted - 16 October 2009 : 01:02:52 No reason to add an extra step for the administrator. In "pop_profile.asp", look for the following lines (appx 1599-1601 in the file modified for sponsor mod):
|
Webbo |
Posted - 15 October 2009 : 03:00:24 I had a thought last night and the easiest way I think to do this would be to have a checkbox for the administrator to tick to set the member's M_SPONSORREMIND to 0 within inc_profile.asp whilst they are entering the 'Supporter End Date:' which has to be done manually
Added onto this code should do the job:
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor& """ align=right valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Supporter End Date:</b>" & vbNewline & _
" <br><small>eg: 01/01/2009</small></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top"">" & vbNewLine
Response.Write " <input name=""SPONSORDATE"" size=""14"" value=""" & rs("M_SPONSORDATE") & """></font>"
vbNewLine
I'll have a look at it tonight (UKtime) unless you beat me to it |
Carefree |
Posted - 14 October 2009 : 19:17:14 Yes. One solution to that would be to change the field from an integer to a string and use the date a reminder was sent. Alternatively, you could add a routine to set it to 0 upon renewal of the sponsorship. |
Webbo |
Posted - 14 October 2009 : 18:55:36 Strange one, it turned out to be an apostrophe in my forum's name that caused the error
Anyway, all tested now on MySql and the emailand PM function work well but the following line in inc_header.asp:
if SponsorDate >= DatetoStr(DateAdd("d",-30,strForumTimeAdjust))
needs changing to this:
if SponsorDate <= DatetoStr(DateAdd("d",+30,strForumTimeAdjust)) then
otherwise all sponsors with more than 30 days to renewal will receive the reminder
One thing though, if the column M_SPONSORREMIND in the database is set to 1 after the reminder has been sent out, that prevents repeat reminders being sent at each page view, but what will happen in a year's time - would this prevent further reminders being sent out?
Regards,
Dave |
Carefree |
Posted - 14 October 2009 : 16:23:53 quote: 's Forum Sponsor Renewal
Apparently you changed the code. I didn't have any apostrophe showing possession. |
Webbo |
Posted - 13 October 2009 : 17:18:50 I added the above because I didn't have Private Messaging added to my test forum (I forgot to remove it before posting it above )
Email function works fine now and with a MySql db, however I'm getting the following error for the PM function using MySql:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.67-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Forum Sponsor Renewal ', 1, 397, '20091013221505', 'You have previously chosen' at line 1
/forum/inc_sponsor_renew.asp, line 35
|
Carefree |
Posted - 12 October 2009 : 20:34:44 quote: Originally posted by Webbo
Nice work Carefree
One thing to add is that M_PMRECEIVE and M_SPONSORREMIND need adding also to the MEMBERS table:
PMRECEIVE is added by the private messages dbs file. |
Carefree |
Posted - 12 October 2009 : 20:29:01 duhhh yeah, that would cause it
Fixed it and added a check for a null value in code above. |
Webbo |
Posted - 12 October 2009 : 18:24:40 Found one problem and that is that once an email is sent out to one member then all member's M_SPONSORREMIND is set to 1, not just the member that was sent the email
I suspect caused by this line: strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_SPONSORREMIND=1" |
Webbo |
Posted - 12 October 2009 : 17:57:00 Nice work Carefree
One thing to add is that M_PMRECEIVE and M_SPONSORREMIND need adding also to the MEMBERS table:
[ALTER] MEMBERS ADD#M_SPONSORRENEW#int#NULL#0 ADD#M_PMRECEIVE#int#NULL#0 ADD#M_SPONSORREMIND#int#NULL#0 [END]
I've yet to test it with Private Messages but the email sending works well
I'll report back shortly |
Carefree |
Posted - 11 October 2009 : 18:44:57 You'll need to set a value in the member table to indicate that the EM/PM has been sent or the member will get them with every view of every page.
Site Supporter 2.0
[ALTER]
MEMBERS
ADD#M_SPONSORREMIND#int#NULL#0
[END]
Change this in "inc_header.asp" (it was backwards):
if SponsorDate >= DatetoStr(DateAdd("d",-30,strForumTimeAdjust)) then
This version includes a check if a reminder message has already been sent.
|
Carefree |
Posted - 11 October 2009 : 17:30:29 See this line:
Check the content of the strMessage line when it's output to the screen to make sure it says what you want. BTW, when you're happy with the EMail results, you can remove the lines beginning with:Response.Write |