Author |
Topic |
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 26 January 2009 : 16:16:55
|
I've been using this mod as part of my Site Supporter's Mod with no problems at all .... until recently
For some reason the filter: sLev = simply stopped working I was using it as a filter to either show an advert or not, ie if sLev = 0 show the advert
It seemed to work well for nearly a week and then stopped and doesn't seem to be recognised any more
Now the daftest bit is, I haven't made any changes at all so there's nothing that I have done to stop it from working; plus when it was noticed on my main forum that it had stopped working, I checked on my test forum (seperate files and database) and likewise it too had stopped working
I've checked both databases to make sure that M_SPONSORLEVEL is set correctly ie showing 0, 1 or 2 and they are The code is correct in the files - in fact as I've wrote it worked fine and the code has not been changed since it was working
I'm now starting to think that I'm going mad lol having spent four days trying to get to the bottom of this to no avail
...so HELP !! (please )
If anyone knows why the filter sLev = should suddenly for no explicable reason stop working I'd be grateful if you could tell me, or if not if you could help me solve this
Thanks< |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 27 January 2009 : 04:33:52
|
There is a function in inc_header.asp that retrieves the Slev value. Can you put a response.write(Slev) after that query, to see which value it retrieves? Just for testing....< |
portfolio - linkshrinker - oxle - twitter |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 27 January 2009 : 08:34:26
|
Hi Marcel, it comes back with the value 0 for test members with sponsor levels of 0, 1, 2
My function is written so:
'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_SPONSORDATE > '" & 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
else
MemberID = -1
mLev = 0
end if
And it is a MySql database if that makes a difference
Thanks
< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 January 2009 : 10:31:08
|
Change that first line to say:
< |
Edited by - Carefree on 27 January 2009 16:04:06 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 27 January 2009 : 15:13:23
|
That causes a HTTP 500 error Carefree< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 January 2009 : 16:04:50
|
Sorry, brainfart. Delete the members. from the field name.< |
Edited by - Carefree on 27 January 2009 16:05:23 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 27 January 2009 : 16:18:38
|
Edit...
Done the above change, it's fixed the HTTP500 error but it hasn't made a difference to the problem< |
Edited by - Webbo on 27 January 2009 16:20:33 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 January 2009 : 16:47:16
|
Try this:< |
Edited by - Carefree on 27 January 2009 18:43:54 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 27 January 2009 : 17:26:32
|
Sorry for the delay getting back ..
Still doesn't work :(< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 January 2009 : 17:59:37
|
About the only thing left that could cause a no-value would be expired dates of sponsorship. Did you verify the sponsorships are still valid? You could see if this is the cause by commenting out one line < |
Edited by - Carefree on 27 January 2009 18:01:00 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 27 January 2009 : 18:06:37
|
Hi Carefree - you're a star
The sponsorships were still valid so I couldn't see a problem with that line - however, commenting it out seems to have done the trick and sLev now seems to work as planned
I'll check the other functions to make sure nothing has been compromised, but they shouldn't have
Many thanks< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 27 January 2009 : 18:42:50
|
Webbo, the comparison of dates is incorrect. Change "strForumTimeAdjust" to "DatetoStr(strForumTimeAdjust)"
I found another flaw in the Sponsorship documentation. In "topic.asp", there are two comparisons for Change the first to say: Change the next to say: At appx line 500, add after At appx line 288, add after At appx line 130, add after At appx line 97, add after < |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 28 January 2009 : 04:12:55
|
Hi Carefree
quote: Webbo, the comparison of dates is incorrect. Change "strForumTimeAdjust" to "DatetoStr(strForumTimeAdjust)"
That causes an Error 500
The other changes I've already implemented variations of as part of the 'Site Supporters' mod < |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 28 January 2009 : 07:57:23
|
In your browser options, turn off "Use Friendly Error Messages". Then you'll get a usable error report. Make sure you have included the ", M_SPONSORDATE" in the first line of the strSql.< |
Edited by - Carefree on 28 January 2009 08:06:06 |
|
|
|
Topic |
|