T O P I C R E V I E W |
Panhandler |
Posted - 13 June 2010 : 12:46:04 I need a mod that will allow the admin to limit a user's account to only one post in a 10-day period until the "time out" is lifted from the user's account.
A $25 USD donation will be made to Snitz Forums for a working "time out" mod.
|
15 L A T E S T R E P L I E S (Newest First) |
Carefree |
Posted - 23 July 2010 : 03:15:42 Just revisited this topic - added a page refresh, etc. to the admin page. Corrected code above and zip on SnitzBitz has been updated. |
Panhandler |
Posted - 15 June 2010 : 10:13:15 Okay. . .thank you so much for the help. A $25. donation has been made to Snitz Forum (split between the two listed donation locations).
|
Carefree |
Posted - 14 June 2010 : 22:41:01 Hadn't checked my mail before you asked, but yes. |
Panhandler |
Posted - 14 June 2010 : 21:23:24 quote: Originally posted by Carefree
You're welcome, glad I could help.
I sent you an email via the Snitz forums. Did you get it?
|
Carefree |
Posted - 14 June 2010 : 17:59:15 You're welcome, glad I could help. |
Panhandler |
Posted - 14 June 2010 : 17:49:38 Yea! That's working now! Thanks Carefree. . .!
This should be a very handy mod for restricting without censoring when/if things become heated. I think that just the threat of being on "time out" should calm some postings.
|
Carefree |
Posted - 14 June 2010 : 15:27:28 Zip file on SnitzBitz has been replaced with working code.
Replace "admin_timeout.asp" with the following:
Replace "inc_timeout.asp" with the following:
|
Panhandler |
Posted - 14 June 2010 : 13:41:11 The suggested code change helped. Here's what I got implemented now:
if Request.Form("Method_Type")="TimeSet" then my_Conn.Execute("UPDATE "& strMemberTablePrefix &"MEMBERS SET TIMEOUT=1 WHERE M_NAME='" & Request.QueryString("Member") & "'") SendBadMail elseif Request.Form("Method_Type")="TimeRel" then my_Conn.Execute("UPDATE "& strMemberTablePrefix &"MEMBERS SET TIMEOUT=0 WHERE M_NAME='" & Request.QueryString("Member") & "'") SendRelMail else |Full text code here|
Now have a new error: ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/campfire/admin_timeout.asp, line 93 The member is not deleted and I've tried it on three different members. |
HuwR |
Posted - 14 June 2010 : 11:56:25 in admin_timeout.asp, look for this code
strSql="UPDATE "& strMemberTablePrefix &"MEMBERS SET TIMEOUT=1 WHERE M_NAME=" & strMember
there will be 2 instances around line 133ish
change it to the following (both instances)
strSql="UPDATE "& strMemberTablePrefix &"MEMBERS SET TIMEOUT=1 WHERE M_NAME='" & strMember & "'"
|
Carefree |
Posted - 14 June 2010 : 11:24:34 I'll try and get it tested this afternoon and fix what ails it. |
Panhandler |
Posted - 14 June 2010 : 10:13:26 Now I'm really stuck. Sql problem now getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.90-community-nt-log]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 '' at line 1
/campfire/admin_timeout.asp, line 133
The dbs file looks pretty simple straight forward: TimeOut 1.0
[ALTER] MEMBERS ADD#TIMEOUT#INT#NULL# [END] |
Panhandler |
Posted - 14 June 2010 : 10:05:21 quote: Originally posted by HuwR
could be missing an include, maybe inc_footer ?
The line prior to WriteFooter wasn't terminated. Still testing. . .
|
HuwR |
Posted - 14 June 2010 : 10:01:26 could be missing an include, maybe inc_footer ? |
Panhandler |
Posted - 14 June 2010 : 09:52:01 Wow. . .fast work! Thanks. I'm testing now. admin_timeout.asp: Line 81 is missing a " Lines 133 & 136 are missing a )
Got them cured but now I'm stuck at line 212 with this error Microsoft VBScript runtime error '800a000d'
Type mismatch: 'WriteFooter'
Oops. . .never mind - got it. There was a & _ before the WriteFooter. Still testing. . .
/campfire/admin_timeout.asp, line 212 |
Carefree |
Posted - 13 June 2010 : 16:51:52 If nobody else has already done so, I'll write it this afternoon.
Here: TimeOut
This has not been tested. |