[ABD] Prime Post Revision

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [RC] Prime Post Revision

Post by Bruninoit »

Try that solution.
Open file migration/release_0_1_0.php and replace all with

Code: Select all

<?php
/** 
* 
* @package Prime Post Revision
* @copyright (c) 2016 Bruninoit
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 
* 
*/ 
namespace bruninoit\ppr\migrations;
class release_0_1_0 extends \phpbb\db\migration\migration
{
	static public function depends_on()
	{
		return array('\phpbb\db\migration\data\v310\gold');
	}
	public function update_schema()
	{
return array(
			'add_tables'	=> array(
				$this->table_prefix . 'ppr'	=> array(
					'COLUMNS'	=> array(
						'revision_id'						=> array('UINT', null, 'auto_increment'),
						'post_id'						=> array('UINT', 0),
						'post_subject'						=> array('VCHAR', ''),
						'post_text'						=> array('TEXT', ''),
						'bbcode_uid'						=> array('VCHAR:8', ''),
						'bbcode_bitfield'						=> array('VCHAR:255', ''),
						'post_edit_time'							=> array('TIMESTAMP', 0),
						'post_edit_user'						=> array('UINT', 0),
						'post_edit_reason' => array('VCHAR:255', ''),
					),
					'PRIMARY_KEY'	=> 'revision_id',
				),
			),
		);

	}
	public function revert_schema()
	{
		return array(
			'drop_tables'	=> array(
				$this->table_prefix . 'ppr'
			),
		);
	}

}

Then delete file release_0_1_0_b2.php

andreask
Registered User
Posts: 571
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas

Re: [RC] Prime Post Revision

Post by andreask »

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/class_loader.php on line 160: require(./../ext/bruninoit/ppr/migrations/release_0_1_0_b2.php): failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/class_loader.php on line 160: require(./../ext/bruninoit/ppr/migrations/release_0_1_0_b2.php): failed to open stream: No such file or directory

Fatal error: require(): Failed opening required './../ext/bruninoit/ppr/migrations/release_0_1_0_b2.php' (include_path='.:/opt/php55/lib/php') in XXXXXXXXXXXXXXXXX/phpbb/class_loader.php on line 160
And if I put back the file release_0_1_0_b2.php then I get the old error.
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!


Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [RC] Prime Post Revision

Post by Bruninoit »

Edit release_0_1_0.php like I've said.


Open file migration/release_0_1_0_b2.php and replace all with

Code: Select all

<?php
/** 
* 
* @package Prime Post Revision
* @copyright (c) 2016 Bruninoit
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 
* 
*/ 
namespace bruninoit\ppr\migrations;
class release_0_1_0_b2 extends \phpbb\db\migration\migration
{
	static public function depends_on()
	{
		return array('\phpbb\db\migration\data\v310\gold');
	}
}

andreask
Registered User
Posts: 571
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas

Re: [RC] Prime Post Revision

Post by andreask »

It worked! Thanks!
Just one suggestion...

When enabled (at least for me) the permissions to see/manage the post revisions is set to "no".
Perhaps (if possible) set it by default to on for the administration group?

End perhaps put somewhere a back/return to previous page? (though back button in browser can also be used)
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!

Sanborn
Registered User
Posts: 64
Joined: Mon Mar 16, 2015 7:01 pm

Re: [RC] Prime Post Revision

Post by Sanborn »

Great extension, installed it and works perfect :)

I also had the error while enabling the extension, used the fix, and that made it work without any errors.

+1 for the ACP permission setting. Would be nice to have it set to Yes by default for Admins and Global Moderators group. At least for the view post history setting.

Another feature I would like to ask is a setting in the ACP where I can define an automatic cleanup of post history. The history is useful for current postings, but for posts that are older than let's say 6 months, it might not be needed anymore. So to avoid our databases exploding with post versions, it might be useful to build in a retention policy that automatically removes the versions for posts older than a certain period?

Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.

Again, nice work :)

Sanborn
Registered User
Posts: 64
Joined: Mon Mar 16, 2015 7:01 pm

Re: [RC] Prime Post Revision

Post by Sanborn »

One small thing to add:
I noticed that when deleting a topic or a single post, the post history remains in the ppr database table ;)
Should it be removed together with the topic/post or is it just not included in the scope of this extension?
If not included now, will it be added in future versions?

