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)

Latic 10-29-2004 10:34 PM

I've done like a little mod to this.

I didnt like the way it displayed the text on the forum, so i decided to place icons there instead.

<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'><img src="http://www.iconrate.net/community/images/warn/warn.gif" alt="Warn User"></a> · <a href='Warn.php?do=ViewWarnings&id=$post[userid]'><img src="http://www.iconrate.net/community/images/warn/warn.gif" alt="View Warnings For User"></a>
<if condition="$show['postcount']">· #<a

Thats the text i used i know its very basic its my first ever tweek of the code.

Could anyone look through the code and then tide this up for me?

Its a great mod by the way.

Yuneek 10-29-2004 10:45 PM

Found a solution.

sv1cec 10-30-2004 11:06 AM

Well, it looks as if I have to apologize to SnowBot (and possibly others) who asked if there is a way to eliminate the "Warn XYZ" and "View XYZ'z Warnings" from the PMs and have them shown only in the posts. Today, I went through the whole thread, and indeed I found the post where it was mentioned that this happens, but I didn't manage to find the answer.

So, if you want to remove those links from the PMs, then in your postbit, or/and postbit_legacy templates, find the part which checks if it should show the links. It should look something like that:

HTML Code:

<!-- checks for warning system -->
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
<!-- end of warning system -->

All you have to do, is enclose this in another if statement, so that it looks like the one below:

HTML Code:

<!-- checks for warning system -->
<if condition="THIS_SCRIPT=='showthread'">
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
</if>
<!-- end of warning system -->

And now of course, we can have alternatives. As you may remember, I have released some mods, which allow you to have "non-post-related warnings". One of the reason I made that change, was because someone asked for warnings to be issued when an offensive PM was send to another member. So the big question is, shall those links be left there, but take you to the "non-post-related warnings" function?

Your ideas are welcome.

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

beano33 10-30-2004 08:46 PM

I've installed Zero Tolerance's hack and it works as intended and will also be adding sv1cec expiration of warnings. I need help with a couple things to make it more effective for my board.

1) when members are unbanned they are sent to Coppa. How do I make it so it unbans them back to their original usergroup?

2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

Cryo 10-31-2004 02:23 AM

For whatever reason some old warnings are not expiring even thought hey have maturity dates. Any idea what could be causing this? I have warnings from August that are still active even though they only have maturity times of 30.

sv1cec 10-31-2004 04:04 AM

Quote:

Originally Posted by beano33
I've installed Zero Tolerance's hack and it works as intended and will also be adding sv1cec expiration of warnings. I need help with a couple things to make it more effective for my board.

1) when members are unbanned they are sent to Coppa. How do I make it so it unbans them back to their original usergroup?

2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

When a user is banned, his usergroup id is preserved (at least in my code) and when he is unbanned, he is restored to the original user group. I am not sure what the original code does here, sorry.

I'll have to check the e-mail thing, I've been thinking about it too.

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

sv1cec 10-31-2004 04:10 AM

Quote:

Originally Posted by Charlie O'Leary
For whatever reason some old warnings are not expiring even thought hey have maturity dates. Any idea what could be causing this? I have warnings from August that are still active even though they only have maturity times of 30.

First, make sure that your database tables have the structure below:

Field Type Null Key Default Extra
wid int(15) PRI auto_increment
warned_user int(15) 0
warned_by int(15) 0
warned_time int(15) 0
warned_reason text
warned_post int(15) 0
warned_warning_id int(15) 0
warned_status char(1) YES

warning_types

Field Type Null Key Default Extra
tid int(15) PRI auto_increment
warn_name varchar(255)
warn_points int(15) 0
warn_desc text
warn_maturity int(5) 0
warn_permban char(3)
warn_type char(3) YES

Make sure that those old warnings, do have a maturity period entered in the warning_types table. And finally make sure you have the cron script I've uploaded.

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

sv1cec 10-31-2004 10:05 AM

Quote:

