Author |
Topic |
stwilson
Junior Member
USA
385 Posts |
Posted - 23 January 2005 : 01:27:18
|
This idea is in regards to Oxle's sponsoring member mod found here:
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=51932
Has anyone updated this mod to include a start/stop date for the sponsorhip status? I have this mod installed but would like to grant sponsorship status annually. So when a member makes a site donation I would like to also enter a start and stop date. Has anyone see this done with this mod?< |
Shannon RidingArizona.com |
Edited by - stwilson on 04 December 2006 08:40:32 |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 24 January 2005 : 02:03:22
|
Good thought ; I was thinking of something similar myself....haven't found the time and inspiration to make it.< |
portfolio - linkshrinker - oxle - twitter |
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 26 January 2005 : 02:47:37
|
Just what I was thinking about a few days ago! Haven't had the time to look into it any more though.. Could anyone just give a push in the right direction on how to do this? < |
/Tribaliztic - www.gotlandrace.se -
|
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 26 January 2005 : 21:28:46
|
How about this? I will PayPal $25 (I know it's not much but hopefully more will offer up some help) to the developer who provides the tweek to this MOD. I hope Marcel takes this...I know your busy but this would really be a good mod to this MOD.< |
Shannon RidingArizona.com |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 27 January 2005 : 03:23:42
|
Shannon, I'd be happy to do it, if I could to it. But, as I said before to other people who asked me to do something ; I am no programmer. The only thing I can do is copy/paste programming ... < |
portfolio - linkshrinker - oxle - twitter |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 27 January 2005 : 19:16:26
|
Any other takers?< |
Shannon RidingArizona.com |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 28 January 2005 : 03:58:57
|
Well, I created this mod based on the 'Custom Member fields mod', so I guess the only thing that needs to be done is create two new columns in the FORUM_MEMBERS table, M_SPONSORSTART and M_SPONSOREND (or just one, M_SPONSOREND?) After that, we need an option for admins to sét these values, together with the M_SPONSORLEVEL (that's already in there...) If that's done, we need to change the function that checks for the sponsorlevel ;
'MarcelG's Sponsormod
'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_SPONSORLEVEL"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
strSql = strSql & " AND M_SPONSOREND > '" & 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
'end of MarcelG's Sponsormod Just a wild guess...< |
portfolio - linkshrinker - oxle - twitter |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 17 February 2005 : 00:52:44
|
Still looking for a solution to this. Any takers?< |
Shannon RidingArizona.com |
|
|
TStewartFan
Junior Member
190 Posts |
Posted - 17 February 2005 : 06:16:09
|
It shouldn't be that hard and do you really need a start date?!? I do not have this mod installed but chances are that somewhere within this mod an sql statemement is being made that resembles the following: strSql = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS strSql = strSql & " WHERE MEMBER_ID = " & intMemberID set rs = my_Conn.Execute (strSql)
Add the following beneath the set command: mStDate = rs("M_START") mStDate = rs("M_END")
strSql = "update " & strMemberTablePrefix & " MEMBERS set M_START= " & DateToStr(dtDateTime) & " WHERE MEMBER_ID = " & intMemberID my_Conn.Execute (strSql)
strSql = "update " & strMemberTablePrefix & " MEMBERS set M_END= " & (DateToStr(dtDateTime))+ 10000000000) & " WHERE MEMBER_ID = " & intMemberID my_Conn.Execute (strSql)
I am not going to install this mod into my forum but something along those lines otta work. Then all you would need to do is run an update statement if end date is < then todays day set end date to 0 and start date to 0< |
If You Have to Ask, You Wouldn't Understand. |
|
|
hawkdrean
New Member
73 Posts |
Posted - 25 March 2005 : 02:53:14
|
What do it do I added this mod and the only thing I can see that was added was the drop down box in the members profile. What else dose it do or show?< |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 15 August 2005 : 00:31:56
|
Marcel.....any chance you added the end-date to your sponsorship MOD? I still would pay for the update to this MOD. Any takers?< |
Shannon RidingArizona.com |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 30 September 2006 : 02:21:37
|
I'm still looking for someone to take on the job of adding a stop date for this sponsorship mod. What I hope to have is the ability to turn on the sponsorship for a period of time, like one year. Any takers interested in coding this up for some PayPal funds? I just don't have the time.< |
Shannon RidingArizona.com |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 03 December 2006 : 13:06:03
|
OK. I am finally getting around to attemping to add an expiration date to the Sponsorship Mod. Here is what I have done so far. I will post what I did and then my question:
1. Added the following (in red) to inc_header: strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_SPONSORLEVEL" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'" strSql = strSql & " AND M_SPONSORDATE > '" & strForumTimeAdjust & "'" set rsSponsor = my_Conn.Execute (strSql)
2a. Added the following to pop_profile: if mLev > 0 then '## is Member if mLev = 4 then '## Forum_SQL strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID" '---------- MarcelG: Start SponsorMOD strsql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SPONSORLEVEL" strsql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_SPONSORDATE" '--------- MarcelG: End SponsorMOD strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_AGE"
2b. AND furter down in pop_profile.asp I added the following: strSql = strSql & ", M_SPONSORLEVEL = " & cLng("0" & Request.Form("Sponsorlevel")) strSql = strSql & ", M_SPONSORDATE = " & cDate("0" & Request.Form("SPONSORDATE"))
3a. In inc-profile I did the following, again in red: if rs("M_SPONSORLEVEL") = 1 then Response.Write(" selected") Response.Write ">Supporting Member</option>" & vbNewLine & _ " <option value=""2""" if rs("M_SPONSORLEVEL") = 2 then Response.Write(" selected") Response.Write ">Gold Member</option>" & vbNewLine & _ " <option value=""3""" if rs("M_SPONSORLEVEL") = 3 then Response.Write(" selected") Response.Write ">Site Sponsor</option>" & vbNewLine & _ " </select>" & vbNewLine Response.Write " </td>" & vbNewLine & _ " </tr>" & vbNewLine Response.Write " <tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor& """ align=right valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Sponsorship Expiration: </font></b></td>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ valign=""top"">" & vbNewLine Response.Write " <input name=""SPONSORDATE"" size=""16"" value=""" & rs("M_SPONSORDATE") & """></font>" vbNewLine Response.Write " </td>" & vbNewLine & _ " </tr>" & vbNewLine end if 4. I added a new field to my table called M_SPONSORDATE. It is of the DateTime type and is 16 characters long (per my table editor)
My problem....drum roll please....it doesn't work. I do not get any errors. I can edit a member profile. I can see the new field I added called Sponsorship Expiration. I can see the default value that was entered when the field was created in my table. I enter a new date and submit without any errors but the new date does not write to the database. What am I missing?? Should I not have used the DateTime type for this expiration data? Thank you to anyone who can help.< |
Shannon RidingArizona.com |
|
|
RArch
Junior Member
United Kingdom
103 Posts |
Posted - 03 December 2006 : 17:30:11
|
Search for the word "update" in pop_profile, after it you will find a series of lines containing "strSql = strSql &...". This is code that creates the update statement for the member and writes it to the database, you need to add your SPONSORDATE to this update.
The update exists twice.
< |
|
|
stwilson
Junior Member
USA
385 Posts |
Posted - 03 December 2006 : 22:18:29
|
RArch,
Thanks for the post. In my post, #2a, is in the update section. I see no other place where I would include it again. Anyone else????< |
Shannon RidingArizona.com |
|
|
stwilson
Junior Member
USA
385 Posts |
|
Topic |
|