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)

Bozkurtum 10-29-2004 09:23 AM

Very useful hack

Thanks ;)

mtha 10-29-2004 01:32 PM

Quote:

Originally Posted by mtha
I want to sort the list by deldate, so that all the oldest deleted post are displayed first => I can take a look and hard-delete them first

actually, being able to reverse order back and fort, or choose ASC or DESC when displaying is better. :) You can either add another link (to reverse order) or have another option to chose sorting direction :D

Revan 10-29-2004 02:08 PM

v2.2 is released, implementing fixes of the bugs mentioned already, and mtha's feature requests.

To upgrade, simply replace softdeladmin.php with the one in the zip.


Thanks for installing this hack! :D

Oblivion Knight 10-29-2004 03:21 PM

Updated.. Again.. Thanks ;)

msimplay 10-30-2004 07:28 AM

i have the assign physical delete hack installed and i seem to get errors with this one now


i'm getting error where i can't normally delete a post only physical delete and somehow people can delete there own threads

this is the error i get when i try to delete a post normally

Code:

Database error in vBulletin 3.0.0:

Invalid SQL:
                                REPLACE INTO deletionlog
                                (primaryid, type, userid, username, reason, deldate)
                                VALUES
                                (, 'post', 1, 'wAmbAm',
                                '', '1099124008')
                       
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'post', 1, 'wAmbAm',
                                '', '1099124008')' at line 4

mysql error number: 1064

Date: Saturday 30th of October 2004 01:13:29 AM
Script: http://www.wambam.net/vbulletin/editpost.php
Referer: http://www.wambam.net/vbulletin/editpost.php?do=editpost&p=4504
Username: wAmbAm
IP Address: 82.37.24.63

can anyone help me
i;ve disabled my forums until i can fix this

Revan 10-30-2004 08:39 AM

I am using both hacks in perfect combination :)
Your problem is that whatever is assigning the primaryid seems to have broken.

msimplay 10-30-2004 03:00 PM

Quote:

Originally Posted by Revan
I am using both hacks in perfect combination :)
Your problem is that whatever is assigning the primaryid seems to have broken.

i repaired the error by using repair tables however its weird that using the none physical delete seems to be now deleting threads

mtha 10-31-2004 09:08 PM

Quote:

Originally Posted by msimplay
i repaired the error by using repair tables however its weird that using the none physical delete seems to be now deleting threads

Total Entries: 1830

You've messed up with the counting part:
Page1:

Soft Deleted Threads (Showing thread 1 to 14, total: 14 threads)
Soft Deleted Posts (Showing post 1 to 15, total: 15 posts)


Page2
Soft Deleted Posts (Showing post 16 to 1830, total: 15 posts)

Page3:
Soft Deleted Posts (Showing post 31 to 1830, total: 15 posts)


also, here you have

$countlog = $DB_site->query_first("SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "deletionlog");
$numentries = &$countlog['total'];
$numpages = ceil($numentries / $perpage);


your $countlog is post+thread counts
$perpage is actually post perpage AND thread perpage.

=> $countlog / $perpage is NOT correct $numpages.
You have to get
$countpost and $countthread

if $countpost > $countthread => $numentries = $countpost, else $entries = $countthread

otherwise, if you have more than one page of thread and post deleted, the last pages will give empty results.

msimplay 10-31-2004 09:22 PM

Quote:

Originally Posted by mtha
Total Entries: 1830

You've messed up with the counting part:
Page1:

Soft Deleted Threads (Showing thread 1 to 14, total: 14 threads)
Soft Deleted Posts (Showing post 1 to 15, total: 15 posts)


Page2
Soft Deleted Posts (Showing post 16 to 1830, total: 15 posts)

Page3:
Soft Deleted Posts (Showing post 31 to 1830, total: 15 posts)


also, here you have

$countlog = $DB_site->query_first("SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "deletionlog");
$numentries = &$countlog['total'];
$numpages = ceil($numentries / $perpage);


your $countlog is post+thread counts
$perpage is actually post perpage AND thread perpage.

=> $countlog / $perpage is NOT correct $numpages.
You have to get
$countpost and $countthread

if $countpost > $countthread => $numentries = $countpost, else $entries = $countthread

otherwise, if you have more than one page of thread and post deleted, the last pages will give empty results.

hmm dunno i seemed to have fixed it by rehacking my functions_databuild.php
i've left the rest untouched

mtha 10-31-2004 10:15 PM

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

Revan

Here's what I use, I think it'd be better

Look for (Line 114)

PHP Code:

    $countlog $DB_site->query_first("SELECT COUNT(*) AS total    FROM " TABLE_PREFIX "deletionlog"); 

Replaced by

PHP Code:

//    $countlog = $DB_site->query_first("SELECT COUNT(*) AS total    FROM " . TABLE_PREFIX . "deletionlog");
 
$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'");
     
$totalcount = ($countthreads['total'] + $countposts['total']);
  if (
$countthreads['total'] > $countposts['total']) {
      
$numentries = &$countthreads['total'];
  }
  else 
$numentries = &$countposts['total']; 


line 171, look for
PHP Code:

         <td class="thead">' . $vbphrase['total_entries'] . '' . $numentries . ' 

replaced by
PHP Code:

              <td class="thead">' . $vbphrase['total_entries'] . '' . $totalcount . ' 

line 207. look for
PHP Code:

         $threads $DB_site->query_first("SELECT COUNT(*) AS threads FROM " TABLE_PREFIX "deletionlog WHERE `type`='thread'");
              
$totalthreads $threads['threads'];
             
$iifcalc iif($page == 01, (($page 1) * $perpage) + 1);
              
$threadpage $totalthreads $iifcalc;
              
$threadpage $threadpage $iifcalc;
             
$threadpage iif($page == 0$numthreads $page$threadpage); 

replaced by

PHP Code:

            $totalthreads $countthreads['total'];
                      
$iifcalc iif($page == 01, (($page 1) * $perpage) + 1);
                      
$threadpage = ($iifcalc $perpage 1);
                      if (
$threadpage $totalthreads) {$threadpage $totalthreads;} 

Line 269, look for

PHP Code:

            $totalposts $numentries $numthreads;
             
$iifcalc iif($page == 01, (($page 1) * $perpage) + 1);
             
$postpage $totalposts $iifcalc;
             
$postpage $postpage $iifcalc;
             
$postpage iif($page == 0$numposts $page$postpage);
             
print_table_header("$vbphrase[soft_deleted_posts] (Showing post $iifcalc to $postpage, total: $numposts posts)"); 

replaced by


PHP Code:

            $totalposts $countposts['total'];
            
$iifcalc iif($page == 01, (($page 1) * $perpage) + 1);
 
             
$postpage = ($iifcalc $perpage 1);
             if (
$postpage $totalposts) {$postpage $totalposts;}
             
print_table_header("$vbphrase[soft_deleted_posts] (Showing post $iifcalc to $postpage, total: $totalposts posts)"); 



All times are GMT. The time now is 03:32 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.02724 seconds
  • Memory Usage 1,789KB
  • 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
  • (8)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