Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Creating dbs files
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  13:41:38  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
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  Show Profile
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
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  13:49:54  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
ok cheers, will try that.

And the hit's just keep on comin'
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  13:56:50  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
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'
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 13 June 2003 :  14:15:17  Show Profile
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]
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  14:19:40  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
well the forum still works, so on with the code, thanks for your help

And the hit's just keep on comin'
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 13 June 2003 :  14:21:27  Show Profile
quote:

well the forum still works


You seem somewhat surprised
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  16:25:22  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
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'
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 13 June 2003 :  16:31:47  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Run the following code in Alternative MOD Setup:
[ALTER]
TOPICS
ALTER#T_REPORTED#varchar (1)#NOT NULL#
[END]

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

AceC
New Member

Cyprus
68 Posts

Posted - 13 June 2003 :  16:35:42  Show Profile  Visit AceC's Homepage  Send AceC an ICQ Message
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'
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07