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-03-2004 04:25 PM

Quote:

Originally Posted by fridayweb
Worked like a charm, thank you so much. Stupid me, I didn't think to comment it out, I thought I had to change it to usergroups or something. Thanks again!!

No problem, but before you actually commit to using my code, make sure you test it extensively. I've done so many changes to this hack, that even though I try everything several times before putting it here, you may still get some problems. If so, please let me know, I'll do what I can to help.

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

Anek 10-04-2004 09:42 PM

Quote:

Originally Posted by sv1cec
.......

You may remove that part of the code, and use it. Just replace:

PHP Code:

if($warn_type['warn_permban']=="Yes")
            {
$liftdate=0;
             }
            else
            {
$liftdate=$time_unban;
             } 

with

PHP Code:

            $liftdate=$time_unban

That should do it.

Let me know if it works.
.....

Perfect it works!!! :up:

Only a thing: when user is banned, him user title doesn't change.
I think that is sufficient set $user[customtitle]="banned" .. is it right?

sv1cec 10-05-2004 06:08 AM

Quote:

Originally Posted by Anek
Perfect it works!!! :up:

Only a thing: when user is banned, him user title doesn't change.
I think that is sufficient set $user[customtitle]="banned" .. is it right?

Well, to do that, find:

PHP Code:

 $liftdate=$time_unban

and right underneath that, add:

PHP Code:

$title="Temp. Banned" 

or "Banned" or whatever you want.

Then find:

PHP Code:

        $DB_site->query("
                UPDATE " 
TABLE_PREFIX "user SET
                usergroupid = 
$usergroupid,
                displaygroupid = 
$usergroupid
                WHERE userid = 
$user[userid] 

and replace it with:

PHP Code:

        $DB_site->query("
                UPDATE " 
TABLE_PREFIX "user SET
                usergroupid = 
$usergroupid,
                displaygroupid = 
$usergroupid,
                usertitle = 
$title
                WHERE userid = 
$user[userid] 


Anek 10-05-2004 07:58 AM

Thx a lot :)

This night I found a solution like yours

Code:

$liftdate=$time_unban;
                $usergroupid=8;
                                $usertitle= "<font color=\"red\">Banned</font>";
        $DB->query("
            INSERT INTO " . TABLE_PREFIX . "userban
            (userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate)
            VALUES
            ($user[userid], $user[usergroupid], $user[displaygroupid],'". addslashes($user['customtitle']) ."', '" . addslashes($user['usertitle']) . "', $bbuserinfo[userid], " . TIMENOW . ", $liftdate)");
        $DB->query("
                UPDATE " . TABLE_PREFIX . "user SET
                usergroupid = $usergroupid,
                displaygroupid = $usergroupid,
                usertitle = '". addslashes($usertitle) . "'
                WHERE userid = $user[userid]
            ");

This is the first time that I play with the code, I hope that everything will work.
Thanks still for the patience ^^

Goodspeed 10-06-2004 09:40 AM

Is it possible to remove warn points after the expiration of some time? And setup different time of expiration for each violation?

Thank you.

sv1cec 10-06-2004 02:36 PM

Quote:

Originally Posted by Goodspeed
Is it possible to remove warn points after the expiration of some time? And setup different time of expiration for each violation?

Thank you.

Yes, it is possible, that's what I have in my forums. Each violation has a maturity period, when that passes, a cron script removes the violation points from the user. However, as I've said, I haven't documented the changes I've made very neatly (not at all actually), so all I can do to help you, is to send you the related files and you have to take it from there. I'll provide as much help as I can, but don't expect me to do everything.

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

Goodspeed 10-07-2004 01:46 PM

Quote:

Originally Posted by sv1cec
Yes, it is possible, that's what I have in my forums. Each violation has a maturity period, when that passes, a cron script removes the violation points from the user. However, as I've said, I haven't documented the changes I've made very neatly (not at all actually), so all I can do to help you, is to send you the related files and you have to take it from there. I'll provide as much help as I can, but don't expect me to do everything.

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

It would be great if you leave these files here. Thank you!

j_86 10-07-2004 03:50 PM

Such a mod has been posted in this thread, 5 - 10 pages back.

sv1cec 10-07-2004 05:53 PM

Quote:

Originally Posted by JimpsEd
Such a mod has been posted in this thread, 5 - 10 pages back.

Try looking through the posts, I am almost sure I've posted here before. If you can't find it, let me know.

Rgds

Cryo 10-07-2004 09:11 PM

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?


All times are GMT. The time now is 04:20 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.01830 seconds
  • Memory Usage 1,763KB
  • 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
  • (6)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