Originally Posted by beano33
2) Can it be made to send the warning as both as PM and and Email? We don't give new users PM priveleges until they meet certain post count and length of membership criteria due to numerous incident of our PM system being used to spam.

Thanks!

Per your request, the notification can now be send, either as a PM or as an e-mail or as both.

Check the attached file.

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

beano33 10-31-2004 02:11 PM

Thanks John!

sv1cec 10-31-2004 05:53 PM

Quote:

Originally Posted by beano33
Thanks John!

You are welcome Sir!

Rgds

bnn121 10-31-2004 11:46 PM

Quote:

In postbit, find the following code:

PHP Code:

<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a> &nbsp;</if> 

Right above it, add:

PHP Code:

 
<!-- checks for warning system -->
<if 
condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if 
condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<
a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='
Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
<!-- end of warning system --> 


In the above instructions I'm able to find that one line of code in my postbit and postbit_legacy templates for my first board style...now I have three more styles...and when I go to look for that first line of code...it does not find that exact line of code...what is finds is this.

PHP Code:

<if condition="$show['postcount']">? #<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if> 

I noticed that right after this part of the code

Quote:

<if condition="$show['postcount']">
there is a period or dot or whatever that is.

Now all three of my other styles have this code in it...just like I qouted...but my first style is just like the instructions line of code.

Is there any reason to have that period or dot or whatever it is in that line of code for the other three styles?

In the original instructions of this hack it is said to find

Quote:

PHP Code:

In template 'postbit' AND 'postbit_legacy'
Find:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<if 
condition="$show['postcount']">#<a
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Replace With:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<
a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[musername]</a> ? <a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[musername]'s Warnings</a>
                <if condition="$show['
postcount']">? #<a
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 


In refence to the first set of code i posted above ...once this original code is changed...where does this new code come in? Is the original modified code getting overwritten or is it getting put in between the origianl modded code?

Roms 11-01-2004 01:16 AM

Thanks for the warning system. :)

*Clicks install

bnn121 11-01-2004 01:16 AM

Database error in vBulletin 3.0.1:

Invalid SQL: update warning_options set
banned_limit='14',
points_before_banned='5',
banned_usergroup_id='8',
troll_usergroup_id='4',
protected_usergroups='6|15',
multiple_per_post='Yes',
send_pm_warning='$pmoption'
where oid='1'
mysql error: Unknown column 'send_pm_warning' in 'field list'

mysql error number: 1054

Script: /board/admincp/admin_warn.php
Referer: /board/admincp/admin_warn.php?act=view

This occured when I was in AdminCP attempting ot change the

Allow multiple warnings for the same post?
and
Send PM to the warned member

bnn121 11-01-2004 01:26 AM

I think I found the problem...either this is not to be in the database or it is.

I your mymods.txt it makes no mention of the

send_pm_warning

but yet its being called in your

admin_warn_php file

If this needs to be added to the database table under warning options...what should the varibles be?

bnn121 11-01-2004 02:20 AM

Quote:

I fixed this issue...seems I had to many lines in my template...LOL
Quote:

Still looking for some help with the two last post of mine...Thanks
Now...I have another issue...I'm seeing


10. Template warn_viewtype_row

at the lower right hand side of this screen shot.

how do I get ride of that?

crd 11-01-2004 06:47 PM

what about warning for non post related infractions.

Wow a lot of chat about this hack. I'm having a problem with people registering and sending spammy PM's. It would be nice if there was a way for users to click to report spam pm to some mod and it would go right to their profile with a warn this user right there . These spammers don't typically make posts so tying their warning to a post is not be very useful.

rinkrat 11-01-2004 09:01 PM

OK, I just installed but there is no clue as to what warning type's (sic) are. Can you do a quick run though of different sample warning types that can possibly be used with this system and how they are configured. It's hard for a new user to create one when it's not explained. You might want to just pre-configure a basic setup so it works out of the box.

sv1cec 11-02-2004 03:20 AM

Quote:

Originally Posted by bnn121
Database error in vBulletin 3.0.1:

