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)

Rick Sample 10-20-2004 09:50 PM

Quote:

Originally Posted by sully02
Here is another option I am pondering...

Perhaps a "Statute of limitations" in regards to how long you have to warn a post. The reason I bring this up is because a moderator could be viewing a thread that has some replies from a few weeks ago, sees something he/she deems warn-worthy and issues a warning. The problem is, at the time, nobody found the post in question to be a problem.

I think something that says "After a post has been up for x hours/days/whatever time increment, a warning cannot be issued for it" would be a superb addition. Anybody else agree?

Thats actually a good Ideal, maybe after 30 days or something. I would hate for someone to get warned for a post they made a year or two ago lol

SamirDarji 10-20-2004 10:06 PM

But the only thing is, if a moderator can stumble on an old post like that and find that it breaks the rules, a user can do the same. It's like saying that after x days, the rules don't apply even if you broke them. My 2 cents.

sv1cec 10-21-2004 03:48 AM

Quote:

Originally Posted by SamirDarji
But the only thing is, if a moderator can stumble on an old post like that and find that it breaks the rules, a user can do the same. It's like saying that after x days, the rules don't apply even if you broke them. My 2 cents.

I have to agree with SamirDarji on that one, rules are rules, and if they were broken, no matter how old the post is, it deserves a warning according to my book at least.

Also, this is an administrative issue, your moderators should have rules, by which they moderate. If you want them not to warn old posts, just tell them so. Sorry, this idea doesn't appeal to me.

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

sv1cec 10-21-2004 05:55 AM

Quote:

Originally Posted by SamirDarji
With as many mods as you've made to this hack and the amount of contribution you've made, I say that you take all your modifications to this hack and release it as an add-on hack. There's so much!

SamirDarji, I am not fully aware of the administrative issues in this forum, and since I can't provide detailed instructions on how to move from this hack's version 1.5 to my version, I do not want to post a new hack (or even an add-on hack). For the time being, I'll keep posting my mods here, for those interested. Thanks for suggesting this though.

Rgds
---------
John

sv1cec 10-21-2004 07:38 AM

Quote:

Originally Posted by SnitchSeeker
Yes, members forward those types of PM's to admins.

I don't mind if it uses the exact same warning types. Well, either way is fine really. The non-post-related warnings we use are "siggie violation" "avatar violation" or "PM spam" - so we can isolate these out of the other warning types if that is easier.

As for where to place it, the logical places seem to me to be ..
.. a) from the user profile (same concept aas the link called "user options" that takes you to the admin cp
.. b) from the admin cp directly (either while editing a user or as a part of the warn system, like a new point called "warn a member" or something.
.. c) from the drop-down when you click in a member's name from inside a thread (along with "view __'s profile, view __'s home page, send __ a private message" etc.
.. d) as an option within the postbit mini-profile square thinigie that shows up beside (or above - depending on if you use legacy or not) each post.

SnitchSeeker,

I am working on this non-post-related warning thing (which is quite interesting) and there is an issue here. In the way I do it, there will be a link inside the user profile, which will allow you to warn him. However, since this is not related to the offensive item (PM or whatever), there is no way I can show the user, for which item he was warned. So the moderator who issues such a warning, should make sure that in the Comments field, enters the appropriate information, i.e. "Your PM send to user XYZ on October 25th 2004 was offensive".

Also, I made the same mistake again, started doing changes without documenting them very well, so you may act as my guinea pig for this thing. Is that OK with you? The file changes are not too many, but I haven't documented all the template changes I did. Oh well, I'll see what's the best I can come up with.

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

sv1cec 10-21-2004 08:05 PM

Gentlemen,

Per your request, I am releasing the non-post related warnings feature of this hack. This will allow you to warn members, for offenses which are not related to a post, but to other things, like a PM or an improper Home Page etc.

The file contains the instructions, with one catch. It asks you to replace the contents of two of your templates, while I could just ask you to replace a particular line. Sorry, but I haven't kept a copy of the original line, so instead of screwing you up with mistakes, I decided to give you the whole template.

The option to allow non-post related warnings, is controlled from your AdminCP/Manage Warning Options.

If you have problems with this mod, please let me know.

Enjoy
-------------
John

