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)

msimplay 11-01-2004 12:16 AM

Quote:

Originally Posted by mtha
sorry msimplay, I didnt mean to quote your post. I am talking about the whole hack.

no problem is there any chance of posting your version of the soft delete file

mtha 11-01-2004 01:27 AM

Quote:

Originally Posted by msimplay
no problem is there any chance of posting your version of the soft delete file

no, my version everything should be in Revan's release, plus the changes that I mentioned above.

This is his hack, so he will implement if any adition is good :> I'm not going to make an alias.

mtha 11-01-2004 02:32 AM

Bug.

I found that username/userid are displayed not correctly, since you have different values for them. I would call each value seperately:

look for the part for

$softdelposts = $DB_site->query("

replace the whole query by

PHP Code:

         $softdelposts $DB_site->query("
             SELECT 
                 deletionlog.*,
                 deletionlog.primaryid AS postid, 
          deletionlog.type AS deltype,         
                 deletionlog.userid AS userid, 
                 post.postid, post.threadid,
                 post.username as postusername,
                 post.userid as postuserid,
                 post.title AS posttitle,
                 post.threadid AS threadid,
                 thread.threadid, thread.forumid,
                 thread.title AS threadtitle,
                 thread.forumid AS forumid,
                 forum.forumid, 
                 forum.title AS forumtitle,
                 user.username
             FROM " 
TABLE_PREFIX "deletionlog AS deletionlog
             LEFT JOIN " 
TABLE_PREFIX "user AS user on user.userid=deletionlog.userid
             LEFT JOIN " 
TABLE_PREFIX "post AS post ON post.postid=deletionlog.primaryid
             LEFT JOIN " 
TABLE_PREFIX "thread AS thread ON thread.threadid=post.threadid 
             LEFT JOIN " 
TABLE_PREFIX "forum AS forum ON forum.forumid=thread.forumid
             WHERE deletionlog.type = 'post'
         ORDER BY `deldate` 
$sqlorder            
             LIMIT " 
. (($page 1) * $perpage) . ", $perpage
         "
); 

I'd add another line for Posted by, showing thread/post owner too:

look for
$vbphrase['soft_deleted_by'] = 'Deleted by';
Add above
$vbphrase['soft_posted_by'] = 'Posted by';

look for
PHP Code:

              <strong>" . $vbphrase['soft_deleted_by'] . ":</strong> <a href='" . $vboptions['bburl'] . "/member.php?u=". $thread['userid'] . "' target='_blank'>" . stripslashes($thread['username']) . "</a

add above
PHP Code:

             <strong>" . $vbphrase['soft_posted_by'] . ":</strong> <a href='" . $vboptions['bburl'] . "/member.php?u=". $thread['postuserid'] . "' target='_blank'>" . stripslashes($thread['postusername']) . "</a><br /> 


look for
PHP Code:

              <strong>" . $vbphrase['soft_deleted_by'] . ":</strong> <a href='" . $vboptions['bburl'] . "/member.php?u=". $post['userid'] . "' target='_blank'>" . stripslashes($post['username']) . "</a

add above
PHP Code:

              <strong>" . $vbphrase['soft_posted_by'] . ":</strong> <a href='" . $vboptions['bburl'] . "/member.php?u=". $post['postuserid'] . "' target='_blank'>" . stripslashes($post['postusername']) . "</a><br /> 


Revan 11-01-2004 07:02 AM

Whoah. This was lotta stuff XD
I cant remember, but I dont think I counted the threads and posts in a seperate query. I dont like this because I try my best to optimise my hacks, reducing query load as much as possible.
The counting worked when I tested it with multiple pages on my localhost, but my localhost is running low on posts from too much testing with this hack XD
Im gonna look into all of this when I get home :)

mtha 11-01-2004 12:58 PM

Quote:

Originally Posted by Revan
Whoah. This was lotta stuff XD
I cant remember, but I dont think I counted the threads and posts in a seperate query. I dont like this because I try my best to optimise my hacks, reducing query load as much as possible.
The counting worked when I tested it with multiple pages on my localhost, but my localhost is running low on posts from too much testing with this hack XD
Im gonna look into all of this when I get home :)