Invalid SQL: update warning_options set
banned_limit='14',
points_before_banned='5',
banned_usergroup_id='8',
troll_usergroup_id='4',
protected_usergroups='6|15',
multiple_per_post='Yes',
send_pm_warning='$pmoption'
where oid='1'
mysql error: Unknown column 'send_pm_warning' in 'field list'

mysql error number: 1054

Script: /board/admincp/admin_warn.php
Referer: /board/admincp/admin_warn.php?act=view

This occured when I was in AdminCP attempting ot change the

Allow multiple warnings for the same post?
and
Send PM to the warned member

You have to add the send_pm_warning field first, obviously, so install that mod first.

Rgds

sv1cec 11-02-2004 03:23 AM

Quote:

Originally Posted by bnn121
Now...I have another issue...I'm seeing


10. Template warn_viewtype_row

at the lower right hand side of this screen shot.

how do I get ride of that?

Remove that line from the previous template mentioned. You just added that descriptive line, in the text of the previous template, which should be warn_viewtype_end (I think).

Rgds

sv1cec 11-02-2004 03:25 AM

Quote:

Originally Posted by crd
what about warning for non post related infractions.

Wow a lot of chat about this hack. I'm having a problem with people registering and sending spammy PM's. It would be nice if there was a way for users to click to report spam pm to some mod and it would go right to their profile with a warn this user right there . These spammers don't typically make posts so tying their warning to a post is not be very useful.

The function for non-post related offenses is there already. When someone reports you an offensive PM, go to the User profile of the sender and warn him.

Rgds

sv1cec 11-02-2004 03:31 AM

Quote:

Originally Posted by rinkrat
OK, I just installed but there is no clue as to what warning type's (sic) are. Can you do a quick run though of different sample warning types that can possibly be used with this system and how they are configured. It's hard for a new user to create one when it's not explained. You might want to just pre-configure a basic setup so it works out of the box.

I've attached a list of my warning types. Don't worry about the first field in the list, it's generated automatically. The rest of the fields are not displayed properly, this is a text file, but if you follow each row you'll get the proper fields.

Let me know if this helps.

Rgds

sv1cec 11-02-2004 03:34 AM

Quote:

Originally Posted by bnn121
In the above instructions I'm able to find that one line of code in my postbit and postbit_legacy templates for my first board style...now I have three more styles...and when I go to look for that first line of code...it does not find that exact line of code...what is finds is this.

PHP Code:

<if condition="$show['postcount']">? #<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if> 

I noticed that right after this part of the code

there is a period or dot or whatever that is.

Now all three of my other styles have this code in it...just like I qouted...but my first style is just like the instructions line of code.

Is there any reason to have that period or dot or whatever it is in that line of code for the other three styles?

In the original instructions of this hack it is said to find


In refence to the first set of code i posted above ...once this original code is changed...where does this new code come in? Is the original modified code getting overwritten or is it getting put in between the origianl modded code?

Put my code right before that thing about postcount. As for where my code goes in comparison with the original code, the original code does not make any checks, so my code just replaces

HTML Code:

<a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[musername]</a> ? <a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[musername]'s Warnings</a>
Finally, that period is there, to separate the links. Have a look at the forum and you will see "Warn Xyz ? View Xyz's Warnings ? #1", the dot is going in between the links, to separate them.

Rgds

beano33 11-02-2004 03:43 AM

Quote:

Originally Posted by sv1cec
You are welcome Sir!

Rgds

Unfortunately this won't work for me. :(
I need to know how to modify the original author's hack to send the email warning.

The only references I can find to PM there are in warn.php
here:
Code:

function SendPM($message,$title,$to,$from){
global $DB;
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'");  // Grab Member Its Going TO
if($from=="BOT"){
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$rpg_option['pmbot']}'"); // FROM Teh Bot =D
} else {
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
}
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature  ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$DB->query("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$DB->insert_id().", '{$to['userid']}')");
// Update pm count
$DB->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}

and here:
Code:

// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);

// Redirect


