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)
-   -   Warning Hack V1.5 (https://vborg.vbsupport.ru/showthread.php?t=65336)

sv1cec 09-26-2004 02:57 PM

Quote:

Originally Posted by msimplay
i'd still like expirable warnings

My mods provide for a "Warn Maturity". The warnings are automatically removed after they mature.

Rgds
----------
John

msimplay 09-26-2004 06:15 PM

Quote:

Originally Posted by sv1cec
My mods provide for a "Warn Maturity". The warnings are automatically removed after they mature.

Rgds
----------
John

from which page in this thread do i start searching ur mods a rough estimate please

BeasTboyz 09-26-2004 07:55 PM

Hey John, the first problem has been solved, the semicolon worked no problem.

I still have a problem with the private messaging though. The lines are uncommented just how you said to do and the next lines are just like yours. The SQL error is still the same though. You can view my Warn.php here if you want to verify anything for yourself.

Also, I warned my test account up to a ban and it went to the correct usergroup in the correct ban log (the one built into vB), but it said the ban was permanent. I have it set to 3 days in the Admin CP. If you have any idea what is going on with that I'd appreciate it.


Thanks for all the help,

Matt

Edit: just saw you run m1911.org, very :cool: Congrats on getting the forums running, I hadn't even seen them before. I always used http://forums.1911forum.com/ :) Anyhow, just wanted to let you know I've learned a LOT from your site

sv1cec 09-27-2004 03:42 AM

Matt,

Thanks for the nice words about M1911.ORG, appreciated. Yes, we have our own forums site running since June.

As for the mods, there were a couple of minor mistakes in your warn.php, so I had them corrected. I guess the problem with the eval statement was a dot, just before the = sign. Anyway, I attached it here.

Let me know if it works.

Rgds

msimplay 09-27-2004 07:03 AM

i hope two idea's i've seen on these forums make it into version 2.0
Expirable warnings
Can't warn same post twice

BeasTboyz 09-27-2004 09:13 AM

sv1cec, It didn't work. The first problem I had was that I needed a new colum in warn_types called warn_maturity. I made that, but now I'm still getting the problem with the PM function:

Code:

Database error in vBulletin 3.0.3:

Invalid SQL: insert into vb3_pmtext values ('','1','Matt','You have been warned','Dear BeasTboyz,

You have been warned for one of your posts, which violated the Forums Rules.

The reason you have been warned is because Other reasons not listed (Warning Type = Miscellaneous), for which you have been given 2 point(s).

The post for which you are warned can be seen here.

The admin/moderator who warned you, entered this comment:

=======================================
test
=======================================

Your total Warning Level at the moment is: 5 point(s).

If you reach the maximum of 6, you will be banned from the Forums, for 3 days.

To see details about all the warnings you have received, until now, please click here.

Please reply back if you have a dispute.','a:1:{i:5;s:9:\"BeasTboyz\";}','4','1096279642','1','1')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Monday 27th of September 2004 05:07:22 AM
Script: http://www.observedtrials.net/vb/Warn.php
Referer: http://www.observedtrials.net/vb/War...d=5&post=73439
Username: Matt
IP Address: xx.xx.xx.xx

Is the problem with the pmtextid column in my vb3_pmtext table? It seems like its possibly trying to enter the wrong pmtextid (*) instead of the next relevant number? This is just a shot in the dark here of course, I don't really know.

If you have any ideas I'd appreciate it :).

Matt

sv1cec 09-27-2004 10:22 AM

Quote:

Originally Posted by BeasTboyz
sv1cec, It didn't work. The first problem I had was that I needed a new colum in warn_types called warn_maturity. I made that, but now I'm still getting the problem with the PM function:

Is the problem with the pmtextid column in my vb3_pmtext table? It seems like its possibly trying to enter the wrong pmtextid (*) instead of the next relevant number? This is just a shot in the dark here of course, I don't really know.

If you have any ideas I'd appreciate it :).

Matt

Matt,

I found a few more differences between your warn.php and mine. I am attaching your file with the new code. It is in the SQL Query that inserts those values in the omtext table. The problem is that I haven't touched that part of the code myself, so I guess we have a ... version discrepancy here.

Let me know if this one works.

John

sv1cec 09-27-2004 10:25 AM

Quote:

Originally Posted by msimplay
i hope two idea's i've seen on these forums make it into version 2.0
Expirable warnings
Can't warn same post twice

Expirable warnings are there today, you will just have to figure out some things yourself, as I haven't kept notes on my changes.

As for not warning the same post twice, I think I've got it working by adding the following code:

PHP Code:

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


in your warn.php file, just before the line :

PHP Code:

// User Exists? 

The User Exists line is found twince in the code, I am not sure if you should add the above if statement in both instances, I think you should. Let me know if it works OK.

Rgds

John

msimplay 09-27-2004 10:51 AM

Quote:

Originally Posted by sv1cec
Expirable warnings are there today, you will just have to figure out some things yourself, as I haven't kept notes on my changes.

As for not warning the same post twice, that's easy to implement, only one query to the warnings table. However, I do not have the time to do it right now. If I manage to get it, I'll post the code here.

Rgds

yeh i found the expirable warnings bit it will suffice for now
however it would be good to have it intergrated into the hack itself for example the way it was in mikes warning hack for vb2

Spamming expires 30 days
Rudeness expires 1 day
Signature expires 30 days

its settable per warning but the way i found in this thread was as a whole 30 days from the time set per warning

BeasTboyz 09-27-2004 10:55 AM

Quote:

Originally Posted by sv1cec
Matt,

I found a few more differences between your warn.php and mine. I am attaching your file with the new code. It is in the SQL Query that inserts those values in the omtext table. The problem is that I haven't touched that part of the code myself, so I guess we have a ... version discrepancy here.

Let me know if this one works.

John

Wow John, thanks for all of your help!

It appears to be working great now :D except for two small things.

1.) If a user has a warning level of 5 and the ban level is 6 and I give them a warning worth 2 points it takes the level up to 6, but when I remove the warning it keeps an extra point in "reserve" that I can't seem to erase. I can of course go into the my user table and remove it from the last column, but I thought I'd let you know in case you want to fix it.

2.) At the bottom of the Warn.php interface (on the site) it says "Once you reach warning level 6, you will be banned for 3 days". Well, I'm not banning them, I have a usergroup on my site I add them to called the Kiddie Korner, and that is the only place they're allowed to post. I would like to say "Once you reach warning level 6, you will be moved to the Kiddie Korner for 3 days"


All times are GMT. The time now is 08:57 AM.

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.01514 seconds
  • Memory Usage 1,761KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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