[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!
Scam Warning
Locked
kryptz
Registered User
Posts: 14
Joined: Tue Aug 18, 2009 9:03 am

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

Post by kryptz »

Very nice mod, but I have 1 quesion:

I've put "Can view post details" for all groups to No, but administrators can still see the revisions and delete them.
How can I get that they can't do this?
kryptz
Registered User
Posts: 14
Joined: Tue Aug 18, 2009 9:03 am

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

Post by kryptz »

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

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

Post by primehalo »

Try putting Never instead of just No. If you can't figure out why a user still has a permission that you think they shouldn't, then go to the Permissions Mask section of the ACP, select the user, and do a trace on the specific permission you're looking for.
indijanac wrote:Is there some quick edit to change permission from "permissions allowing them to view the post information" to "Can change post author" ?!
This is the part that checks for whether the current user has permission to view the post info:

Code: Select all

$auth->acl_get('m_info', $forum_id) 
You can change 'm_info' to whatever you want. I believe changing the poster would be 'm_chgposter'.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
kryptz
Registered User
Posts: 14
Joined: Tue Aug 18, 2009 9:03 am

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

Post by kryptz »

Thanks a lot, it works now
I did the trace thing, and I found where it was wrong.
zach'
Registered User
Posts: 44
Joined: Sat Nov 01, 2008 2:07 pm

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

Post by zach' »

Hi primehalo

Thanks for this great mod, works fine on 3.05 :D

Here is my French translation :

Code: Select all

<?php
/**
*
* prime_post_revisions [French]
*
* @package language
* @version $Id: prime_post_revisions.php,v 1.2.0 2008/07/21 13:45:00 primehalo Exp $
* @copyright (c) 2007-2008 Ken F. Innes IV
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	// Viewing posts
	'PRIME_POST_REVISIONS_VIEW'				=> 'Voir l’historique.',	// Text for the link to view the revision history

	// Viewing revisions
	'PRIME_POST_REVISIONS_VIEWING'			=> 'Voir l’historique des éditions',
	'PRIME_POST_REVISIONS_VIEWING_EXPLAIN'	=> 'Cette page permet de consulter l’historique des éditions.',
	'PRIME_POST_REVISIONS_TITLE'			=> 'Historique éditions: %s',	// The %s is the post title
	'PRIME_POST_REVISIONS_FIRST'			=> 'Message initial: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_FINAL'			=> 'Dernière édition: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_COUNT'			=> 'Édition %d: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_INFO'				=> 'Édité par %1$s le %2$s.',
	'PRIME_POST_REVISIONS_NO_SUBJECT'		=> '[sans sujet]',	

	// Delete a revision
	'PRIME_POST_REVISIONS_DELETE'			=> 'Effacer édition',
	'PRIME_POST_REVISIONS_DELETE_CONFIRM'	=> 'Êtes vous sur de vouloir supprimer cette édition ?',
	'PRIME_POST_REVISIONS_DELETE_DENIED'	=> 'Vous n’avez pas les permissions nécessaires pour supprimer une édition.',
	'PRIME_POST_REVISIONS_DELETE_FAILED'	=> 'Une erreur est apparue pendant la suppression de l’édition.',
	'PRIME_POST_REVISIONS_DELETE_SUCCESS'	=> 'Cette édition à été supprimée avec succès.',
	'PRIME_POST_REVISIONS_DELETE_INVALID'	=> 'Aucune édition n’a été sélectionnée pour être supprimée.',

	// Delete all revisions
	'PRIME_POST_REVISIONS_DELETES'			=> 'Effacer toutes les éditions.',
	'PRIME_POST_REVISIONS_DELETES_CONFIRM'	=> 'Êtes vous sur de vouloir supprimer ces éditions ?',
	'PRIME_POST_REVISIONS_DELETES_DENIED'	=> 'Vous n’avez pas les permissions nécessaires pour supprimer ces éditions.',
	'PRIME_POST_REVISIONS_DELETES_FAILED'	=> 'Une erreur est apparue pendant la suppression des éditions.',
	'PRIME_POST_REVISIONS_DELETES_SUCCESS'	=> 'Ces éditions ont été supprimées avec succès.',
	'PRIME_POST_REVISIONS_DELETES_INVALID'	=> 'Aucune édition n’a été sélectionnée pour être supprimée.',
));

?>
I don't want to give permission to moderators to delete révision but only to view, so i have add one permission ("hard delete") only for administrator in this modified part

Code: Select all

// Check for authorization
$approve = (APPROVE_REMOVAL_POSTER && $user->data['user_id'] == $row['poster_id']) || (APPROVE_REMOVAL_MODERATOR && $auth->acl_get('f_delete', $row['forum_id']) && $auth->acl_get('m_harddelete', $row['forum_id']));
It seems to be ok (modérators have a deny if they try), but could you help me, i want also to hide the "delete icon" for modérators too, i don't see where to make this additional change :oops:
User avatar
primehalo
Former Team Member
Posts: 2904
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo »

zach' wrote:I don't want to give permission to moderators to delete révision but only to view, so i have add one permission ("hard delete") only for administrator in this modified part
You shouldn't have to add any code to do this, just change this:

Code: Select all

define('APPROVE_REMOVAL_MODERATOR', true);        // Can moderators (with the ability to delete posts) remove revisions?  
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
zach'
Registered User
Posts: 44
Joined: Sat Nov 01, 2008 2:07 pm

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

Post by zach' »

primehalo wrote:
zach' wrote:I don't want to give permission to moderators to delete révision but only to view, so i have add one permission ("hard delete") only for administrator in this modified part
You shouldn't have to add any code to do this, just change this:

Code: Select all

define('APPROVE_REMOVAL_MODERATOR', true);        // Can moderators (with the ability to delete posts) remove revisions?   
Thanks primehalo

i have already see this line, but i throught that the moderator delete permission would be the same moderator permission used by administrator, but in fact it works fine with this,

Another question please, when a past révision contain a "quote" bbcode it seems to modify the message without any bbcode display, for exemple :

Code: Select all

[quote="Phil":1xyc2gd7]
Bref, je me lance pour 17H30
[b:1xyc2gd7]Brighton - 17H30 - [/b:1xyc2gd7]
[/quote:1xyc2gd7]
there is not this with bbcode, when there is a revision with no "quote", so

Thanks a lot

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

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

Post by primehalo »

Sorry, I don't understand what you are asking.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
zach'
Registered User
Posts: 44
Joined: Sat Nov 01, 2008 2:07 pm

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

Post by zach' »

primehalo wrote:Sorry, I don't understand what you are asking.
Sorry, for my bad english, i will try to explain better

When i see the list of révisions of a post, and when there is one past revision post with "quote" of another post inside, threre is a problem in the view of the bbcode in this spécific revision

for exemple i can see this in :
[quote="Phil":1xyc2gd7]
post who has been quoted
[b:1xyc2gd7]bbcode bold is modified [/b:1xyc2gd7]
[/quote:1xyc2gd7]

post who has been past edited
Threre is anormal caracters in red, so bbcode can't show normaly

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

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

Post by primehalo »

When BBCodes are enable for a post, then those codes are added to help parse the BBCodes. If the post is then edited and the Parse BBCode option is disabled, the post is re-parsed.

So those codes show up in the revisions because I currently don't re-parse all of the revisions when a post is edited. I also don't store a flag specifying whether or not the Parse BBCode option was enabled for each revision. Perhaps in a future version I will implement one of these two actions, but for right now I think it's good enough, as paid projects need to take precedence over my freebie MODs.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
eman80
Registered User
Posts: 327
Joined: Tue Aug 19, 2008 1:49 pm

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

Post by eman80 »

Thanks primehalo for this mod and this great work.

I am running this mod on phpbb 3.0.6 RC2 and it seems that works fine :D

Here is my Arabic translation:

Code: Select all

<?php
/**
*
* prime_post_revisions [Arabic]
*
* @package language
* @version $Id: prime_post_revisions.php,v 1.2.0 2008/07/21 13:45:00 primehalo Exp $
* @copyright (c) 2007-2008 Ken F. Innes IV
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	// Viewing posts
	'PRIME_POST_REVISIONS_VIEW'				=> 'عرض تاريخ المشاركة.',	// Text for the link to view the revision history

	// Viewing revisions
	'PRIME_POST_REVISIONS_VIEWING'			=> 'مشاهدة تاريخ المشاركة',
	'PRIME_POST_REVISIONS_VIEWING_EXPLAIN'	=> 'هذه الصفحة تعرض كل النسخ الخاصة بهذه المشاركة، بدءاً بالنسخة الأحدث.',
	'PRIME_POST_REVISIONS_TITLE'			=> 'مشاهدة تاريخ المشاركة: %s',	// The %s is the post title
	'PRIME_POST_REVISIONS_FIRST'			=> 'المشاركة الأصلية: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_FINAL'			=> 'المشاركة الحالية: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_COUNT'			=> 'التعديل %d: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_INFO'				=> 'تم التعديل بواسطة %1$s في %2$s.',
	'PRIME_POST_REVISIONS_NO_SUBJECT'		=> '[لا عنوان]',	

	// Delete a revision
	'PRIME_POST_REVISIONS_DELETE'			=> 'حذف التعديل',
	'PRIME_POST_REVISIONS_DELETE_CONFIRM'	=> 'هل أنت متأكد من أنك تريد حذف هذا التعديل؟',
	'PRIME_POST_REVISIONS_DELETE_DENIED'	=> 'أنت تفتقر إلى الصلاحيات اللازمة لحذف هذا التعديل.',
	'PRIME_POST_REVISIONS_DELETE_FAILED'	=> 'حدث خطأ أثناء محاولة حذف التعديل.',
	'PRIME_POST_REVISIONS_DELETE_SUCCESS'	=> 'تم إزالة التعديل بنجاح.',
	'PRIME_POST_REVISIONS_DELETE_INVALID'	=> 'لم يتم اختيار أي من تعديلات المشاركة للإزالة.',

	// Delete all revisions
	'PRIME_POST_REVISIONS_DELETES'			=> 'حذف جميع التعديلات.',
	'PRIME_POST_REVISIONS_DELETES_CONFIRM'	=> 'هل أنت متأكد من أنك تريد حذف هذه التعديلات؟',
	'PRIME_POST_REVISIONS_DELETES_DENIED'	=> 'أنت تفتقر إلى الصلاحيات اللازمة لحذف هذه التعديلات.',
	'PRIME_POST_REVISIONS_DELETES_FAILED'	=> 'حدث خطأ أثناء محاولة حذف هذه التعديلات.',
	'PRIME_POST_REVISIONS_DELETES_SUCCESS'	=> 'تم إزالة التعديلات بنجاح.',
	'PRIME_POST_REVISIONS_DELETES_INVALID'	=> 'لم يتم اختيار أي من تعديلات المشاركة للإزالة.',
));

?>
welcome to my forum:
http://www.elibrary4arab.com
User avatar
primehalo
Former Team Member
Posts: 2904
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo »

Thanks.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
pawelooss
Registered User
Posts: 48
Joined: Wed Nov 04, 2009 8:26 pm

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

Post by pawelooss »

My Polish Translation. ;)

Code: Select all

<?php
/**
*
* prime_post_revisions [Polish]
*
* @package language
* @version $Id: prime_post_revisions.php,v 1.2.0 2008/07/21 13:45:00 primehalo Exp $
* @copyright (c) 2007-2008 Ken F. Innes IV
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
	// Viewing posts
	'PRIME_POST_REVISIONS_VIEW'				=> 'Zobacz historię postu.',	// Text for the link to view the revision history

	// Viewing revisions
	'PRIME_POST_REVISIONS_VIEWING'			=> 'Przeglądanie historii postu',
	'PRIME_POST_REVISIONS_VIEWING_EXPLAIN'	=> 'Ta strona pokazuje wszystkie wersje postu, rozpoczynając od najbardziej aktualnej.',
	'PRIME_POST_REVISIONS_TITLE'			=> 'Przeglądanie historii postu: %s',	// The %s is the post title
	'PRIME_POST_REVISIONS_FIRST'			=> 'Oryginalny post: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_FINAL'			=> 'Aktualny post: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_COUNT'			=> 'Zmiana %d: %s',			// The %s is the post title
	'PRIME_POST_REVISIONS_INFO'				=> 'Zmieniony przez %1$s %2$s.',
	'PRIME_POST_REVISIONS_NO_SUBJECT'		=> '[bez tematu]',	

	// Delete a revision
	'PRIME_POST_REVISIONS_DELETE'			=> 'Usuń zmianę',
	'PRIME_POST_REVISIONS_DELETE_CONFIRM'	=> 'Jesteś pewny(a), że chcesz usunąć tą zmianę?',
	'PRIME_POST_REVISIONS_DELETE_DENIED'	=> 'Nie masz niezbędnych uprawnień, by usunąć tą zmianę.',
	'PRIME_POST_REVISIONS_DELETE_FAILED'	=> 'Wystąpił błąd podczas próby usunięcia tej zmiany.',
	'PRIME_POST_REVISIONS_DELETE_SUCCESS'	=> 'Zmiana została pomyślnie usunięta.',
	'PRIME_POST_REVISIONS_DELETE_INVALID'	=> 'Nie została wybrana żadna zmiana do usunięcia.',

	// Delete all revisions
	'PRIME_POST_REVISIONS_DELETES'			=> 'Usuń wszystkie zmiany.',
	'PRIME_POST_REVISIONS_DELETES_CONFIRM'	=> 'Jesteś pewny(a), że chcesz usunąć te zmiany?',
	'PRIME_POST_REVISIONS_DELETES_DENIED'	=> 'Nie masz niezbędnych uprawnień, by usunąć te zmiany.',
	'PRIME_POST_REVISIONS_DELETES_FAILED'	=> 'Wystąpił błąd podczas próby usunięcia tych zmian.',
	'PRIME_POST_REVISIONS_DELETES_SUCCESS'	=> 'Zmiany zostały pomyślnie usunięte.',
	'PRIME_POST_REVISIONS_DELETES_INVALID'	=> 'Nie została wybrana żadna zmiana do usunięcia.',
));

?>

I have a problem. If I want to edit post with polish chars in subject, it displays SQL error.

For example - post subject is: "Re: [Ogłoszenie] Głosuj na nas!" and error is:

Code: Select all

SQL ERROR [ mysqli ]

Incorrect string value: '\xC5\x82osze...' for column 'post_subject' at row 1 [1366]
Please fix this!

EDIT: The problem was bad coding of SQL table. ;)


BTW: Is there any modification, which saves post edits for eg. for 1 week and than it will delete this revisions to not to burden the database? This would be cool! :D
Last edited by pawelooss on Sun Feb 07, 2010 1:00 pm, edited 2 times in total.
phpBB3 fan! ;)
User avatar
primehalo
Former Team Member
Posts: 2904
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

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

Post by primehalo »

Thank you for the translation!

I am not experiencing your problem. I copy and pasted that exact text into the subject of a post and edited the post several times and never got any error message.

Sorry, there is no auto-pruning yet.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass »

Hi there, i have a couple of questions...

Doeas it work on phpbb 3.06?

Is it a stable release?


Any known bugs?


Thanks in advance for your time..

PS> i'm a fan of all your mods. very useful..!!!
Locked

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