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 10-07-2004 11:11 PM

Quote:

Originally Posted by Charlie O'Leary
sv1cec, I added your mature warnings cron job and it doesn't seem to do anything, even though I have several warnings that are over 1 month old. Any ideas what could be wrong?

What is the maturity period for those warnings? Do you have a maturity period in your warnings?

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

Cryo 10-07-2004 11:43 PM

Quote:

What is the maturity period for those warnings? Do you have a maturity period in your warnings?
Hrm, don't have anything that allows me to set that. What tables / modifications would need to be added / made in order to get that to work? Didn't see it anywhere else in this thread.

sv1cec 10-08-2004 06:01 AM

Since this thread is getting quite long, and there are several posts with replies I gave to users, based on my modifications of this excellent hack, and after being prompted by a fellow member here, I spend a whole night, putting down some notes to explain what my version of the hack does.

Unfortunatelly, when I was making those changes, I didn't kept a log, so it is not possible to provide step-by-step instructions. Also, it is not possible to implement one feature and leave out another. The whole thing is offered as a ... packaged deal, LoL.

Please be patient, remember that last night I slept only one hour, preparing these things and making the code more "public", until yesterday, it was only for internal consumption.

OK, hopefully when this message is complete, there will be several files uploaded. These are :

1. mymods.txt - a text file describing what my mods do, in addition or in difference to the original hack (even version 1.5, which should be installed before starting to change things). This file contains also the description of the tables that my mods use. IT DOES NOT CONTAIN STEP -BY-STEP INSTRUCTIONS ON HOW TO MODIFY THE TABLES, IT JUST SHOWS YOU THE TABLES STRUCTURE.
2. Warn.php - my version of Warn.php
3. admin_warn.php - my version of the file, this one should be uploaded into your admincp directory.
4. kill_warns.php - a cron script to automatically delete warnings, whose maturity period has been elapsed. This should be uploaded into your include/cron directory and activated from the "Add New Scheduled Task" in your AdminCP. Make it so it is run once a day. My settings for that are:
Title: delete_old_warnings
Day of the week : *
Day of the month : *
Hour : 3
Minute : 3
Log Entries : Yes
File : ./includes/cron/kill_warns.php
5. templates.txt - a file which contains all my warn-related templates. Some of them may be the same as the ones of the original hack, but since I do not know/remember which ones I've modified, I included them all. It also contains instructions, on how to modify the postbit and the postbit_legacy templates. If you have some of the warn templates already, make sure they contain my code. If some of the templates I list, are not in your system, you have to create them.

One more thing I remembered, as I finished this: Since I am not using the table that the original hack had for the banned users, the "Unban User" option is no longer available. I let vB cron job do the unbanning. Please test it though, because I am not sure how well it works. For example, in my hack, when a user is banned, his original user group id is maintained in the userban record, in order for it to be restored when the member is unbanned. I am not sure if this works though. Let me know.

Added Friday Oct 8th Evening:

If one is to allow multiple warnings for the same post (for various offences obviously), the person issuing the warning, should be able to see what other warnings were issued for this post. So, I edited Warn.php a little, and a couple of templates. The changes are reflected at the files below.

Added Saturday Oct. 9th morning:

I forgot to mention that the Warning Points a user has received, are also shown in his profile. So that brings the total number of templates you have to edit to 20!!!!

I guess this is the best I can do to describe how I customized this beautiful hack, to make it more suitable to my needs. Credits should all be given to Zero Tolerance for the hack, all I did was lots of trials and (a whole lot more) errors.

I'll try to help anyone who has issues, but I cannot guarantee it guys, there are two 2.5 years-old boys in this family, and this can be a really messy situation.

Regards

----------
John

Cryo 10-08-2004 09:32 PM

Absolutely wonderful, sv1cec! Thanks for the hard work, implementing these changes now. :) One question, is the maturity period a day variable? Meaning, if I wanted a warning to expire in 30 days, the maturity period would be set to 30?

sv1cec 10-09-2004 04:25 AM

Quote:

Originally Posted by Charlie O'Leary
Absolutely wonderful, sv1cec! Thanks for the hard work, implementing these changes now. :) One question, is the maturity period a day variable? Meaning, if I wanted a warning to expire in 30 days, the maturity period would be set to 30?

Yes Sir, it is on a day basis, so for 30 days you enter 30.

Rgds
---------

John

TheMayhem 10-10-2004 03:59 PM

My queries for the warning options are just not working. I'm trying to update from the original warning hack to the 1.5. Could anyone write something up real quickly for phpmyadmin that will delete the current warning options and readd the table with the necessary rows inside? I've spent 24 hours and I just can't seem to get it to work properly :(

M1th 10-10-2004 05:41 PM

Quote:

Originally Posted by sv1cec
Yes Sir, it is on a day basis, so for 30 days you enter 30.

Rgds
---------

John


Not sure if you got my email, John, but the warn maturity feature doesnt seem to work. I set one to be removed after 2 days. I even waited that long but didnt seem to have removed it.

sv1cec 10-10-2004 05:52 PM

Quote:

Originally Posted by M1th
Not sure if you got my email, John, but the warn maturity feature doesnt seem to work. I set one to be removed after 2 days. I even waited that long but didnt seem to have removed it.

M1th,

Please check that you have everything as described in the files a couple of posts above.

It seems it's working OK in my forums, so I am not sure what's the problem. Please check everything again.

And no, I haven't got any e-mail from you, sorry.

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

GamerJunk.net 10-10-2004 10:08 PM

Could you make it possible for the next release to add warning permissions by usergroup? That would help so only mods, supermods and admins could warn users.

SamirDarji 10-10-2004 10:44 PM

If I recall correctly, there actually is a hack for this somewhere in this thread.


All times are GMT. The time now is 04:22 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.01582 seconds
  • Memory Usage 1,752KB
  • 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
  • (5)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