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.. :)


All times are GMT. The time now is 03:30 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.01256 seconds
  • Memory Usage 1,767KB
  • 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
  • (5)bbcode_php_printable
  • (4)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