Bruninoit
Registered User
Posts: 499
Joined: Thu Jun 13, 2013 2:34 pm
Location: Florence (Italy)
Name: Bruno Andrew
Contact:

Re: [RC] Prime Post Revision

Post by Bruninoit »

Sanborn wrote:eature I would like to ask is a setting in the ACP where I can define an automatic cleanup of post history. The history is useful for current postings, but for posts that are older than let's say 6 months, it might not be needed anymore. So to avoid our databases exploding with post versions, it might be useful to build in a retention policy that automatically removes the versions for posts older than a certain period?
Interesting... I can add it in next version. Thanks.
Sanborn wrote: Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.
I don't think it's useful.

Sanborn wrote:One small thing to add:
I noticed that when deleting a topic or a single post, the post history remains in the ppr database table ;)
Should it be removed together with the topic/post or is it just not included in the scope of this extension?
If not included now, will it be added in future versions?
Yes, I know and I have intention to fix that problem. Thanks.

User avatar
Rhino.Freak
Registered User
Posts: 275
Joined: Wed Apr 29, 2015 8:32 am
Contact:

Re: [RC] Prime Post Revision

Post by Rhino.Freak »

eh for some reason I don't see anything new at all anywhere after installing this extension. help me please?

andreask
Registered User
Posts: 571
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas

Re: [RC] Prime Post Revision

Post by andreask »

Hey Rhino.Freak,

Did you check your permissions?
andreask wrote:It worked! Thanks!
Just one suggestion...

When enabled (at least for me) the permissions to see/manage the post revisions is set to "no".
Perhaps (if possible) set it by default to on for the administration group?


End perhaps put somewhere a back/return to previous page? (though back button in browser can also be used)
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!

User avatar
Rhino.Freak
Registered User
Posts: 275
Joined: Wed Apr 29, 2015 8:32 am
Contact:

Re: [RC] Prime Post Revision

Post by Rhino.Freak »

Yes that worked :) and I do agree giving permissions to Admins by default.

oh and
Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.
for this, you can simply edit the templates to hide the button for specific forums using some IF conditions.

Sanborn
Registered User
Posts: 64
Joined: Mon Mar 16, 2015 7:01 pm

Re: [RC] Prime Post Revision

Post by Sanborn »

Rhino.Freak wrote:Yes that worked :) and I do agree giving permissions to Admins by default.

oh and
Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.
for this, you can simply edit the templates to hide the button for specific forums using some IF conditions.
I know that, but then I need to edit the extension myself, which gets overwritten on each update :)
But seems that will be the way to go, at least for now.

andreask
Registered User
Posts: 571
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas

Re: [RC] Prime Post Revision

Post by andreask »

Another idea in acp have a list of posts with revisions and tools like delete/restore by selecting multiple posts etc.
Though an autodlete of the old revisions after a certain amount of time it would be sufficient.
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!

pitur
Registered User
Posts: 69
Joined: Mon Mar 16, 2015 2:04 am

Re: [RC] Prime Post Revision

Post by pitur »

Sanborn wrote:
Rhino.Freak wrote:Yes that worked :) and I do agree giving permissions to Admins by default.

oh and
Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.
for this, you can simply edit the templates to hide the button for specific forums using some IF conditions.
I know that, but then I need to edit the extension myself, which gets overwritten on each update :)
But seems that will be the way to go, at least for now.
I agree with you, being able to set this per forum would be a nice addition.

pitur
Registered User
Posts: 69
Joined: Mon Mar 16, 2015 2:04 am

Re: [RC] Prime Post Revision

Post by pitur »

Sanborn wrote:
Rhino.Freak wrote:Yes that worked :) and I do agree giving permissions to Admins by default.

oh and
Also, in the same mindset to avoid databases growing too quickly, it might be useful if we can enable this post history for specific forums only. We have eg a chit chat forum where people talk just about anything not related to the board itself. We don't need to see post history there, but for other forums that are on topic, we would like to see it.
for this, you can simply edit the templates to hide the button for specific forums using some IF conditions.
I know that, but then I need to edit the extension myself, which gets overwritten on each update :)
But seems that will be the way to go, at least for now.
I agree with you, being able to set this per forum would be a nice addition.

Locked

Return to “Abandoned Extensions”