sv1cec 11-02-2004 04:34 AM

Quote:

Originally Posted by beano33
Unfortunately this won't work for me. :(
I need to know how to modify the original author's hack to send the email warning.

The only references I can find to PM there are in warn.php
here:
Code:

function SendPM($message,$title,$to,$from){
global $DB;
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'");  // Grab Member Its Going TO
if($from=="BOT"){
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$rpg_option['pmbot']}'"); // FROM Teh Bot =D
} else {
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
}
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature  ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$DB->query("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$DB->insert_id().", '{$to['userid']}')");
// Update pm count
$DB->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}

and here:
Code:

// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);

// Redirect


Well, if all you want to do, is to replace the PM sending with an e-mail sending, this is the code that sends the e-mail:

PHP Code:

$messageb="";
eval(
'$messageb .= "' fetch_template('warn_em') . '";');
$title="You have been warned";
$to=$user['userid'];
    if(
$warn_options['warner']=="")
    {
        
$fromemail=$bbuserinfo['email'];
        
$fromname=$bbuserinfo['username'];
    }
    else
    {
        
$warnerdata=$DB->query_first("select username, email from ".TABLE_PREFIX."user where userid='{$warn_options['warner']}'");
        
$fromemail=$warnerdata['email'];
        
$fromname=$warnerdata['username'];
    }
vbmail($user['email'], $title$messagebfalse$fromemail''$fromname); 

The 'if' concerns who sends the e-mail, people have requested that a "hidden warner" is used to send it. If you are not using that functionality, the code should be modified to:

PHP Code:

$messageb="";
eval(
'$messageb .= "' fetch_template('warn_em') . '";');
$title="You have been warned";
$to=$user['userid'];
$fromemail=$bbuserinfo['email'];
$fromname=$bbuserinfo['username'];
vbmail($user['email'], $title$messagebfalse$fromemail''$fromname); 

Notice that you need to create a new template, called warn_em, the layout needs to be slightly different from the one used for the PM.

Good luck.

beano33 11-02-2004 04:59 AM

Quote:

Originally Posted by sv1cec
Well, if all you want to do, is to replace the PM sending with an e-mail sending, this is the code that sends the e-mail:

Actually I'd like it to do both so the member has no excuse that he didn't receive a warning. Can I just tack this on after the PM code?



Quote:

The 'if' concerns who sends the e-mail, people have requested that a "hidden warner" is used to send it. If you are not using that functionality, the code should be modified to:

PHP Code:

$messageb="";
eval(
'$messageb .= "' fetch_template('warn_em') . '";');
$title="You have been warned";
$to=$user['userid'];
$fromemail=$bbuserinfo['email'];
$fromname=$bbuserinfo['username'];
vbmail($user['email'], $title$messagebfalse$fromemail''$fromname); 

Notice that you need to create a new template, called warn_em, the layout needs to be slightly different from the one used for the PM.

Good luck.
Thanks, I'll be using this one. I like to spread the abuse around :devious:

sv1cec 11-02-2004 05:48 AM

Quote:

Originally Posted by beano33
Actually I'd like it to do both so the member has no excuse that he didn't receive a warning. Can I just tack this on after the PM code?





Thanks, I'll be using this one. I like to spread the abuse around :devious:

I think you can do it.

Rgds

Kmaster 11-02-2004 09:04 AM

I have this hack installed modification by sv1cec. many thanks for all your worked.
One question:-
in the admincp to view that "View Warning Logs", if I have over 2000 members are warned, will it wait for long time to load the whole page? possibly separate in difference pages, likes 1 page show 20 warns, then go click next page see others.

Thanks in advance!!!

rgds,

bnn121 11-02-2004 09:11 AM

What are the parameters for this in the database? That mod is not in your instructions. This is all I see in your instrcutions

PHP Code:

 Belowplease find a description of the tables used