You counted all and counted threads. which use 2 querries.
I count thread and post, which also use 2 :)

Oblivion Knight 11-01-2004 01:25 PM

I tried your suggestions mtha, and now no records are shown..

Unless I went wrong somewhere, but I don't think so.

Revan 11-01-2004 03:27 PM

Ive implemented both fixes, and they work just fine.
Cheers :)

Updated to v2.5:
To upgrade, replace softdeladmin.php with the one in the zip.

Oblivion Knight 11-01-2004 03:36 PM

Hmm.. The file in the zip worked, so it must have been something wrong that I did somewhere. My bad.. :disappointed:

4 of the threads listed have the date/time of 00:00, 1st Jan 1970.. Is there any explanation for this?

Revan 11-01-2004 03:43 PM

Yes, they were deleted BEFORE this hack was installed. Try running this:
Quote:

Originally Posted by mtha
UPDATE deletionlog, moderatorlog SET deletionlog.deldate=moderatorlog.dateline
WHERE deletionlog.type = 'post' AND deletionlog.deldate=0 AND (moderatorlog.postid = deletionlog.primaryid) AND moderatorlog.action LIKE 'post %deleted%';

UPDATE deletionlog, moderatorlog SET deletionlog.deldate=moderatorlog.dateline
WHERE deletionlog.type = 'thread' AND deletionlog.deldate=0 AND (moderatorlog.threadid = deletionlog.primaryid) AND moderatorlog.action LIKE 'thread %deleted%';

(not tested by me, so take mtha's word for it ;))

Oblivion Knight 11-01-2004 03:51 PM

That updated 1 of them, I still have 3 with that date.. :)

Revan 11-01-2004 04:38 PM

Try running it several times?
Lol only thing I can think of

Oblivion Knight 11-01-2004 04:51 PM

That query won't work on the other 3 because they weren't deleted by a moderator, so there's no record of them in the moderatorlog.. Is there any other way to get the timestamp?

mtha 11-01-2004 07:12 PM

Quote:

Originally Posted by Oblivion Knight
That query won't work on the other 3 because they weren't deleted by a moderator, so there's no record of them in the moderatorlog.. Is there any other way to get the timestamp?

.. or your moderatorlog was pruned sometime before.

hehe, yes. Ask those who deleted it, when he/she did delete the post/thread and fill them in.

If you make up some number, it wouldnt be different from 00:00, 1st Jan 1970 right?

I dont know if there's any other place that record this timestamp, so for my forum, I just ... let it be, or try to ... hard delete them if they are worth to be deleted.

if you can find the place where this deletion time recorded, let me know

mtha 11-01-2004 07:14 PM

Quote:

Originally Posted by Revan
Ive implemented both fixes, and they work just fine.
Cheers :)

Updated to v2.5:
To upgrade, replace softdeladmin.php with the one in the zip.

I'd think that you should state what's new/fix for each version, easier to keep track of hack :)

Revan 11-02-2004 05:09 AM

Hm okay lol :p

Fixes/Features for v2.5:
  • Fixed calculation of pages
  • Fixed calculation of threads/posts
  • Fixed broken redirect when hard deleting records
  • Added Posted By in the record view

I think thats about it :)



And @ the missing timestamps: Unless they are posts/threads that you want sticking around for usage as evidence against spammers, why not just remove them and be done with it ;)

mtha 11-02-2004 02:18 PM

Quote:

Originally Posted by Revan
And @ the missing timestamps: Unless they are posts/threads that you want sticking around for usage as evidence against spammers, why not just remove them and be done with it ;)

:) I have about 1000 softdeleted post timestamps missing :p. it'll take sometime to check and hard delete all of them :D



anyway, if post's owner want to delete a post, there's no reason for not delete them (unless it contains valuable information that you want to keep).

msimplay 11-02-2004 05:50 PM

PHP Code:

open includes/functions_databuild
 _____________________________
 
 Find 
(around line 401-407):
 -----------------------------
 
             
