Author |
Topic |
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 13:41:38
|
I am working on a new mod that is being developed to help users report offensive topics. At the moment, I have a Report Topic link at the top and bottom of topic.asp which takes the user to a normal site page and gets the referring URL. The user completes the form and it gets sent to all of the moderators, the idea being at least one of them should be around to do something about it straight away.
This was working ok until a user used the form several times, and the moderators asked if anything could be done.
My idea is to add a field to Forum_topics that identifies whether a topic has been reported or not. This field will also be used to hide the topic in question from everyone except the mods and admin.
I am fairly confident at editing the files to get what I want, but want to check that the following code will update the database as I intend - I will have to do this to the active database as I don't have the ability to test this offline unfortunately.
dbs_reported_topic.asp
Report Topic Mod [ALTER] Forum_Topics T_Reported#varchar(1)# [END]
Hopefully this will add one text field, limited to one character to Forum_topics. I should be able to implement this update via the Mod Implementation menu. Is this right?
|
And the hit's just keep on comin' |
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 13 June 2003 : 13:46:18
|
Try..
Report Topic Mod
[ALTER]
TOPICS
ADD#T_Reported#varchar (1)#
[END]
EDIT - The output from that was
quote:
ALTER TABLE FORUM_TOPICS ADD COLUMN T_REPORTED text (1) NOT NULL
|
Edited by - Hamlin on 13 June 2003 13:49:31 |
|
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 13:49:54
|
ok cheers, will try that. |
And the hit's just keep on comin' |
|
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 13:56:50
|
did that, got this
Adding Column T_REPORTED... ALTER TABLE FORUM_TOPICS ADD COLUMN T_REPORTED text (1) NOT NULL ALTER TABLE FORUM_TOPICS ADD COLUMN T_REPORTED text (1) NOT NULL 9 | Subscript out of range
what does that mean exactly
|
And the hit's just keep on comin' |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 13 June 2003 : 14:15:17
|
That happens because it was missing a # from the end of the code , it should have added the column ok though.
[ALTER]
TOPICS
ADD#T_Reported#varchar (1)##
[END]
|
|
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 14:19:40
|
well the forum still works, so on with the code, thanks for your help |
And the hit's just keep on comin' |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 13 June 2003 : 14:21:27
|
quote:
well the forum still works
You seem somewhat surprised |
|
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 16:25:22
|
there's a problem though,
-------------------------------------------------------------------------------- Microsoft JET Database Engine error '80004005'
The field 'FORUM_TOPICS.T_REPORTED' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.
/forums/post_info.asp, line 992
How can I set a default value for T_REPORTED using the dbs file? |
And the hit's just keep on comin' |
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
AceC
New Member
Cyprus
68 Posts |
Posted - 13 June 2003 : 16:35:42
|
Cheers, tried this -having looked at some other dbs files and no error was reported
Report Topic Mod [ALTER] Topics DROP#T_REPORTED### Add#T_Reported#varchar (1)##'y' [END]
Though it should really have been 'n' spose I could always change it later! |
And the hit's just keep on comin' |
|
|
|
Topic |
|