Page 4 of 5

Re: [RC] Prime Post Revision

Posted: Wed Feb 17, 2016 8:24 pm
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

Re: [RC] Prime Post Revision

Posted: Wed Feb 17, 2016 9:44 pm
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.

Re: [RC] Prime Post Revision

Posted: Thu Feb 18, 2016 8:18 am
by wowmatu
nice work :)

Re: [RC] Prime Post Revision

Posted: Thu Feb 18, 2016 11:27 am
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');
	}
}

Re: [RC] Prime Post Revision

Posted: Thu Feb 18, 2016 12:41 pm
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)

Re: [RC] Prime Post Revision

Posted: Fri Apr 08, 2016 5:47 pm
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 :)

Re: [RC] Prime Post Revision

Posted: Fri Apr 08, 2016 6:12 pm
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?

Re: [RC] Prime Post Revision

Posted: Sat Apr 09, 2016 5:38 am
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.

Re: [RC] Prime Post Revision

Posted: Sat Apr 09, 2016 3:34 pm
by Rhino.Freak
eh for some reason I don't see anything new at all anywhere after installing this extension. help me please?

Re: [RC] Prime Post Revision

Posted: Sat Apr 09, 2016 8:30 pm
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)

Re: [RC] Prime Post Revision

Posted: Thu Apr 14, 2016 1:25 pm
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.

Re: [RC] Prime Post Revision

Posted: Thu Apr 14, 2016 4:50 pm
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.

Re: [RC] Prime Post Revision

Posted: Thu Apr 14, 2016 5:38 pm
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.

Re: [RC] Prime Post Revision

Posted: Thu Apr 14, 2016 7:52 pm
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.

Re: [RC] Prime Post Revision

Posted: Thu Apr 14, 2016 7:53 pm
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.