1. warning_options
Field                                          Type                  Null          Key          
Default          Extra
oid                                         int
(15)                           PRI                                   auto_increment
banned_limit                         int
(15)                             0
points_before_banned         int
(15)                             0
banned_usergroup_id         int
(15)                             0
protected_usergroups         varchar
(255)
troll_usergroup_id                 varchar(10)
multiple_per_post                 char(3)
2. warning_types
Field                  Type                  Null          Key          
Default          Extra
tid                    int
(15)               PRI                                   auto_increment
warn_name              varchar
(255)
warn_points            int(15)                             0
warn_desc              text
warn_maturity          int
(5)                                     0
warn_permban           char
(3)
3. warnings
Field                                          Type                  Null          Key          
Default          Extra
wid                                         int
(15)                           PRI                                   auto_increment
warned_user                         int
(15)                             0
warned_by                                 int
(15)                             0
warned_time                         int
(15)                             0
warned_reason                         text
warned_post                         int
(15)                             0
warned_warning_id                 int
(15)                             


Quote:

Originally Posted by sv1cec
You have to add the send_pm_warning field first, obviously, so install that mod first.

Rgds


sv1cec 11-02-2004 11:37 AM

Quote:

Originally Posted by bnn121
What are the parameters for this in the database? That mod is not in your instructions. This is all I see in your instrcutions

PHP Code:

 Belowplease find a description of the tables used
1. warning_options
Field                                          Type                  Null          Key          
Default          Extra
oid                                         int
(15)                           PRI                                   auto_increment
banned_limit                         int
(15)                             0
points_before_banned         int
(15)                             0
banned_usergroup_id         int
(15)                             0
protected_usergroups         varchar
(255)
troll_usergroup_id                 varchar(10)
multiple_per_post                 char(3)
2. warning_types
Field                  Type                  Null          Key          
Default          Extra
tid                    int
(15)               PRI                                   auto_increment
warn_name              varchar
(255)
warn_points            int(15)                             0
warn_desc              text
warn_maturity          int
(5)                                     0
warn_permban           char
(3)
3. warnings
Field                                          Type                  Null          Key          
Default          Extra
wid                                         int
(15)                           PRI                                   auto_increment
warned_user                         int
(15)                             0
warned_by                                 int
(15)                             0
warned_time                         int
(15)                             0
warned_reason                         text
warned_post                         int
(15)                             0
warned_warning_id                 int
(15)                             


You must have picked up the tables description before the mod which has the feature, or I must have screwed up something. In any case, the send_pm_warning is char(3).

Sorry about any inconvenience.

sv1cec 11-02-2004 11:41 AM

Quote:

Originally Posted by Kmaster
I have this hack installed modification by sv1cec. many thanks for all your worked.
One question:-
in the admincp to view that "View Warning Logs", if I have over 2000 members are warned, will it wait for long time to load the whole page? possibly separate in difference pages, likes 1 page show 20 warns, then go click next page see others.

Thanks in advance!!!

rgds,

It doesn't matter how many members you have, iwhat makes the difference is how many warnings you have issued. And yes, as far as I know they will all show in one page (haven't looked in that). Now for paging, I am not sure if my knowledge will allow me to do that, I'll give it a try tomorrow morning. If I'll come up with something, I'll let you know. I'll have to create at least 30 or 40 warnings in my test system to test that, so it might take some time.

Rgds

Kmaster 11-02-2004 12:01 PM

Quote:

Originally Posted by sv1cec
It doesn't matter how many members you have, iwhat makes the difference is how many warnings you have issued. And yes, as far as I know they will all show in one page (haven't looked in that). Now for paging, I am not sure if my knowledge will allow me to do that, I'll give it a try tomorrow morning. If I'll come up with something, I'll let you know. I'll have to create at least 30 or 40 warnings in my test system to test that, so it might take some time.

Rgds


Awaiting for the good news. thanks again!!!

rgds,

j_86 11-02-2004 02:54 PM

Hi sv1;

In the nopostrelatedwarnings instructions, I cannot find
PHP Code:

print_label_row("Maintain historical warnings list?<dfn>If set to No, warnings which expire or are removed, will be deleted and will not show in the user's account. <b>If this is changed from Yes to No, historical records will be deleted.</b></dfn>"'<select name="historical" class="bginput">'.$hoption.'</select>');

Anywhere, even though I have been through every single instruction again?

sv1cec 11-02-2004 03:14 PM

Quote:

Originally Posted by JimpsEd
Hi sv1;

In the nopostrelatedwarnings instructions, I cannot find
PHP Code:

print_label_row("Maintain historical warnings list?<dfn>If set to No, warnings which expire or are removed, will be deleted and will not show in the user's account. <b>If this is changed from Yes to No, historical records will be deleted.</b></dfn>"'<select name="historical" class="bginput">'.$hoption.'</select>');

Anywhere, even though I have been through every single instruction again?

That's why people version their software. LoL

Please keep in mind one thing I keep saying from the beginning. I maintain this hack, for my own usage, so some times, I do some changes which do not get to the public. Then, when someone else asks for some additional thing, the old part creeps up out of nowhere.

In any case, here are the files that I use, they have all the options. You may try them.

Sorry for any inconvenience.

Rgds

beano33 11-02-2004 03:16 PM

Quote:

Originally Posted by sv1cec
I think you can do it.

Rgds

It worked perfectly. I ended up using anonymous email after all as some of my mods have email addresses they don't want made public. For folks using Zero Tolerance's version this is what was done:

Find:
Code:

// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);

// Redirect

and immediately above it add:

Code:

$messageb="";
eval('$messageb .= "' . fetch_template('warn_em') . '";');
$title="You have been warned";
$to=$user['userid'];
$fromemail='X';
$fromname='Y';
vbmail($user['email'], $title, $messageb, false, $fromemail, '', $fromname);

X is the email address of the anonymous warning account you create. I made mine a do_not_reply email and direct users in the template to refer to their PM and View My Warnings page if they want to discuss the warning with the person who issued it.
Y is the username for the account.

You need to add the template warn_em
I used the one provided by sv1cec in this post and edited it for my board
https://vborg.vbsupport.ru/showpost....&postcount=408

Thanks again for all the help!

j_86 11-02-2004 03:58 PM

All my old warning types are no longer visable with some changes? Without going to much trouble, is there any warning type DB update I missed that may cause this?

PS: Many more thanks sv1

sv1cec 11-02-2004 04:10 PM

Quote:

Originally Posted by JimpsEd
All my old warning types are no longer visable with some changes? Without going to much trouble, is there any warning type DB update I missed that may cause this?

PS: Many more thanks sv1

No, there are no changes which may cause your old warnings to vanish. Check them out with an SQL Query, something like " select * from `warnings` ".

Or to be more precise, there might be something. The fact that I am using "active" and "inactive" warnings, in other words, I keep historical records. Check your warnings with the SQL above. If they are there, and they do not appear in the View Warnings, I'll explain what you have to do to see them again.

Rgds

j_86 11-02-2004 04:13 PM

They're still in the database.

But I notice you had a table warn_type in the warning_types table - which NULL = YES.

I created this entry too - could this be related?

sv1cec 11-02-2004 04:34 PM

No the warn_type, if set to Yes, means it is a post-related warning, if set to No, it is a non-post related one. If you upgraded to the latest version I posted, you have to go to the AdminCP and edit your warning types accordingly.

For the warnings not showing, the thing is, there is a column in the warnings table, called warned_status. If this is empty in your records, they may not show up in the View Warnings. You have to fill them in with the letter 'A'. In other words, run this query:

update `warnings` set warned_status='A'

Let me know if this works.

j_86 11-02-2004 04:59 PM

Working great :)

Many thanks sv1!

sv1cec 11-02-2004 05:05 PM

Quote:

Originally Posted by JimpsEd
Working great :)

Many thanks sv1!

You are most welcome.


All times are GMT. The time now is 04:42 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.02238 seconds
  • Memory Usage 2,006KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_html_printable
  • (12)bbcode_php_printable
  • (27)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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