SnitchSeeker 10-22-2004 05:50 AM

Quote:

Originally Posted by sv1cec
SnitchSeeker,

I am working on this non-post-related warning thing (which is quite interesting) and there is an issue here. In the way I do it, there will be a link inside the user profile, which will allow you to warn him. However, since this is not related to the offensive item (PM or whatever), there is no way I can show the user, for which item he was warned. So the moderator who issues such a warning, should make sure that in the Comments field, enters the appropriate information, i.e. "Your PM send to user XYZ on October 25th 2004 was offensive".

Also, I made the same mistake again, started doing changes without documenting them very well, so you may act as my guinea pig for this thing. Is that OK with you? The file changes are not too many, but I haven't documented all the template changes I did. Oh well, I'll see what's the best I can come up with.

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

Sure, I'm willing to be a guinea pig. :) But it looks like you have fixed it beautifully by adding it to the admin cp instead.

I'll install it later tonight and let you know how it works for me!

Thanks so much for taking the time to do this!! :)

SnitchSeeker 10-22-2004 03:32 PM

Quote:

Originally Posted by sv1cec
Gentlemen,

Per your request, I am releasing the non-post related warnings feature of this hack. This will allow you to warn members, for offenses which are not related to a post, but to other things, like a PM or an improper Home Page etc.

The file contains the instructions, with one catch. It asks you to replace the contents of two of your templates, while I could just ask you to replace a particular line. Sorry, but I haven't kept a copy of the original line, so instead of screwing you up with mistakes, I decided to give you the whole template.

The option to allow non-post related warnings, is controlled from your AdminCP/Manage Warning Options.

If you have problems with this mod, please let me know.

Enjoy
-------------
John

I don't have the templates you mention installed. I must have missed an add-on to this hack somewhere. I like the hack as it is, but want this small addition.

Dybukk 10-22-2004 07:57 PM

I installed this hack....great work.

Only found one issue. If a user is already in the userban table and they reach the ban level you get a mySQL error since the code tries to INSERT a userid that already is in the table.

Also, is there a reason why the permanent ban usergroup can't be the same as the banned usergroup? I seem to remember reading that the banned usergroup is where the user returns to after being banned.

I was going to try and fix the SQL error myself by putting a check before inserting the user into the table. But I am a noob at php so I bet someone else has a better solution.

Edit:

Here is my solution, haven't fully tested it yet.

In Warn.php:

Find:
PHP Code:

$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "userban
            (userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate)
            VALUES
            (
$user[userid]$user[usergroupid]$user[displaygroupid]$user[customtitle], '" addslashes($user['usertitle']) . "', $bbuserinfo[userid], " TIMENOW ", $liftdate)"); 

Replace with:
PHP Code:

if ($check $DB_site->query_first("SELECT userid, liftdate FROM " TABLE_PREFIX "userban WHERE userid = $user[userid]"))
    {
        
// there is already a record - just update this record
        
$DB_site->query("
            UPDATE " 
TABLE_PREFIX "userban SET
            adminid = 
$bbuserinfo[userid],
            bandate = " 
TIMENOW ",
            liftdate = 
$liftdate,
            adminid = 
$bbuserinfo[userid]
            WHERE userid = 
$user[userid]
        "
);
    }
    else
    {
        
// insert a record into the userban table
        
$DB_site->query("
            INSERT INTO " 
TABLE_PREFIX "userban
            (userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate)
            VALUES
            (
$user[userid]$user[usergroupid]$user[displaygroupid]$user[customtitle], '" addslashes($user['usertitle']) . "', $bbuserinfo[userid], " TIMENOW ", $liftdate)
        "
);
    } 

This was just a quirk I found and I don't really see it ever coming up since most banned users don't post. If you see errors in my code, let me know.

sv1cec 10-23-2004 05:23 AM

I had the same issue, but as you point out, I thought that a banned member is not likely to post new offenses, so it would be impossible to get new warnings for them. Still, from a good-coding point of view, you are right, it should be taken into consideration.

Your code should work fine, although there is no point in saving adminid twice, in the first part of the if statement, right? LoL

rgds
--------
John


All times are GMT. The time now is 06:02 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.01656 seconds
  • Memory Usage 1,796KB
  • 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
  • (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