$DB_site->query("
                 REPLACE INTO " 
TABLE_PREFIX "deletionlog
                 (primaryid, type, userid, username, reason)
                 VALUES
                 (
$postinfo[postid], 'post', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                 '" 
addslashes(fetch_censored_text(htmlspecialchars_uni($delinfo['reason']))) . "')
             "
);
 
 
 
Replace with:
 -----------------------------
 
             
$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 "')
             "
);
 
 
 
 
Find (around line 295-301):
 -----------------------------
 
             
$DB_site->query("
                 REPLACE INTO " 
TABLE_PREFIX "deletionlog
                 (primaryid, type, userid, username, reason)
                 VALUES
                 (
$threadinfo[threadid], 'thread', $delinfo[userid], '" addslashes($delinfo['username']) . "',
                  '" 
addslashes(htmlspecialchars_uni(fetch_censored_text($delinfo['reason']))) . "')
             "
);
 
 
 
Replace with:
 -----------------------------
 
             
$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 "')
             "
); 

just wanted to know if those file edits are absolutely neccessary as the hack seemed to work well even without those
the reason i know is because i had some trouble with my functions_databuild.php and i didn't do the file edits until i realised that they were meant to be there for this hack

Revan 11-02-2004 07:41 PM

If you do not perform that edit, the date stamp of the deleted posts/threads will appear as "00:00, 1st Jan 1970" (in whatever default date format you have).
So if you dont care much for when they are deleted, and you wouldnt use the sorting feature anyways, then its not needed :)

msimplay 11-02-2004 07:57 PM

Quote:

Originally Posted by Revan
If you do not perform that edit, the date stamp of the deleted posts/threads will appear as "00:00, 1st Jan 1970" (in whatever default date format you have).
So if you dont care much for when they are deleted, and you wouldnt use the sorting feature anyways, then its not needed :)

hmm i'm using version 3.0 and i didn't have to do those edits for the right time

Revan 11-03-2004 01:29 PM

I am referring to future records ;)
If they dont get a date inserted, how will the script know what date they were deleted, hm? :p

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.

Revan 12-05-2004 08:32 PM

Heh ok. Fixed zip.
Thanks :)

cinq 12-23-2004 11:55 PM

Installed, but face the following problems :

1) Flag threads and flag posts dont work but Check All Entries does.
2) Something is wrong with the navigation.

See below attachment :
( crop away the posts and threads though - these are just the headings ).
Notice the number of soft deleted threads and posts, shouldnt that give me navigation ?
Also how come it only shows the first 15 of both posts and threads , shouldnt it be 50 ?

Please help

cinq 12-28-2004 04:33 AM

any help here ? :)

j_86 01-08-2005 05:07 PM

This hack is VB 3.05 compatiable.

Oblivion Knight 01-16-2005 11:05 PM

Quote:

Originally Posted by cinq
any help here ? :)

Try uploading softdeladmin.php again..

The perpage is a settable option, and by default is set at 15.

mtha 02-26-2005 09:52 PM

Quote:

Originally Posted by JimpsEd
This hack is VB 3.05 compatiable.

didnt install any new version since 3.0.3, but I dont see any reason why it wont work.

Give it a try mate

mtha 05-17-2005 07:17 AM

Revan,

do you have any plan on developing this hack?

some suggestions for you:

- Sort by delete user/poster/deletion date/post(thread) title (optional)
- Sort by forum (individually)

Search by: poster/delete user/reason/thread(post) name/forum ...

Revan 05-17-2005 04:36 PM

Haven't looked at this in ages, since I have more skills now I might just be able to do those ;)
I'll see if I can get it done whenever I can be buggered to :p

Aurous 06-18-2005 08:48 PM

I deleted over 1000 soft deleted posts, but I still see over 300 blank entries that dont get deleted for some reason! Any fix?

Using vB 3.0.7

screenshot attached.

Revan 06-18-2005 11:58 PM

Check the deletionlog table, and tell me what the entries look like, and I will be able to give you a query to make them go away for good this time :p

And as for the further development, Im not gonna touch this for some time, I am way too busy porting the RPG over to 3.5. Once that is done, I will port this as well.


All times are GMT. The time now is 03:21 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.01613 seconds
  • Memory Usage 1,959KB
  • 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
  • (22)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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