[RC] Prime Post Revisions - View all edits to posts

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

[RC] Prime Post Revisions - View all edits to posts

Postby primehalo » Thu Aug 02, 2007 7:38 pm

MOD Title: Prime Post Revisions
MOD Description: This MOD will store each revision of a post every time a post is edited. It will only make these past revisions viewable to those users that have permissions allowing them to view the post information (basically, moderators and administrators).
MOD Version: (view the Installation Instructions for latest version number).
MOD Download: Main Download Site
Demo Board: http://www.absoluteanime.com/forum/viewforum.php?f=95
Demo Username: tester
Demo Password: tester

For the release history, please view the Installation Instructions.

Screenshots
On the active post:
Image

On the post revision history page:
Image
Last edited by primehalo on Wed Jul 09, 2008 10:48 pm, edited 7 times in total.
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

nuclearw
Registered User
Posts: 4
Joined: Wed Aug 15, 2007 5:25 pm

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby nuclearw » Wed Aug 15, 2007 5:28 pm

I've been using bb3 for a few months now, I love this module. One bug i noticed was when moving or deleting posts I get the following error:


SQL ERROR [ mysqli ]

Unknown column 'topic_id' in 'where clause' [1054]

SQL

UPDATE phpbb_post_revisions SET forum_id = 2 WHERE topic_id = '1467'

BACKTRACE

does post_id = topic_id ?

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby playerfr » Wed Aug 15, 2007 6:04 pm

nice feature :)
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby primehalo » Wed Aug 15, 2007 7:05 pm

nuclearw wrote:I've been using bb3 for a few months now, I love this module. One bug i noticed was when moving or deleting posts I get the following error:


SQL ERROR [ mysqli ]

Unknown column 'topic_id' in 'where clause' [1054]

SQL

UPDATE phpbb_post_revisions SET forum_id = 2 WHERE topic_id = '1467'

BACKTRACE

does post_id = topic_id ?

I don't even recognize that SQL statement. I searched through all the PHP and I never see the POST_REVISIONS_TABLE in an SQL statement that contains an UPDATE or a SET forum_id.

Can you provide more information? I have not been able to get this bug to happen, no matter how many times I edit then move or delete posts and/or topics. Do you have other MODs installed that changed some SQL statements? The code that handles deletion is in "includes/functions_admin.php":

Code: Select all

   $table_ary = array(POSTS_TABLE, REPORTS_TABLE);
//-- mod: Prime Post Revisions ----------------------------------------------//
   $table_ary[] = POST_REVISIONS_TABLE; // To delete the post's edit history
//-- end: Prime Post Revisions ----------------------------------------------//

   foreach ($table_ary as $table)
   {
      $sql = "DELETE FROM $table
         WHERE " . $db->sql_in_set('post_id', $post_ids);
      $db->sql_query($sql);
   }
   unset($table_ary);


Check and see if anything has been modified near that point.
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby playerfr » Wed Aug 29, 2007 2:37 pm

Prime do you plan to progress on this Mod ? or it will stay like this ?

Thanks :)
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby IPB_Refugee » Wed Aug 29, 2007 4:47 pm

Another great MOD, primehalo! Thank you! :)

How many additional queries does your MOD add to the viewtopic pages?

Let's say there are 15 posts on a viewtopic page, one post has been edited 10 times and another post 3 times. What's the impact on the number of queries?

Kind regards
Wolfgang

Omarvelous
Registered User
Posts: 232
Joined: Mon Jun 25, 2007 2:24 am

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby Omarvelous » Wed Aug 29, 2007 8:51 pm

Prime... you make some mighty fine Mods!!

Nice work!

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby primehalo » Wed Aug 29, 2007 10:15 pm

playerfr wrote:Prime do you plan to progress on this Mod ? or it will stay like this ?

There didn't appear to be much interest in it. What suggestions would you have?

IPB_Refugee wrote:How many additional queries does your MOD add to the viewtopic pages?

With version 0.0.2, there is only one extra query for determining which posts have revisions.

Omarvelous wrote:Prime... you make some mighty fine Mods!!

Nice work!

Thanks!
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby IPB_Refugee » Thu Aug 30, 2007 1:21 am

