vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/showthread.php?t=71992)

mcyates 11-28-2004 07:39 PM

Quote:

Originally Posted by sv1cec
1. BEFORE and AFTER parameter in SQL.

I would swear I used before, but I may be wrong. I'll change the documentation.

2. Revan's question. Two different things here, the maturity is the number of days that the points stay in a user's account. It doesn't pay to warn a user for a minor thing (maybe one point) and keep that warning point for ever. If you do not want that to happen, yes, you need to set the maturity of the warnings to something like 99999.

Yes, a member sees a link, which shows him his own warnings.

3. Torqued. If the column hasn't been added because of the mistake that mcyates reported, and which you were also getting, it's normal to receive an incorrect columns error. Now that you added the column, does it still produces that error?

4. Ptenthus, change that line (185) from

PHP Code:

$install[]="alter table ".TABLE_PREFIX."user add `warning_bans` int(2)"add `warningsint(5); 

to:

PHP Code:

$install[]="alter table ".TABLE_PREFIX."user add `warning_bans` int(2), add `warnings` int(5); 

Those damn quotes are the problem.

OK folks, sorry for these issues, I am trying my best.

Rgds
---------
John

No worries mate your doing a fantastic job.

sv1cec 11-28-2004 07:41 PM

OK folks, as you probably know, I've been working to implement an "Automatic Warning" feature. A member asked for it, and I thought it was a good idea.

Basically, what it does, is it issues a warning, when a user enters censored words in a post. I assume you are aware with the censorship option of vBulletin. Now, it's pretty much ready, and it traps censored words in new threads, new posts (answers to posts), when you edit a post you made, when you send a Private message.

What I want to ask you, is if you can think of any other area, where such an automatic warning will be necessary.

Your ideas would be appreciated.

If I do not hear from you until tomorrow morning (that's in about 8 hours from now), I'll upload Version 2.0 of AWS, as I have it now.

One more thing. Today, even though several of you have posted messages with questions, I haven't received a single notification from vbulletin.org. Did the same thing happened with you too?

Rgds
-----------

John

Torqued 11-28-2004 07:56 PM

Quote:

Originally Posted by sv1cec
3. Torqued. If the column hasn't been added because of the mistake that mcyates reported, and which you were also getting, it's normal to receive an incorrect columns error. Now that you added the column, does it still produces that error?

John,

Yes. After adding that column, I am still getting this error when adding a warning to a user:

Quote:

Database error in vBulletin 3.0.3:

Invalid SQL: insert into vb3warnings values('','11','1','1101678832','test','495','1',' A','','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136
Here's what I have in my "warnings" table:

Quote:

Field Type Attributes Null Default Extra Action

wid int(15) No auto_increment
warned_user int(15) No 0
warned_by int(15) No 0
warned_time int(15) No 0
warned_reason text No
warned_post int(15) No 0
warned_warning_id int(15) No 0
warned_status char(1) Yes NULL
removed_by int(15) Yes NULL
What am I missing?

No worries on the issues, mate! You're doing a great job! :) Thanks for all the hard work and for responding to other users' requests for features.

ptenthus 11-28-2004 08:33 PM

Fixed the quotes as you suggested, but am now getting the following when I run upgrade_warn.php:

Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /path/to/my/forum/admincp/upgrade_warn.php on line 187

sv1cec 11-28-2004 08:36 PM

Quote:

Originally Posted by Torqued
John,

Yes. After adding that column, I am still getting this error when adding a warning to a user:



Here's what I have in my "warnings" table:



What am I missing?

No worries on the issues, mate! You're doing a great job! :) Thanks for all the hard work and for responding to other users' requests for features.

OK, that explains it, you are missing the removed_date column, at the end of the table.

ALTER TABLE `warnings` ADD `removed_date` int(15)

That's all

Time to go to bed.

--------
John

Torqued 11-28-2004 09:04 PM

Thanks, John. That fixed it. :)

Torqued 11-28-2004 10:34 PM

John,

Seem I've found another issue:

I added a warning for a user as admin, and then removed that warning.

Whenever I try to add a warning for another post, I get the following message:

Quote:

An error has occured, the following message has been left below:

This post has already been warned for. You cannot issue another warning for it.
I am getting this on posts that I have not warned this user for before.

I have done some additional testing, and it seems that this only occurs after I have added a non-post related warning. Once the user has a non-post related warning, if I try to add a post-related warning, I get the above error message. :)

edited again to add:

Even if the non-post related warnings are deleted/inactivated, I still get the above error message. I can only add new post-related warnings after I prune all non-post related warnings for a user. :)

Revan 11-29-2004 06:57 AM

Quote:

Originally Posted by sv1cec
2. Revan's question. Two different things here, the maturity is the number of days that the points stay in a user's account. It doesn't pay to warn a user for a minor thing (maybe one point) and keep that warning point for ever. If you do not want that to happen, yes, you need to set the maturity of the warnings to something like 99999.

Yes, a member sees a link, which shows him his own warnings.

Okay, cool. Thanks for replying.

I can see the usefulness of a maturity level, because my members seem to like posting short annoying messages that sometimes aint even on topic :p
Warning them for each and every post would get them kicked offa the board within a day ;)


About the AutoWarn, how about including autowarn for posting in threads older than [admin set time]? And this only has effect in [admin set forums]?
I know I could install hacks that auto closes threads, but I am having a problem with my users posting in ancient Newbie threads. I dont want ALL old threads to be closed, as sometimes its not bad to revive them, but being welcomed by a dude who just joined after the welcomed member has 200 posts, thats just dumb ;)


//peace

sv1cec 11-29-2004 07:08 AM

Quote:

Originally Posted by ptenthus
Fixed the quotes as you suggested, but am now getting the following when I run upgrade_warn.php:

Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /path/to/my/forum/admincp/upgrade_warn.php on line 187

Show me that area of the file, there is no ']' in that line. Show me a few lines before and a few after. Maybe you erased something more than just the quotes.

Rgds

sv1cec 11-29-2004 07:33 AM

Quote:

Originally Posted by Torqued
John,

Seem I've found another issue:

I added a warning for a user as admin, and then removed that warning.

Whenever I try to add a warning for another post, I get the following message:



I am getting this on posts that I have not warned this user for before.

I have done some additional testing, and it seems that this only occurs after I have added a non-post related warning. Once the user has a non-post related warning, if I try to add a post-related warning, I get the above error message. :)

edited again to add:

Even if the non-post related warnings are deleted/inactivated, I still get the above error message. I can only add new post-related warnings after I prune all non-post related warnings for a user. :)

Oooops,

This thing is getting too complicated. It's impossible to test every combination!!

OK, easy one. Please find the following line in Warn.php:

PHP Code:

if($_POST['post']=="" || !$_POST['post'] || $_POST['post']<1){
RunError("Invalid Post ID Input");
}

if(
$postwarnedalready=$DB->query_first("select warned_post from ".TABLE_PREFIX."warnings where warned_post='{$_GET['post']}'") AND $warn_options[multiple_per_post]=="No")
{
RunError("This post has already been warned for. You cannot issue another warning for it.");


Change it to:


PHP Code:

if($_POST['post']=="" || !$_POST['post'] || $_POST['post']<1){
RunError("Invalid Post ID Input");
}

if(
$postwarnedalready=$DB->query_first("select warned_post from ".TABLE_PREFIX."warnings where warned_post='{$_POST['post']}'") AND $warn_options[multiple_per_post]=="No")
{
RunError("This post has already been warned for. You cannot issue another warning for it.");


Sorry!!!


All times are GMT. The time now is 05:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01462 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete