Topic: Deleted post log 2.0

##
##
##        Mod title:  Deleted posts log 
##
##      Mod version:  2.0
##   Works on PunBB:  1.2.* (as far as I know) 
##     Release date:  06-10-2007 
##           Author:  Franz Liedke 
##
##      Description:  Provides a plugin that displays a log of all deleted posts. These posts can be restored or deleted forever. 
##
##       Affects DB:  Yes 
##
##   Affected files:  viewtopic.php 
##                    include\functions.php 
##                    delete.php 
##                    viewforum.php 
##              moderate.php
##
##            Notes:  Adds columns to the following database tables:
##            topics
##            posts
##            subscriptions 
##              Adds one config entry
##
##      Changelog:  Version 1.0.1
##            now includes an install_mod.php file
##              Version 1.0.2
##            full subscription support
##              Version 1.1
##            now working completely with topics that are deleted
##            also fixes number of replies and topics in viewforum.php and index.php
##            plugin is now also available for moderators
##              Version 1.2
##            more user-friendly / idiot-proof
##            users aren't able to restore posts as long as the topic post is not restored / does not exist
##              Version 2.0
##            pagination in the log - only 10 deleted posts per page to keep the number of queries executed at 16 until I can optimize further
##            latest post display - seems to work now
##            parse bbcode/smilies in log option
##            some code optimization - uses POST rather than GET
##            now also works with the "delete thread" function from moderate.php
##
##  To be fixed yet:  Version 2.1
##            query optimization
##
##     Generated By:  Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

FluxBB - v1.4.8

Re: Deleted post log 2.0

PLEEEAAASSEEE post comments!!!

FluxBB - v1.4.8

3

Re: Deleted post log 2.0

lie2815 wrote:

PLEEEAAASSEEE post comments!!!

Hello, I installed your mod on my test forum, on first look (I used it 2-3 days) it works as needed, but interface looks too scary for me. Isn't better to use same interface as in gruop message delete?

4 (edited by Px 2007-07-16 15:43)

Re: Deleted post log 2.0

Something like that
http://users.i.com.ua/~finish/2007-07-16_183407.jpg

Re: Deleted post log 2.0

If you want, you can surely change the design, but I don't see a reason for this design being scary in any way. If there aren't any other requests in the same direction, I won't change it.
But still, thank you for your interest.
And also, do you think I should put more information in the post log (like in your screenshot). I would be willing to do that...

FluxBB - v1.4.8

Re: Deleted post log 2.0

Great mod! Its just what I needed!

Re: Deleted post log 2.0

hmm think i found a bug :S

create a new thread, fill it with post until you hit page 2.
then delete 2 posts (so you can have 1 more posts on page 1 before the next post goes on page 2) post 1 more post and you will see that it goes too page 2....
http://forums.epixplx.com/viewtopic.php … 179#p39179

Post hoc ergo propter hoc

Re: Deleted post log 2.0

Tjalve wrote:

hmm think i found a bug :S

create a new thread, fill it with post until you hit page 2.
then delete 2 posts (so you can have 1 more posts on page 1 before the next post goes on page 2) post 1 more post and you will see that it goes too page 2....
http://forums.epixplx.com/viewtopic.php … 179#p39179

Your absolutely right! lie2815, and you thought you would get away with this..... Anyways, its not the worlds biggest bug, but it could use some fixing.

Re: Deleted post log 2.0

as you can see at http://forums.epixplx.com/viewforum.php?id=16 it says 34 replays, but it's only 25..
but when you delete the last post on the page it goes down too 23 replays on the viewforum witch is right (first post is 0)

Hope that helps.

Post hoc ergo propter hoc

10

Re: Deleted post log 2.0

after a bit of cluttering I think I fixed it...

in post.php: //stop it from counting deleted posts as replys
find:
           

$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'posts WHERE topic_id='.$tid) or error('Unable to fetch post count for topic', __FILE__, __LINE__, $db->error());

replace with:
           

$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'posts WHERE topic_id='.$tid.' AND deleted=0') or error('Unable to fetch post count for topic', __FILE__, __LINE__, $db->error());

in function.php.. //too stop $second_last_id, $second_poster, $second_posted beeing deleted=1. not 100% sure if this is needed but :x...
find:
   

$result = $db->query('SELECT id, poster, posted FROM '.$db->prefix.'posts WHERE topic_id='.$topic_id.' ORDER BY id DESC LIMIT 2') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

replace with:
   

$result = $db->query('SELECT id, poster, posted FROM '.$db->prefix.'posts WHERE topic_id='.$topic_id.' AND deleted=0 ORDER BY id DESC LIMIT 2') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
Post hoc ergo propter hoc

Re: Deleted post log 2.0

Thanks for the fixing. I will include it in the next version... Sorry for my ignorance, I am on vacation and actually using a friend's pc right now.
Thanks again

FluxBB - v1.4.8