Just one additional query? Great! :D

primehalo wrote:
playerfr wrote:Prime do you plan to progress on this Mod ? or it will stay like this ?

There didn't appear to be much interest in it.


Oh, there are surely people who are interested in your MOD:

viewtopic.php?f=72&t=577072
viewtopic.php?f=70&t=572129

Although I am nearly every day here at phpBB.com I have complete overlooked this MOD. I don't know why. But I'm glad I found it now.

Regards
Wolfgang

LRdM
Registered User
Posts: 10
Joined: Tue Apr 08, 2003 7:26 am

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby LRdM » Thu Aug 30, 2007 6:04 am

Thanks for the mod! I've just installed this as well as Prime Recycle Bin as IPB_Refugee was kind enough to let me know about both of them. I have encountered this Unknown column 'topic_id' in 'where clause' [1054] error as well.

I get the following error when I try to first delete a post, just after I submit the form asking for reasons why the post is being deleted. The post does still arrive in the recycling bin. The query is
posting.php?mode=delete&f=5&p=1807&_f_=5x&confirm_key=3BGI4MWMV3

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Unknown column 'topic_id' in 'where clause' [1054]

SQL

UPDATE phpbb3_post_revisions SET forum_id = 38 WHERE topic_id = 297

BACKTRACE

FILE: includes/db/mysql.php
LINE: 133
CALL: dbal->sql_error()

FILE: includes/functions_admin.php
LINE: 444
CALL: dbal_mysql->sql_query()

FILE: includes/prime_recycle_bin.php
LINE: 334
CALL: move_topics()

FILE: includes/functions_posting.php
LINE: 1347
CALL: recycle_topic()

FILE: posting.php
LINE: 1481
CALL: delete_post()

FILE: posting.php
LINE: 299
CALL: handle_post_delete()

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby primehalo » Thu Aug 30, 2007 6:59 am

Sorry, it is an error in the installation instructions. The part that tells you to open "functions_posting.php" and find "$table_ary = array" should be
find

Code: Select all

   $table_ary = array(POSTS_TABLE, REPORTS_TABLE);
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

LRdM
Registered User
Posts: 10
Joined: Tue Apr 08, 2003 7:26 am

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby LRdM » Thu Aug 30, 2007 7:13 am

functions_admin.php or functions_posting.php? So...

Code: Select all

Open: includes/functions_admin.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

   $table_ary = array

Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

//-- mod: Prime Post Revisions ----------------------------------------------//
   $table_ary[] = POST_REVISIONS_TABLE; // To delete the post's edit history
//-- end: Prime Post Revisions ----------------------------------------------//


should read...

Code: Select all

Open: includes/functions_admin.php
Find

Tip: This may be a partial find and not the whole line.
Code: Select All

   $table_ary = array(POSTS_TABLE, REPORTS_TABLE);

Add after

Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Select All

//-- mod: Prime Post Revisions ----------------------------------------------//
   $table_ary[] = POST_REVISIONS_TABLE; // To delete the post's edit history
//-- end: Prime Post Revisions ----------------------------------------------//


?

User avatar
primehalo
Former Team Member
Posts: 2697
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby primehalo » Thu Aug 30, 2007 8:03 am

Oops, screwed up again, you're right it's functions_admin.php
Ken F. Innes IV
My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris
Contact:

Re: [BETA] Prime Post Revisions (0.0.0) - View all edits to post

Postby playerfr » Thu Aug 30, 2007 11:42 am

Thats why I asked if there was a new version. It was for bug corrections :P New function I dont as it has already what is needed :geek:
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com

Amezis
Registered User
Posts: 116
Joined: Sun Jul 24, 2005 9:10 am
Location: Oslo, Norway
Contact:

Re: [BETA] Prime Post Revisions (0.0.2) - View all edits to post

Postby Amezis » Thu Aug 30, 2007 7:21 pm

Nice feature!! I will add this to my board whenever this isn't beta anymore (the boards are heavily modded already, so I want only stable mods from now on to avoid possible errors). Also, your Prime recycle bin mod looks great! Keep up the work on both ;)
Amezis

Wise men talk because they have something to say; fools, because they have to say something. -Plato


Return to “[3.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 48 guests