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)
-   -   Soft Deleted Archive v2.7 (https://vborg.vbsupport.ru/showthread.php?t=70878)

mtha 11-09-2004 09:56 AM

I want to record the IP (and proxy IP) to deletionlog too.

Recently one of my member delete alot of his posts, without reason. checking IP migh tell some more information about the origine of the deletion.

This proxyIP detect can be used
https://vborg.vbsupport.ru/showthrea...threadid=61331

mtha 11-09-2004 10:04 AM

solution (assuming my proxyIP detector installed):

Run this query:

ALTER TABLE `deletionlog` ADD ipaddress VARCHAR(50) not null;
ALTER TABLE `deletionlog` ADD proxyip VARCHAR(50) not null;


In includes/functions_databuild.php:
- add ,ipaddress, proxyip after deldate added from previous hack (2 places)
- add ,'". IPADDRESS ."','". PROXYIP."' after " . TIMENOW . "' added from previous hack


Detail:

replace

PHP Code:

            $DB_site->query("
                REPLACE INTO " 
TABLE_PREFIX "deletionlog
                (primaryid, type, userid, username, reason, deldate)
                VALUES
                (
$postinfo[postid], 'post', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                '" 
addslashes(fetch_censored_text(htmlspecialchars_uni($delinfo['reason']))) . "', '" TIMENOW "')
            "
); 

by
PHP Code:

            $DB_site->query("
                REPLACE INTO " 
TABLE_PREFIX "deletionlog
                (primaryid, type, userid, username, reason, deldate, ipaddress, proxyip)
                VALUES
                (
$postinfo[postid], 'post', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                '" 
addslashes(fetch_censored_text(htmlspecialchars_uni($delinfo['reason']))) . "', '" TIMENOW "','"IPADDRESS ."','"PROXYIP."')
            "
); 


and replace

PHP Code:

            $DB_site->query("
                REPLACE INTO " 
TABLE_PREFIX "deletionlog
                (primaryid, type, userid, username, reason, deldate)
                VALUES
                (
$threadinfo[threadid], 'thread', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                 '" 
addslashes(htmlspecialchars_uni(fetch_censored_text($delinfo['reason']))) . "', '" TIMENOW "')
            "
); 

by

PHP Code:

            $DB_site->query("
                REPLACE INTO " 
TABLE_PREFIX "deletionlog
                (primaryid, type, userid, username, reason, deldate, ipaddress, proxyip)
                VALUES
                (
$threadinfo[threadid], 'thread', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                 '" 
addslashes(htmlspecialchars_uni(fetch_censored_text($delinfo['reason']))) . "', '" TIMENOW "','"IPADDRESS ."','"PROXYIP."')
            "
); 

This was tested working in vB3.0.3

If you dont want to add proxyIP address to the log, you have to remove all places saying proxyip :)

Then, in the softdeladmin.php, you can add some lines showing the proxys of the one who deleted thread/post next to his name.

Revan 11-09-2004 04:17 PM

I dont like the thought of assuming other hacks are installed... else cool addition :)

mtha 11-09-2004 08:15 PM

Quote:

Originally Posted by Revan
I dont like the thought of assuming other hacks are installed... else cool addition :)

You are right, porting the get proxyIP part over here.
Anyone who already installed my proxyIP hack dont need to do this part.

in includes/init.php

look for:
PHP Code:

{
    
define('ALT_IP'$_SERVER['REMOTE_ADDR']);



Add below

PHP Code:

// ####################### HN getproxyip START########################
// establish client Proxy address (if it exists) 
if ($_SERVER['HTTP_FORWARDED'] != ''

    
$proxyip $_SERVER['HTTP_FORWARDED']; 

else if (
$_SERVER['HTTP_X_FORWARDED_FOR'] != ''

    
$proxyip $_SERVER['HTTP_X_FORWARDED_FOR']; 

else if (
$_SERVER['HTTP_CLIENT_IP'] != ''

    
$proxyip $_SERVER['HTTP_CLIENT_IP']; 

else 

    
$proxyip ''


$proxyip preg_replace('/javascript/i''java script'$proxyip); 
$proxyip str_replace('"''"'$proxyip); 
$proxyip str_replace('<''&lt;'$proxyip); 
define('PROXYIP'str_replace('>''&gt;'$proxyip)); 
unset(
$proxyip); 
// ####################### HN getproxyip END ######################## 


mtha 11-29-2004 02:13 AM

Quote:

Originally Posted by mtha
02: CHECK ALL option. Can you make it to check all thread and check all post seperately?

Since I like being able to check posts and thread seperately, I did this one.

I now can select all post or all thread seperately

Look for
PHP Code:

                 if ($numthreads)
                 {
                         
print_label_row($vbphrase['thread_modname_link'], "<input type=\"checkbox\" name=\"allbox\" title=\"$vbphrase[check_all]\" onclick=\"js_check_all(this.form);\" />$vbphrase[check_all]"'thead'); 

Add above

PHP Code:

 ?>
 <script type="text/javascript">
 <!--
 function check_all_group(checkobj, value)
 {
         formobj = checkobj.form;
         for (var i = 0; i < formobj.elements.length; i++)
         {
                 elm = formobj.elements[i];
                 if (elm.type == "checkbox" && elm.value == value)
                 {
                         elm.checked = checkobj.checked;
                 }
         }
 }
 //-->
 </script>
 <?

look for
PHP Code:

                       print_table_header("$vbphrase[soft_deleted_threads] (Showing thread $iifcalc to $threadpage, total: $totalthreads threads)"); 

Replace with
PHP Code:

                       print_label_row("$vbphrase[soft_deleted_threads] (Showing thread $iifcalc to $threadpage, total: $totalthreads threads)""<input type=\"checkbox\" name=\"allbox_thread\" title=\"$vbphrase[check_all_thread]\" onclick=\"check_all_group(this, '0_thread');\" />"'thead'); 


Look for
PHP Code:

                       print_table_header("$vbphrase[soft_deleted_posts] (Showing post $iifcalc to $postpage, total: $totalposts posts)"); 

Replace with
PHP Code:

                         print_label_row("$vbphrase[soft_deleted_posts] (Showing post $iifcalc to $postpage, total: $totalposts posts)""<input type=\"checkbox\" name=\"allbox_post\" title=\"$vbphrase[check_all_post]\" onclick=\"check_all_group(this, '0_post');\" />"'thead'); 


Look for
PHP Code:

                                 ", "managepost[$post[postid]]", false, $post['forumid'], $vbphrase['flag'], false);
                         } 

Replace with
PHP Code:

                                 ", "managepost[$post[postid]]", false, "0_post", $vbphrase['flag'], false);
                         } 


Look for
PHP Code:

                                 ", "managethread[$thread[threadid]]", false, $thread['threadid'], $vbphrase['flag'], false);
                         } 

Replace with
PHP Code:

                                 ", "managethread[$thread[threadid]]", false, "0_thread", $vbphrase['flag'], false);
                         } 


Have fun

jb605 11-30-2004 09:09 PM

What's the difference between this hack and "Deleted Post and Thread Management"

https://vborg.vbsupport.ru/showthread.php?t=59807

Revan 12-01-2004 05:25 AM

Quote:

Originally Posted by jb605
What's the difference between this hack and "Deleted Post and Thread Management"

https://vborg.vbsupport.ru/showthread.php?t=59807

Quote:

Originally Posted by Oblivion Knight
Tigga did something similar to this a while ago, but it lacked options and hasn't been updated since it was released.. Thanks for sharing.

There ya have it mate :)


and @ the check all seperately: I'll add it to the zip once I get home, cheers mtha :)

mtha 12-01-2004 06:38 AM

When you add into your code, you might wanna check and find a good place for the javascript part. I added directly on my server, so I just break the php file, and add the html code in. it doesnt sound professional that way :D


I have many information displayed in the hack, so in my version, I also re-arrange the deleted post/thread table alittle bit

For each deleted post or thread, I display information into 2 columns,

Column 1: Thread title, Forum name, Original poster, Manage
Column2: Deleted By, Date (delete), Reason, IPs

it looks more organized to me :D

Revan 12-03-2004 09:47 PM

Update to 2.7:

Code:

Update to 2.7:



___________________
File edits:
___________________

####################################
/clientscript/vbulletin_global.js:
####################################

#######
Find:
#######

        js_toggle_all(formobj, "checkbox", '', exclude, formobj.allbox.checked);
}



##########
Add Below
##########

<!-- Soft Deleted Archive - Code by Mtha -->
function js_check_all_group(checkobj, value)
{
        formobj = checkobj.form;
        for (var i = 0; i < formobj.elements.length; i++)
        {
                elm = formobj.elements[i];
                if (elm.type == "checkbox" && elm.value == value)
                {
                        elm.checked = checkobj.checked;
                }
        }
}
<!-- Soft Deleted Archive - Code by Mtha -->



__________________________________________________________________
Done. Reupload softdeladmin.php if you have not done so already.
__________________________________________________________________


mtha 12-05-2004 06:44 PM

Quote:

Originally Posted by Revan
Update to 2.7:

- Revan, the js code is not belong to me. It belongs to vB, they have it in PM function, I just bring it over :D

- I think you forget to change the softdeladmin.php in your 2.7 zip file.


All times are GMT. The time now is 06:36 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.01940 seconds
  • Memory Usage 1,818KB
  • 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
  • (16)bbcode_php_printable
  • (5)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
  • (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