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)

Revan 10-22-2004 10:52 PM

Ill get to work on adding the requested features tomorrow :)
About the limit, currently there's no limit, but I suppose I should add one lol. Thats gonna be a bish to test out tho, havnt got Inline Mod Tools installed on localhost :p

Remi 10-23-2004 01:26 AM

very useful hack

Thanks

Logikos 10-23-2004 03:00 AM

Nice work man

Revan 10-23-2004 11:34 AM

v2 has been released, I fulfilled the feature requests of mtha.
The following features was added to the mod:
  • Name and link to forum of the thread/post
  • Reason for deletion, if any were inputted
  • Date of thread/post deletion
  • Limit the number of total entries to show per page

To upgrade, simply download the upgrade zip and follow the instructions there.
This zip will be deleted in 1 week, after that you will have to redo the file edits as described in the main zip readme.

Also, if you use this mod,

mtha 10-23-2004 03:28 PM

that's GREAT! Thank you very much.

you may want to consider adding a phrase "del_deleted_by" for Name?

Oblivion Knight 10-23-2004 04:11 PM

Thanks for the update, running smooth.. :)

mtha 10-23-2004 09:37 PM

In your file,
Code:

          $softdelposts = $DB_site->query("
                  SELECT
                          deletionlog.*,
                          deletionlog.primaryid AS postid,
                deletionlog.type AS deltype,                       
                          deletionlog.userid AS userid,
                          post.*,
                          post.title AS posttitle,
                          post.threadid AS threadid,
                          thread.*,
                          thread.title AS threadtitle,
                          thread.forumid AS forumid,
                          forum.*,
                          forum.title AS forumtitle,

post.* also has the userid value, this will take over the deletionlog.userid I would bring that line deletionlog.userid AS userid to the end of serquence, and put a link to deletor's profile:

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


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


PS. I added a phrase called soft_deleted_by as GLOBAL with the text: Deleted by (instead of using "NAME" phrase).



adding
print_table_break();

on top of
print_table_header($vbphrase['soft_deleted_posts']);

would also seperate two sections.


also, showing the total of soft deleted posts/threads (and/or the current number of thread) would be nice

something like

Soft Deleted Threads (showing thread 16 to 30 in total of 82 threads)
Soft Deleted Posts (showing post 16 to 30 in total of 511 posts)


here's the code:

Look for:
$countlog = $DB_site->query_first("SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "deletionlog");
Add after
PHP Code:

    $countthreads $DB_site->query_first("SELECT COUNT(*) AS total    FROM " TABLE_PREFIX "deletionlog WHERE type = 'thread'");
    
$countposts $DB_site->query_first("SELECT COUNT(*) AS total    FROM " TABLE_PREFIX "deletionlog WHERE type = 'post'"); 


Look for (the first one)

print_table_header($vbphrase['soft_deleted_threads']);
while ($thread = $DB_site->fetch_array($softdelthreads))


Replace by

print_table_header("$vbphrase[soft_deleted_threads] (Total: $countthreads[total] threads)");
while ($thread = $DB_site->fetch_array($softdelthreads))

Look for

print_table_header($vbphrase['soft_deleted_posts]);
while ($post = $DB_site->fetch_array($softdelposts))

replace by

print_table_header("$vbphrase[soft_deleted_posts] (Total: $countposts[total] posts)");
while ($post = $DB_site->fetch_array($softdelposts))

Revan 10-23-2004 11:48 PM

Quote:

Originally Posted by mtha
In your file,
Code:

          $softdelposts = $DB_site->query("
                  SELECT
                          deletionlog.*,
                          deletionlog.primaryid AS postid,
                deletionlog.type AS deltype,                       
                          deletionlog.userid AS userid,
                          post.*,
                          post.title AS posttitle,
                          post.threadid AS threadid,
                          thread.*,
                          thread.title AS threadtitle,
                          thread.forumid AS forumid,
                          forum.*,
                          forum.title AS forumtitle,

post.* also has the userid value, this will take over the deletionlog.userid I would bring that line deletionlog.userid AS userid to the end of serquence, and put a link to deletor's profile:

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


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


PS. I added a phrase called soft_deleted_by as GLOBAL with the text: Deleted by (instead of using "NAME" phrase).



adding
print_table_break();

on top of
print_table_header($vbphrase['soft_deleted_posts']);

would also seperate two sections.


also, showing the total of soft deleted posts/threads (and/or the current number of thread) would be nice

something like

Soft Deleted Threads (showing thread 16 to 30 in total of 82 threads)
Soft Deleted Posts (showing post 16 to 30 in total of 511 posts)


here's the code:

Look for:
$countlog = $DB_site->query_first("SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "deletionlog");
Add after
PHP Code:

    $countthreads $DB_site->query_first("SELECT COUNT(*) AS total    FROM " TABLE_PREFIX "deletionlog WHERE type = 'thread'");
    
$countposts $DB_site->query_first("SELECT COUNT(*) AS total    FROM " TABLE_PREFIX "deletionlog WHERE type = 'post'"); 


Look for (the first one)

print_table_header($vbphrase['soft_deleted_threads']);
while ($thread = $DB_site->fetch_array($softdelthreads))


Replace by

print_table_header("$vbphrase[soft_deleted_threads] (Total: $countthreads[total] threads)");
while ($thread = $DB_site->fetch_array($softdelthreads))

Look for

print_table_header($vbphrase['soft_deleted_posts]);
while ($post = $DB_site->fetch_array($softdelposts))

replace by

print_table_header("$vbphrase[soft_deleted_posts] (Total: $countposts[total] posts)");
while ($post = $DB_site->fetch_array($softdelposts))

About the post.*, when I tested it on localhost it always showed the mod name that deleted it, regardless of who the post belonged to.

I am implementing your changes on localhost now, and gonna see if theres a way to optimise it some (I always try my best to keep my query count to an all time low). Thanks alot for your suggestions :) Users like you, that are able to come up with simple yet very useful suggestions (even writing them :p), is what makes hacks great and hack authors happy :)


//peace

mtha 10-24-2004 01:03 AM

Bug ... (that might come out from original version of vB)

If you has a "soft deleted thread" containing some "soft deleted posts"

If you "Hard delete" the thread, the co-responding "soft deleted posts" will be undefined ($post['postid'] will not exists, only $post['primaryid'] exists)

Check that out, and it might be a bug in vB.com too. I dont know if it is, or if it has beed reported over there.




Additional suggestion.

01:
This migh not be functionally important, but has "management" cleaner.

Giving the option to manage the thread and post seperately.

Says if you have

/forum/admincp/softdeladmin.php?type=thread, it will only process the deleted threads

/forum/admincp/softdeladmin.php?type=post, it will only process the deleted posts

if no value given, do both (like what you already have)


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


03. Thread Name/Moderator Name/Thread Link phrase should be changed :) I dont think you need that phrase at all.



... development ...
I just check the moderatorlog table, and dateline information for any moderating action is recored in there (with postid and threadid if applicable).
However, for one post, there could be many record in the log, including editing, moving, deleting/undeleting many times. So I expect (guess) the latest date record for one post should be the deletion time
... well but this will introduce few more searching, sorting ... queries ...

dont know if we should use this one or just use a new date record, for convenient

(just look that back because the new deldate is only applicable for posts/threads that are deleted after this hack installed. ... or we should just update the value from moderatorlog to deletionlog ONCE)

we can also sort them by date (asc or des - dont even need to have deldate value) so all recent deletion log displayed first.

just ideas, I dont know if all of them are useful :D

Revan 10-24-2004 01:37 AM

Quote:

Originally Posted by mtha
Bug ... (that might come out from original version of vB)

If you has a "soft deleted thread" containing some "soft deleted posts"

If you "Hard delete" the thread, the co-responding "soft deleted posts" will be undefined ($post['postid'] will not exists, only $post['primaryid'] exists)

Check that out, and it might be a bug in vB.com too. I dont know if it is, or if it has beed reported over there.




Additional suggestion.

01:
This migh not be functionally important, but has "management" cleaner.

Giving the option to manage the thread and post seperately.

Says if you have

/forum/admincp/softdeladmin.php?type=thread, it will only process the deleted threads

/forum/admincp/softdeladmin.php?type=post, it will only process the deleted posts

if no value given, do both (like what you already have)


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


03. Thread Name/Moderator Name/Thread Link phrase should be changed :) I dont think you need that phrase at all.

About that bug, I havnt really tried it. Do you mean if you hard delete a thread through this hack or vB itself?

Sug #1: This Ill do tomorrow. 4.30 AM here XD
Sug #2: Not poss as I am using vB internal JScript (I know no JS myself), and it checks all the elements in a form.


All times are GMT. The time now is 01:06 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.01360 seconds
  • Memory Usage 1,790KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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