Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1841)
Allows to store old versions of posts and viewing edit history of post.
Permission can be set either to own or all posts and it's set by board.
Features
- Save version of post when edited
- Compare changes between versions
- Restore old version if needed
- Uses hooks to minimize edits needed to
Supported versions: SMF 2.0.x (Tested up to 2.0.2)
Version: 1.0.3 (16.03.2012)
Languages included: English, Finnish, Turkish
Links: SMF Modification Site (http://custom.simplemachines.org/mods/index.php?mod=1841), Support Topic (http://www.simplemachines.org/community/index.php?topic=312474.0), Github (https://github.com/nikop/PostHistory)
LicenseCopyright (c) 2012, Niko Pahajoki
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Niko Pahajoki nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Niko Pahajoki BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This is exactly what I was looking for Niko. Any chance of 1.1x compatibility??
Oh wow, Niko, you are amazing. This is exactly the kind of useful mod that we need more of for SMF 2, just simple little mods that add uniquely useful features that SMF would never natively include.
Oh, and Blinker, if you need this feature on SMF 1.1.x, then use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=1007 (http://custom.simplemachines.org/mods/index.php?mod=1007). It adds a 'delete spam post' feature as well, which overwrites the message's content with the spam message, but has the optional side effect of recording all edits of posts in the Recycle Bin.
Nice Mod Niko!
Good mod niko.
History of post would be so helpful for all forum owner as an added features.
Post History is amazing mod, but I have 1.1.x version , Any chance of 1.1.x compatibility??
thank u Niko ..
Quote from: D.S on May 23, 2009, 09:44:28 AM
Post History is amazing mod, but I have 1.1.x version , Any chance of 1.1.x compatibility??
thank u Niko ..
Ever read the replies...
Quote from: Eliana Tamerin on May 23, 2009, 01:57:35 AM
Oh wow, Niko, you are amazing. This is exactly the kind of useful mod that we need more of for SMF 2, just simple little mods that add uniquely useful features that SMF would never natively include.
Oh, and Blinker, if you need this feature on SMF 1.1.x, then use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=1007 (http://custom.simplemachines.org/mods/index.php?mod=1007). It adds a 'delete spam post' feature as well, which overwrites the message's content with the spam message, but has the optional side effect of recording all edits of posts in the Recycle Bin.
Good MOD, very very usefull :P
another great mod :)
Quote from: Joe N on May 23, 2009, 09:47:03 AM
Quote from: D.S on May 23, 2009, 09:44:28 AM
Post History is amazing mod, but I have 1.1.x version , Any chance of 1.1.x compatibility??
thank u Niko ..
Ever read the replies...
Quote from: Eliana Tamerin on May 23, 2009, 01:57:35 AM
Oh wow, Niko, you are amazing. This is exactly the kind of useful mod that we need more of for SMF 2, just simple little mods that add uniquely useful features that SMF would never natively include.
Oh, and Blinker, if you need this feature on SMF 1.1.x, then use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=1007 (http://custom.simplemachines.org/mods/index.php?mod=1007). It adds a 'delete spam post' feature as well, which overwrites the message's content with the spam message, but has the optional side effect of recording all edits of posts in the Recycle Bin.
thank u for attract attention
Hi :)
Turkish translate..
Modifications.turkish.php ;
// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'Mesajı Görüntüle';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İleti geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İleti geçmişini düzenleme';
$txt['cannot_posthistory_view_any'] = 'Bu yazının İleti geçmişi görünmesin!';
// Post History END
Quote from: Alpay on May 24, 2009, 05:32:42 AM
Hi :)
Turkish translate..
Modifications.turkish.php ;
// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'Mesajı Görüntüle';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İleti geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İleti geçmişini düzenleme';
$txt['cannot_posthistory_view_any'] = 'Bu yazının İleti geçmişi görünmesin!';
// Post History END
Thanks! Will include in next version (working on new build system which can handle multiple languages)
Niko I love this mod works really great in my localhost, but I want to suggest one feature, compare the posts, just like the SMF Wiki
Thanks
I have problems using this mod with russian-language-forum (cp1251). Some messages in post history see like "?????????????????????".
Niko, feature suggestion:
Only display the button if the post in question has edits recorded. It would save space on the display template, as most posts on my sites go unedited. This could be cached to save on queries.
Quote from: Eliana Tamerin on May 28, 2009, 02:41:47 PM
Niko, feature suggestion:
Only display the button if the post in question has edits recorded. It would save space on the display template, as most posts on my sites go unedited. This could be cached to save on queries.
Will be in next version (0.2).
Quote from: Oleg Vereshchagin on May 26, 2009, 03:12:19 PM
I have problems using this mod with russian-language-forum (cp1251). Some messages in post history see like "?????????????????????".
Are tables in correct character set?
Quote from: Niko on May 28, 2009, 03:30:42 PM
Quote from: Oleg Vereshchagin on May 26, 2009, 03:12:19 PM
I have problems using this mod with russian-language-forum (cp1251). Some messages in post history see like "?????????????????????".
Are tables in correct character set?
You are right. The table smf_messages_history was in the Swedish coding.
Quote from: Oleg Vereshchagin on May 29, 2009, 04:37:37 AM
Quote from: Niko on May 28, 2009, 03:30:42 PM
Quote from: Oleg Vereshchagin on May 26, 2009, 03:12:19 PM
I have problems using this mod with russian-language-forum (cp1251). Some messages in post history see like "?????????????????????".
Are tables in correct character set?
You are right. The table smf_messages_history was in the Swedish coding.
It means that your database is set to Swedish (mysql default) encoding. Select database and in Operations tab change collation to Russian and all new tables will use Russian encoding. (although it shouldn't cause errors, I recommend backing up before change)
Here's translation files for next version. Some new strings.
There is full translation for Finnish language already.
Partial Turkish translation of Alpay (http://www.simplemachines.org/community/index.php?action=profile;u=39002) included with new strings added for translation.
Make sure you save files as UTF-8 without BOM (byteorder mark).
0.2 Beta 1 has been added to mod site.
Changelog0.2
- Current version is now shown in list of edits
- Added markers for original version and current edit
SMF 2.0 RC1.2 tested and supported.
Great work Niko!
Really nice job
Hi Niko
The mod installed without any errors but after editing a message no edits were recorded. I checked and the post_history folder hadn't been installed. I uploaded it manually and the ran the install.php file but it returned this error message:
Fatal error: Function name must be a string in /home/******/public_html/home/post_history/Subs-Install.php on line 11
I am running v2.0 RC1 and I installed the Post_History_0.1.zip
Did I do something wrong?
Thanks for the help.
Congrats for a new release, Niko! Good work on incorporating my feature request, and a few other good new features. I can't wait to try it out.
If I were to upgrade from 1.0, would 2.0 b1 detect the has_history property on posts already made, or can that only be on posts made after upgrading to 2.0 b1?
Quote from: Eliana Tamerin on September 12, 2009, 10:19:53 PM
Congrats for a new release, Niko! Good work on incorporating my feature request, and a few other good new features. I can't wait to try it out.
If I were to upgrade from 1.0, would 2.0 b1 detect the has_history property on posts already made, or can that only be on posts made after upgrading to 2.0 b1?
It does work on old posts too.
All I can say is THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU.
Been wanting this on SMF for ages.
Quote from: Eliana Tamerin on May 23, 2009, 01:57:35 AM
Oh wow, Niko, you are amazing. This is exactly the kind of useful mod that we need more of for SMF 2, just simple little mods that add uniquely useful features that SMF would never natively include.
Oh, and Blinker, if you need this feature on SMF 1.1.x, then use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=1007 (http://custom.simplemachines.org/mods/index.php?mod=1007). It adds a 'delete spam post' feature as well, which overwrites the message's content with the spam message, but has the optional side effect of recording all edits of posts in the Recycle Bin.
its good idea for deleted post but not for edit post.
Quote from: ttuu on September 13, 2009, 09:38:12 AM
Quote from: Eliana Tamerin on May 23, 2009, 01:57:35 AM
Oh wow, Niko, you are amazing. This is exactly the kind of useful mod that we need more of for SMF 2, just simple little mods that add uniquely useful features that SMF would never natively include.
Oh, and Blinker, if you need this feature on SMF 1.1.x, then use this mod instead: http://custom.simplemachines.org/mods/index.php?mod=1007 (http://custom.simplemachines.org/mods/index.php?mod=1007). It adds a 'delete spam post' feature as well, which overwrites the message's content with the spam message, but has the optional side effect of recording all edits of posts in the Recycle Bin.
its good idea for deleted post but not for edit post.
Well, it's a solution, regardless of the lack of polish like this mod has, that works unless/until a mod like this is backported.
nice mod ...can you make one for 1.1.x version..
Quote from: Shark-Time on September 13, 2009, 10:35:53 AM
nice mod ...can you make one for 1.1.x version..
No. I don't have time to do.
Great mod Niko.
I guess Alpay don't have time for update his translate.
This is 2.0 turkish translate.
<?xml version="1.0"?>
<?xml-stylesheet href="modification.xsl" type="text/xsl"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager. If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php
================================================================================
Modification files can be used to modify files so that they do what
your package needs them to do to work properly.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<!-- This information needs to be the same as that in the package-info.xml. -->
<id>Niko:PostHistory</id>
<version>{version}</version>
<file name="$languagedir/Modifications.turkish.php" error="ignore">
<operation>
<search position="end" />
<add><![CDATA[// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'İletiyi Görüntüle';
// Untranslated
$txt['ph_original_edit'] = 'Orjinal';
// Untranslated
$txt['ph_current_edit'] = 'Şuanki';
// Untranslated
$txt['ph_current_original_edit'] = 'şuanki, original';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusunu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İletilerinin geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İletinin geçmişini düzenleme';
$txt['cannot_posthistory_view_any'] = 'Bu yazının ileti geçmişi görünmesin!';
// Post History END]]></add>
</operation>
</file>
</modification>
Thanks, [Daydreamer] =)
I guess I can not catch up with translations :(
Quote from: [Daydreamer] on September 14, 2009, 05:38:33 AM
Great mod Niko.
I guess Alpay don't have time for update his translate.
This is 2.0 turkish translate.
<?xml version="1.0"?>
<?xml-stylesheet href="modification.xsl" type="text/xsl"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager. If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php
================================================================================
Modification files can be used to modify files so that they do what
your package needs them to do to work properly.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<!-- This information needs to be the same as that in the package-info.xml. -->
<id>Niko:PostHistory</id>
<version>{version}</version>
<file name="$languagedir/Modifications.turkish.php" error="ignore">
<operation>
<search position="end" />
<add><![CDATA[// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'İletiyi Görüntüle';
// Untranslated
$txt['ph_original_edit'] = 'Orjinal';
// Untranslated
$txt['ph_current_edit'] = 'Şuanki';
// Untranslated
$txt['ph_current_original_edit'] = 'şuanki, original';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusunu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İletilerinin geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İletinin geçmişini düzenleme';
$txt['cannot_posthistory_view_any'] = 'Bu yazının ileti geçmişi görünmesin!';
// Post History END]]></add>
</operation>
</file>
</modification>
Nice
Quote from: Groundhog on September 12, 2009, 06:17:01 PM
Hi Niko
The mod installed without any errors but after editing a message no edits were recorded. I checked and the post_history folder hadn't been installed. I uploaded it manually and the ran the install.php file but it returned this error message:
Fatal error: Function name must be a string in /home/******/public_html/home/post_history/Subs-Install.php on line 11
I am running v2.0 RC1 and I installed the Post_History_0.1.zip
Did I do something wrong?
Thanks for the help.
Just wondering if you had any idea :-\
Hoping this comes to RC2 soon. This is a valuable plugin for my forum.
Uploaded version with RC2.0 support. (0.2 Beta 2)
Suggestion, Niko. I've modded my own version to put the link before the Report to moderator link, since I think that makes more sense for the action. It's not modifying the post at all (which the buttons in that strip, aside from Quote, all do in some way), it's just accessing minor information. Which is similar to the IP that's logged for each post.
Plus, with smaller screens and fixed width themes, and even with Curve's new fixed proportions display template (which is a godsend), the buttons generally wind up dropping down to a new line. This isn't an ideal situation, and so I think putting the link down near the Report to moderator link would make more sense and prevent the template from looking cluttered.
Besides, when someone sees the « Last Edit: Month Day, Year, HH:MM:SS PM by displayname », the link to viewing edits of the post will be right below it and users would connect the two thoughts much easier than if the button were at the top.
Quote from: Eliana Tamerin on November 13, 2009, 06:29:23 PM
Suggestion, Niko. I've modded my own version to put the link before the Report to moderator link, since I think that makes more sense for the action. It's not modifying the post at all (which the buttons in that strip, aside from Quote, all do in some way), it's just accessing minor information. Which is similar to the IP that's logged for each post.
Plus, with smaller screens and fixed width themes, and even with Curve's new fixed proportions display template (which is a godsend), the buttons generally wind up dropping down to a new line. This isn't an ideal situation, and so I think putting the link down near the Report to moderator link would make more sense and prevent the template from looking cluttered.
Besides, when someone sees the « Last Edit: Month Day, Year, HH:MM:SS PM by displayname », the link to viewing edits of the post will be right below it and users would connect the two thoughts much easier than if the button were at the top.
Good idea.
Thank you so much for the update!
And I agree with above on the location. And the most ideal would be like Vbullitien and make the "last edit by" line clickable to the post history.
Oh, and I am have a little history with the current Beta 2. The link to the post history is there, but there is no visible button. I can hover my mouse where it should be and find it though.
Quote from: dakpluto on November 15, 2009, 08:29:54 AM
And I agree with above on the location. And the most ideal would be like Vbullitien and make the "last edit by" line clickable to the post history.
Except SMF has a courtesy time (by default, 90 seconds) to edit before its logged on the post. The View Edits button will show up even if the Last Edit By... line isn't there. So you would miss out on all the edits that took place within 90 seconds.
Mod just installed. Can't believe I now have post revisions in my forum. This is totally awesome o_O Thank you very very very very much !
Installed it on RC2 shows it is active in Core Features however I don't see the option in the post at all. Is there a setting I am missing
Quote from: DirtRider on December 02, 2009, 09:26:11 AM
Installed it on RC2 shows it is active in Core Features however I don't see the option in the post at all. Is there a setting I am missing
Not too worry I have killed the mod seeing it does not seem to work
The mod is working great for me, the problem is that the button don't appear, you can click just after the Split Topic button.
So instead of put it back I just make that I can see the post history in the " « Last Edit: December 03, 2009, 11:37:20 PM by NIBOGO »"
Great job Niko! :)
New version released:
Better curve theme, now link is Last Edit line if it's enabled, otherwise it will show link in same place.
Popup is used if possible instead of loading whole new page.
Quote from: Niko on December 04, 2009, 07:29:12 PM
New version released:
Better curve theme, now link is Last Edit line if it's enabled, otherwise it will show link in same place.
Popup is used if possible instead of loading whole new page.
Works like a charm!
Thanks Niko
For all the people with the "Reason for Edit" Mod you must edit the part of the Post History Mod on Display.template.php with this code:
// Show last edit + has history?
if ($settings['show_modify'] && !empty($message['modified']['name']) && $message['can_see_history'] && $message['has_history'])
echo '
<a href="', $scripturl, '?action=posthistory;topic=', $context['current_topic'], '.0;msg=', $message['id'], '" onclick="return reqWin(this.href + \';popup\');">« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], ' ', !empty($message['modified']['edit_reason']) ? ', '.$txt['reason'].': ' . $message['modified']['edit_reason'] : '' , '</em> »</a>';
// No last edit but history?
elseif ($message['can_see_history'] && $message['has_history'])
echo '
<a href="', $scripturl, '?action=posthistory;topic=', $context['current_topic'], '.0;msg=', $message['id'], '" onclick="return reqWin(this.href + \';popup\');">« <em>', $txt['view_post_history'], '</em> »</a>';
// or ..last edit but no history?
elseif ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], ' ', !empty($message['modified']['edit_reason']) ? ', '.$txt['reason'].': ' . $message['modified']['edit_reason'] : '' , '</em> »';
Would be nice if you include support for the Reason for Edit Mod, it's a very used mod and as soon as I have time I'll add support on that mod for the Post History, the problem goes when someone has the Reason for Edit Mod installed and try to install this mod.
Quote from: dakpluto on November 15, 2009, 08:29:54 AM
And I agree with above on the location. And the most ideal would be like Vbullitien and make the "last edit by" line clickable to the post history.
!!!!! Thank you, Thank you, Thank you!
do i have to enable any option to make it to work ....
it installed without any errors but i cant see any post history in edited posts anywhere
Hi niko
i've just installed your mod but...where to manage it? and where old post are shown? i cannot see them.
tnx a lot!
Edit: ok i saw that we must click on "last modify" to see the last posts...but where is the administration part?
2nd edit: ok i saw that this administration part is in members permissions.
Tnx a lot, very useful mod ;D
i made the permissions part but still how to see the last edited posts in posts
QuoteEdit: ok i saw that we must click on "last modify" to see the last posts...but where is the administration part?
i cant see any last modify thing in my posts
u must modify a post, AFTER installing the package. Now u will see the string as a link to other posts:
[img=http://s1.postimage.org/bN8dA.jpg] (http://www.postimage.org/image.php?v=gxbN8dA)
Quote from: scimmiotto on December 06, 2009, 04:34:25 AM
u must modify a post, AFTER installing the package. Now u will see the string as a link to other posts:
[img=http://s1.postimage.org/bN8dA.jpg] (http://www.postimage.org/image.php?v=gxbN8dA)
thanx for replies .... i thought i will work on old post .... bad from me
it working on my side now ..... thanx once again
no problem, we are all here to help each other :)
Very good mod! Thanks a lot! :)
Is there a chance to implement a "Switch to old version of an edited post" feature in the next versions? :)
Quote from: Boby_ on December 10, 2009, 05:41:24 AM
Very good mod! Thanks a lot! :)
Is there a chance to implement a "Switch to old version of an edited post" feature in the next versions? :)
Personally I'd just prefer a Quote button on those history pages.
Sorry to ask the same question, but I can't find where to edit the permission setting that everyone's talking about. I made a new post and tried to edit it, but the "last editted by" link won't show up.
I'd really like to get this mod to work, thanks in advance.
are there any admin settings in this mod? i cannot see where they are.
Quote from: scimmiotto on December 19, 2009, 05:05:59 AM
are there any admin settings in this mod? i cannot see where they are.
No, there are no settings apart from disable or enable. What settings are you looking for?
Next version will have also ability to view diff. See attachment for sneak peek. (It won't parse code in this case)
Niko, I was wondering, any chance to have a quote button or way to access the bbc version of the Edit, so that any malicious edits can be reversed?
Quote from: Eliana Tamerin on December 27, 2009, 11:41:52 AM
Niko, I was wondering, any chance to have a quote button or way to access the bbc version of the Edit, so that any malicious edits can be reversed?
Yes. This is another feature added in next version :)
Also if anyone wants to translate, currently only Finnish and English are up to date.
Turkish translation needs updating:
// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'İletiyi Görüntüle';
$txt['ph_original_edit'] = 'Orjinal';
$txt['ph_current_edit'] = 'Şuanki';
$txt['ph_current_original_edit'] = 'şuanki, original';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
// !!! Untranslated
$txt['compare_selected'] = 'Compare Selected';
// !!! Untranslated
$txt['restore'] = 'Restore';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusunu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
// !!! Untranslated
$txt['permissionname_posthistory_restore'] = 'Restore older version';
// !!! Untranslated
$txt['permissionhelp_posthistory_restore'] = 'Allows user to start editing from older version of post.';
// !!! Untranslated
$txt['permissionname_posthistory_restore_own'] = 'Own post';
// !!! Untranslated
$txt['permissionname_posthistory_restore_any'] = 'Any post';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İletilerinin geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İletinin geçmişini düzenleme';
// !!! Untranslated
$txt['permissionname_simple_posthistory_restore_own'] = 'Restore older version of own post';
// !!! Untranslated
$txt['permissionname_simple_posthistory_restore_any'] = 'Restore older versions of someone else\'s post';
$txt['cannot_posthistory_view_any'] = 'Bu yazının ileti geçmişi görünmesin!';
// !!! Untranslated
$txt['cannot_posthistory_restore_own'] = 'You are not allowed to start editing from older version of your posts!';
// !!! Untranslated
$txt['cannot_posthistory_restore_any'] = 'You are not allowed to start editing from older version of someone else\'s post!';
// Post History END
Or translate into new language:
// Post History Start
$txt['core_settings_item_posthistory'] = 'Post History';
$txt['core_settings_item_posthistory_desc'] = 'Store history of edits of message content into database.';
$txt['view_post_history'] = 'View Edits of Post';
$txt['title_view_post_history'] = 'Viewing Post History for - %1$s';
$txt['ph_last_edit'] = 'Latest Edit By';
$txt['ph_last_time'] = 'Edit Time';
$txt['ph_view_edit'] = 'View Post';
$txt['ph_original_edit'] = 'original';
$txt['ph_current_edit'] = 'current';
$txt['ph_current_original_edit'] = 'current, original';
$txt['ph_no_edits'] = 'No one has edited this post yet';
$txt['compare_selected'] = 'Compare Selected';
$txt['restore'] = 'Restore';
$txt['permissionname_posthistory_view'] = 'View Edit History of Post';
$txt['permissionhelp_posthistory_view'] = 'Allows user to view past versions of post.';
$txt['permissionname_posthistory_view_own'] = 'Own post';
$txt['permissionname_posthistory_view_any'] = 'Any post';
$txt['permissionname_posthistory_restore'] = 'Restore older version';
$txt['permissionhelp_posthistory_restore'] = 'Allows user to start editing from older version of post.';
$txt['permissionname_posthistory_restore_own'] = 'Own post';
$txt['permissionname_posthistory_restore_any'] = 'Any post';
$txt['permissionname_simple_posthistory_view_own'] = 'View edit history of their own post';
$txt['permissionname_simple_posthistory_view_any'] = 'View edit history of someone else\'s post';
$txt['permissionname_simple_posthistory_restore_own'] = 'Restore older version of own post';
$txt['permissionname_simple_posthistory_restore_any'] = 'Restore older versions of someone else\'s post';
$txt['cannot_posthistory_view_any'] = 'You are not allowed to view history of this post!';
$txt['cannot_posthistory_restore_own'] = 'You are not allowed to start editing from older version of your posts!';
$txt['cannot_posthistory_restore_any'] = 'You are not allowed to start editing from older version of someone else\'s post!';
// Post History END
New Turkish Translation * Niko :
// Post History Start
$txt['core_settings_item_posthistory'] = 'İleti Geçmişi';
$txt['core_settings_item_posthistory_desc'] = 'Veritabanında ki İleti geçmişleri.';
$txt['view_post_history'] = 'İleti Geçmişini Görüntüle';
$txt['title_view_post_history'] = 'İleti Geçmişi Görüntüleniyor - %1$s';
$txt['ph_last_edit'] = 'Son Düzenleme';
$txt['ph_last_time'] = 'Düzenleme Zamanı';
$txt['ph_view_edit'] = 'İletiyi Görüntüle';
$txt['ph_original_edit'] = 'Orjinal';
$txt['ph_current_edit'] = 'Şuanki';
$txt['ph_current_original_edit'] = 'şuanki, original';
$txt['ph_no_edits'] = 'Konuda henüz bir düzenleme yok';
$txt['compare_selected'] = 'Seçilenleri karşılaştırın';
$txt['restore'] = 'Eski Hali';
$txt['permissionname_posthistory_view'] = 'İleti düzenleme geçmişini görüntüle';
$txt['permissionhelp_posthistory_view'] = 'Eski İleti geçmişini görüntüle';
$txt['permissionname_posthistory_view_own'] = 'Kendi Konusunu';
$txt['permissionname_posthistory_view_any'] = 'Herhangibir Konuyu';
$txt['permissionname_posthistory_restore'] = 'İletinin önceki halini düzenleyebilir.';
$txt['permissionhelp_posthistory_restore'] = 'İletinin önceki halini düzenleyebilir.';
$txt['permissionname_posthistory_restore_own'] = 'Kendi İletisini';
$txt['permissionname_posthistory_restore_any'] = 'Herhangi bir iletiyi';
$txt['permissionname_simple_posthistory_view_own'] = 'Kendi İletilerinin geçmişini düzenleme';
$txt['permissionname_simple_posthistory_view_any'] = 'Herhangibir İletinin geçmişini düzenleme';
$txt['permissionname_simple_posthistory_restore_own'] = 'Kendi iletisinin İletinin geçmişini düzenleyebilir';
$txt['permissionname_simple_posthistory_restore_any'] = 'Herhangibir İletinin İletinin geçmişini düzenleyebilir';
$txt['cannot_posthistory_view_any'] = 'Bu yazının ileti geçmişi görüntüleyemezsiniz!';
$txt['cannot_posthistory_restore_own'] = 'Bu İletinin ileti geçmişini düzenleyemezsiniz!';
$txt['cannot_posthistory_restore_any'] = 'Herhangibir İletinin İletinin geçmişini düzenleyemezsiniz!';
// Post History END
Thanks, Alpay!
quick question if you dont mind
Am getting an error saying
feature_posthistory.png missing..
Have looked in the zip file and its not there
so is this to do with your mod?
Thanks
Need RC3 version :(
guess not
0.3 Released with RC3 support!
thank you very much, beautiful mod, and i see you've developed a lot of stuff, good work
what table this mod depends on? arabic characters appear as questions marks and i need to convert it to utf-8 general
Please add russian translation. Files in attachments.
Quote from: Niko on March 13, 2010, 02:52:53 PM
0.3 Released with RC3 support!
Getting white pages for some comparisons. Haven't been able to pin down a reason, though. Nothing in the error logs when it happens.
Awesome mod, can't wait to try this out on my test forum.
While it might be beyond the scope of this mod, does anyone know of a way to extend the functionality to deleted posts? That way, I could let users remove their own posts completely but still have a log of what was there before.
It doesn't have to be elegant. Even if it was something like a hidden "Recycle bin" board that all posts deleted by anyone other than an admin get moved to.
Update:
After installing this mod (SMF2 RC3), I get the following error when trying to Modify a post:
Database Error
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation 'ifnull'
File: /********/Sources/Post.php
Line: 730
I installed the mod and it works flawlessly, but I would like to see 2 more features:
- add a permission to delete history items (eg by moderators)
- add a setting that allows to disregard edits which have been made within the grace period (Courtesy edit wait time)
Good work Niko and very much needed on my forums, I sent a donation your way.
Quote from: Bugo on March 13, 2010, 07:37:49 PM
Please add russian translation. Files in attachments.
Is this complete translation? I did not add prev as it was missing some new strings added in 0.3
Quote from: Kolya on March 15, 2010, 08:08:01 PM
I installed the mod and it works flawlessly, but I would like to see 2 more features:
- add a permission to delete history items (eg by moderators)
- add a setting that allows to disregard edits which have been made within the grace period (Courtesy edit wait time)
Good work Niko and very much needed on my forums, I sent a donation your way.
Very possible ideas
Quote from: sremick on March 15, 2010, 11:45:43 AM
Awesome mod, can't wait to try this out on my test forum.
While it might be beyond the scope of this mod, does anyone know of a way to extend the functionality to deleted posts? That way, I could let users remove their own posts completely but still have a log of what was there before.
It doesn't have to be elegant. Even if it was something like a hidden "Recycle bin" board that all posts deleted by anyone other than an admin get moved to.
Might happen in future. I have had plans to do this as separate mod.
Quote from: sremick on March 15, 2010, 12:09:09 PM
Update:
After installing this mod (SMF2 RC3), I get the following error when trying to Modify a post:
Database Error
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation 'ifnull'
File: /********/Sources/Post.php
Line: 730
Quote from: drhamza on March 13, 2010, 04:52:08 PM
thank you very much, beautiful mod, and i see you've developed a lot of stuff, good work
what table this mod depends on? arabic characters appear as questions marks and i need to convert it to utf-8 general
smf_posts_history has wrong collation (ie latin or othet local encoding instead of utf8). To avoid this you should change database collation so every new one will get utf8 collation. (or otherway it's utf8 insted of whatever is your local encoding). This has been reported as a bug to get pckage functions to ensure correct collation.
Quote from: Niko on March 17, 2010, 01:27:47 PM
Might happen in future. I have had plans to do this as separate mod.
Actually, now that I look deeper into it, it looks like SMF already has this functionality built-in...? Or am I missing something? I tried it and it seems to work (for both individual posts and entire threads).
Quotesmf_posts_history has wrong collation (ie latin or othet local encoding instead of utf8). To avoid this you should change database collation so every new one will get utf8 collation. (or otherway it's utf8 insted of whatever is your local encoding). This has been reported as a bug to get pckage functions to ensure correct collation.
Well there's no "smf_posts_history" table but there is an "smf_messages_history"... is that what you meant? Anyhow, I'm still confused because both say "utf8"... smf_messages_history is "utf8_unicode_ci" at the moment, while some others are "utf8_general_ci".
Still not clear on what I need to do to fix this...
Yeah, there already is a "Recycle bin" board function in SMF.
Here's one more suggestion for Post History:
When writing a post I would like to be able to set a bit in the [Additional Options...] that makes the history of this post visible for everyone.
That way I could show the history eg of a FAQ, to users who generally aren't allowed to see post histories.
And a user who gets accused of having edited out some important part of his post (it happens) could then retroactively set this bit and show the history of his post to anyone.
Quote from: Kolya on March 17, 2010, 07:00:22 PM
Yeah, there already is a "Recycle bin" board function in SMF.
I think he meant like vbulletin has soft delete, posts history could be viewed from topic it was in.
Quote from: Niko on March 18, 2010, 12:56:56 PM
I think he meant like vbulletin has soft delete, posts history could be viewed from topic it was in.
Not sure which "he" you're referring to, but for myself I think that the Recycle Bin function I now found in SMF is sufficient. :)
Anyway, still need help on the last part of my post:
http://www.simplemachines.org/community/index.php?topic=312474.msg2543632#msg2543632
Niko, miss this one? Or can't reproduce?
Quote from: Eliana Tamerin on March 14, 2010, 02:49:20 PM
Quote from: Niko on March 13, 2010, 02:52:53 PM
0.3 Released with RC3 support!
Getting white pages for some comparisons. Haven't been able to pin down a reason, though. Nothing in the error logs when it happens.
That happened to me too, just one time though, so I thought it was a network problem.
I can replicate it, I just can't consistently reproduce it. It seems tied to certain comparison combinations on my forum's posts.
Quote from: Eliana Tamerin on March 18, 2010, 04:11:07 PM
Niko, miss this one? Or can't reproduce?
Quote from: Eliana Tamerin on March 14, 2010, 02:49:20 PM
Quote from: Niko on March 13, 2010, 02:52:53 PM
0.3 Released with RC3 support!
Getting white pages for some comparisons. Haven't been able to pin down a reason, though. Nothing in the error logs when it happens.
Haven't had time to try to reproduce
tagged. Thanks for the great mod!
Quote from: Niko on March 20, 2010, 02:01:31 PM
Quote from: Eliana Tamerin on March 14, 2010, 02:49:20 PM
Getting white pages for some comparisons. Haven't been able to pin down a reason, though. Nothing in the error logs when it happens.
Haven't had time to try to reproduce
Apparently it cannot handle posts that contain
quotes in the last version.
Unrelated to this, I'm still very interested in a post-centric permission to
show the history to anyone (as opposed to
view history in the current user-centric permission system). Like a check-box when posting.
I've had it occur on posts which do not include quotes.
That might well be. All I checked was that I could reliably reproduce the error when the latest version of the post contained a quote.
There might still be other ways to trigger this bug, eg a code section or something completely different.
any chance updating it the way so it will allow to add to custom theme?
You can already add it to a custom theme, that's built into SMF 2. If the mod won't install on a particular theme, then you'll have to manually install it there, or look for support on that theme's support topic.
for some reason this particular one doesn't give me that option
Quote from: Niko on March 20, 2010, 02:01:31 PM
Quote from: Eliana Tamerin on March 18, 2010, 04:11:07 PM
Niko, miss this one? Or can't reproduce?
Quote from: Eliana Tamerin on March 14, 2010, 02:49:20 PM
Quote from: Niko on March 13, 2010, 02:52:53 PM
0.3 Released with RC3 support!
Getting white pages for some comparisons. Haven't been able to pin down a reason, though. Nothing in the error logs when it happens.
Haven't had time to try to reproduce
Any updates on this problem?
Quote from: flapjack on April 05, 2010, 08:53:45 PM
any chance updating it the way so it will allow to add to custom theme?
Definately.... Just copy and paste "PostHistory.template.php" from the themes/default to your themes folder.
This mod still installs on SMF 2.0 RC4 with just a minor change:
In package-info.xml change the line: <install for="2.0 RC3"> to reflect the new version RC4.
If you already had the mod installed before the database tables already exist and you want to comment out the table creation in post_history/install.php like so: //doTables($tables);
So the mod still works, however the comparison bug where it just shows a white page on some comparisons also still exists. Would be really cool if you could have a look at this Niko.
this was one of the more important mods I used, I will try that fix to see.
It's important for my for forum as well and I don't understand why this isn't getting more attention.
This should be an option in the core build. It's that important. Because it's about preserving the most precious thing on any forum: The content generated by the users.
vBB has this option. SMF has a mod, with patchy functionality and support.
It seems to be working ok for me, I've tested it on rc3 and rc4, but haven't put it out on a live site yet.
works just fine on live sites too ;)
After installing, then logging in... must reset password to log in again. Any thoughts on this? Tried on a number of different test servers, including rc3 and 4.
Quote from: WillyP on December 14, 2010, 09:57:46 AM
After installing, then logging in... must reset password to log in again. Any thoughts on this? Tried on a number of different test servers, including rc3 and 4.
Any other mods? I can't see why this mod would cause that... it doesn't edit anything expect post/display pages.
No, clean sites I made just to test this.
Is there anyway to make it for 1.1.12?
will there be a rc5 version?
I changed the .xml file to reflect version RC5. It's installed fine and seems to be functioning perfectly.
I'll give an update if anything goes wrong, but it all looks good! :)
A user mentioned to me that the "Last Edit: {date/time} by {name}" displays the users login name rather then the display name. Two issues with this comes to mind.
First, if someone edits their own post, if their display name is different then their login name, it looks kind of weird since its showing one name in the poster information and then their login name with the edit information.
Second, while there are many reasons that the two names may be different, some users use the difference as a form of security. It makes it a little harder for someone to guess your password and log in as you when you log in with a different name then what is displayed everywhere else in the forum.
I had a user mention this to me and I feel it valid enough that I'm editing the function on the sites I work on. Soon as I figure it out ;)
I also though that Id mention it here because I do think its a valid point and you might want to change this in the mod.
1.0 released for SMF 2.0 RC5. Mainly same as before except that it uses hooks when possible.
Thanks for the update
Very nice mod, thanks. Installed this yesterday but found when I went to set up the permissions I got a syntax error on line 44 of PostHistory.php. There seemed to be an extra '+' infront of the '=' so I removed it and it seems to work fine now, except for the fact that I can't find the permission to enable or disable for certain member groups.
EDIT: Forgot to mention that I got this error in the error log when I tried to assign the permissions
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
File: /home/thelas13/public_html/Forum/Sources/ManagePermissions.php
Line: 869
Line 44 was supposed to be: $permissionList['board'] += array( not $permissionList['post'] += array(
Change it and it should work. (Package is also fixed).
Nice one Niko, all fixed now thanks :D
Cant uninstall 'Modification parse error'
package-info.xml
<modification format="xml" type="file" reverse="true">install-rc2.xml</modification>
<modification format="xml" type="file" reverse="true">install.xml</modification>
Does this work with 2.0 Gold?
yes it does with the use of version emulation to install it.
1.0.2 updated for SMF 2.0.1 (no code changes).
Source code is now available at https://github.com/nikop/PostHistory
Still throws white pages on many comparisons.
Quote from: Kolya on March 17, 2010, 07:00:22 PM
Here's one more suggestion for Post History:
When writing a post I would like to be able to set a bit in the [Additional Options...] that makes the history of this post visible for everyone.
That way I could show the history eg of a FAQ, to users who generally aren't allowed to see post histories.
And a user who gets accused of having edited out some important part of his post (it happens) could then retroactively set this bit and show the history of his post to anyone.
I would like to see this as well. I haven't downloaded yet, but it sounds like something I definitely want. I would like to see the [Additional Options...] have a selection to decide whether the history is visible only to poster & moderators, or to everyone. That would be invaluable, especially with our "Site Rules" topic, our FAQ, and in certain forum games where people may accuse others of changing a post after other gameplay has progressed.
Released updated version for SMF 2.0.2 :)
What was changed? Is there a changelog anywhere?
Nice!
I love this mod ;-)
it is a great mod but where can I get the image for the post history that should show in core features
all I get < forum name>/Themes/default/images/admin/feature_posthistory.png (this file doesn't exist )
Quote from: dvk01 on April 21, 2012, 12:37:27 PM
it is a great mod but where can I get the image for the post history that should show in core features
all I get < forum name>/Themes/default/images/admin/feature_posthistory.png (this file doesn't exist )
Have you checked the default theme to see if it shows there?
Quote from: Old Fossil on April 21, 2012, 12:38:19 PM
Have you checked the default theme to see if it shows there?
it doesn't show in any theme
I only have core & curve installed
I have installed it on 2 different forums & the image is missing in both
Niko, I've been looking for a way to have a permissions setting that would allow a user to edit their posts but hold the edits for moderation before making them visible. The part that I thought would be hard about it is that it would require multiple versions of a post to exist in the database, a current post and a draft that is being held for approval.
It occurs to me that your mod has solved the multiple version problem. Do you think it would be possible to add a feature that when someone edits a post they might have a permission setting that makes the latest version that they have edited not visible, and have that show up in the version history and a moderator having the ability to make the latest version visible?
The purpose of this is to have a way to prevent spammers who sign up for a new account, post normal looking messages, then come back to edit them to add spam to their messages. Holding the edits for approval is sometimes better than completely blocking the ability to edit posts.
Quote from: bugstomper on June 11, 2012, 06:03:09 PM
Niko, I've been looking for a way to have a permissions setting that would allow a user to edit their posts but hold the edits for moderation before making them visible. The part that I thought would be hard about it is that it would require multiple versions of a post to exist in the database, a current post and a draft that is being held for approval.
It occurs to me that your mod has solved the multiple version problem. Do you think it would be possible to add a feature that when someone edits a post they might have a permission setting that makes the latest version that they have edited not visible, and have that show up in the version history and a moderator having the ability to make the latest version visible?
The purpose of this is to have a way to prevent spammers who sign up for a new account, post normal looking messages, then come back to edit them to add spam to their messages. Holding the edits for approval is sometimes better than completely blocking the ability to edit posts.
Sorry for late reply, but I think this is good idea and possible to do.
Does this mod track the individual changes within a post (like a wiki), or does it just store complete copies of each individual edited version of a post?
Quote from: Col on December 09, 2012, 01:47:09 PM
Does this mod track the individual changes within a post (like a wiki), or does it just store complete copies of each individual edited version of a post?
Anyone?
Thanks.
Complete copy of each version is stored
Quote from: Col on December 09, 2012, 01:47:09 PM
Does this mod track the individual changes within a post (like a wiki), or does it just store complete copies of each individual edited version of a post?
Wikis also save complete versions of articles and then can show the changes when comparing 2 versions.
Exactly like this mod does.
Doesn´t work with the Broken Link List Mod.
Fatal error: Cannot redeclare loadEdit() (previously declared in /xxx/Sources/PostHistory.php:221) in /xxx/Sources/BrokenLinksList.php on line 416
:(
Can you help me?
A very good mod. The one I was looking for to improve forum post moderation.
Quote from: Eclipse16V on January 02, 2013, 03:45:06 AM
Doesn´t work with the Broken Link List Mod.
Fatal error: Cannot redeclare loadEdit() (previously declared in /xxx/Sources/PostHistory.php:221) in /xxx/Sources/BrokenLinksList.php on line 416
:(
Can you help me?
Error fixed.
Sorry to bump this, but does anyone know if it's working fine with SMF 2.0.4, without emulation? I noticed it had to be updated for both 2.0.1 and 2.0.2, hence why I ask.
Looking at the mods parser all the edits which are there show so there is no reason as to why the mod won't work.
Quote from: Old Fossil on April 11, 2013, 07:47:21 PM
Looking at the mods parser all the edits which are there show so there is no reason as to why the mod won't work.
Thank you. :)
Edit: The "features" image for the button on the forums is missing from the mod completely, and isn't on the GitHub either. It's trying to display a broken image as a result. Does anyone have it?
It's supposed to upload as "<SMF Forum Root>/Themes/default/images/admin/feature_posthistory.png"
Edit #2: Since the image seems to be completely non-existent, I made my own. Feel free to use it until an official one is released, (assuming one ever is).
Just place it in the directory mentioned in my first edit of this post. Feel free to edit it as you please, too.
Great MOD tested and worked in the SMF 2.0.6 :)
Regret not found this mod before. :(
Hello. I have manually installed this. What else do I need to do to get it working specifically for 2.0.7?
It states
post_history/Database.php
This file should not be able to execute standalone. You may have to run the following queries manually.
What queries?
post_history/Subs-Install.php
This file should not be able to execute standalone. You may have to run the following queries manually.
What queries?
post_history/install.php
I ran this. So I assume the install.php needs to be deleted. But is this the only file that needs to be deleted?
Not sure if I am able to install this wonderful seeming tool for now. How ever, first of all a little thanks:
I have add a German-Language file and the new info package-info.xml which (i guess) will execute the installation. So the language file (if I understand the way right) should be add in the zip file and the package-info.xml should be replaced, if german language is wished.
Please wait for an approve of it if you are not much into this stuff, I am not 100% sure if I did it right.
<modification format="xml" type="file">language/german-utf8.xml</modification>
Thanks for the mode anyway!
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsangham.net%2FSmileys%2Fsangham%2Fsadhu_sangham_sw.gif&hash=b261c8603b49f7ea207bf56802f991ddddbfb23e)
Johann
Ok, besides removing all the codes manually and deleting the posthistory directory, what else do i need to manually do in mysql to remove all traces of this mod?
Installed and seems to work smooth. Thanks a lot!
I have attached an "NONOFFICIAL " "German uft-8 included Pack" in the case you like to risk it. But better wait on the mod-master or a Professional.
_()_
Johann
("incl German-beta of PostHistory-1.0.3.zip" not-blue part of the file name needs to be removed)
Quote from: DEEPSNUYB on March 15, 2014, 04:52:59 AM
Hello. I have manually installed this. What else do I need to do to get it working specifically for 2.0.7?
It states
post_history/Database.php
This file should not be able to execute standalone. You may have to run the following queries manually.
What queries?
post_history/Subs-Install.php
This file should not be able to execute standalone. You may have to run the following queries manually.
What queries?
post_history/install.php
I ran this. So I assume the install.php needs to be deleted. But is this the only file that needs to be deleted?
Nobody answered you probably because it's really easy to install..
Install it from the package manager and it will work immediately as soon as you set proper permissions. It will automatically add them to the permissions list.
And thanks to the author for this awesome mod. Thanks to margarett as well for linking me here because i was unable to find it (was looking for something like "undo admin edit" and those things)
Is there any way to remove all the previous edits from the database in order to preserve space on old posts ?
No. I use a cron job to delete old entries.
Can you post the logic of your cron job here, please.
Here you go.
<?php
// Connection details
$db['host'] = 'localhost';
$db['user'] = 'xxx';
$db['pass'] = 'xxx';
$db['db'] = 'xxx';
$lastYear = time() - (365 * 24 * 60 * 60);
// MySQL we need ya..
$link = mysqli_connect($db['host'], $db['user'], $db['pass']);
if (!$link) die('Could not connect: ' . mysqli_error($link));
//Select database
mysqli_select_db($link, $db['db']);
//Delete Message History older than a year
$query = "DELETE FROM smf_messages_history WHERE modified_time < ".$lastYear;
mysqli_query($link, $query);
// Close database connection
mysqli_close($link);
?>
I call this PHP file once a month via cron job. I wouldn't do it too often because performance.
You may have a different database prefix, but most likely it's the same standard "smf_" as above.
Fantastic. I will give it a go when I'm scheduling the next round of changes.
Thank you so much.
BTW, Koyla, how did you get those nice colors into your php statments ?
Use: [code]YOUR PHP CODE[/code]
thanks. Now i just have to figure out why my nano editor doesn't support colors (i tried the .nanorc in my $home dir but to no avail).
fixed ! the colors are nice, thanks.
I guess this mod is out of development? Does anyone know of any alternatives?
it may be so but it's been rock solid for me.
many mods are ok to install as long as you have a comfortable uninstall methodology.
some mods don't need to be developed further because they just work.
That is true, the mod still works as it did.
Apart from that it has and always had some problems with sorting the previous entries and comparing them.
Well it does work, but it always throws errors in my log due -I suppose- to deprecated statements...
what's a few errors between old mods ?
i gave up stressing about errors as long as everything seems to work and i get no complaints.
i often check them, of course.
Oh, I'm not stressing, it's just that the logs are getting messy :D
What kind of errors?
Undefined index: view_post_history at Display.template.php. The offending line:
<a href="', $scripturl, '?action=posthistory;topic=', $context['current_topic'], '.0;msg=', $message['id'], '" onclick="return reqWin(this.href + \';popup\');">« <em>', $txt['view_post_history'], '</em> »</a>';
never seen that one but i only stopped by to say that if you choose to use this great mod, see the pruning posts a page or two back.
it is a batch process so if you or your host runs cron (sorry, Windows only for clients here) then i highly recommend scheduling the pruning task monthly.
what appeals so much to me about this mod is that i can audit any "suspect" posting activity.
if i am not wrong, the edit list is hidden from members and they should be unaware of the versions saved.
Correct, the edits list is only visible to mods/admins, and that's a good thing indeed.
For everyone else, this is the post aegersz is referring to: https://www.simplemachines.org/community/index.php?topic=312474.msg3887573#msg3887573
Quote from: Gryzor on January 25, 2018, 04:15:12 AM
Undefined index: view_post_history at Display.template.php.
The simple fix would be to go into that file and just replace
', $txt['view_post_history'], '
with
View Edits of Post
A better fix would be to open Themes/default/languages/Modifications.english.php (or whatever language you use) and add this line somewhere:
$txt['view_post_history'] = 'View Edits of Post';
For reference here are the complete language strings this mod adds. If you use a different language than English you might want to translate all of these and add them to Modifications.yourlanguage.php
// Post History Start
$txt['core_settings_item_posthistory'] = 'Post History';
$txt['core_settings_item_posthistory_desc'] = 'Store history of edits of message content into database.';
$txt['view_post_history'] = 'View Edits of Post';
$txt['title_view_post_history'] = 'Viewing Post History for - %1$s';
$txt['ph_last_edit'] = 'Latest Edit By';
$txt['ph_last_time'] = 'Edit Time';
$txt['ph_view_edit'] = 'View Post';
$txt['ph_original_edit'] = 'original';
$txt['ph_current_edit'] = 'current';
$txt['ph_current_original_edit'] = 'current, original';
$txt['ph_no_edits'] = 'No one has edited this post yet';
$txt['compare_selected'] = 'Compare Selected';
$txt['restore'] = 'Restore';
$txt['permissionname_posthistory_view'] = 'View Edit History of Post';
$txt['permissionhelp_posthistory_view'] = 'Allows user to view past versions of post.';
$txt['permissionname_posthistory_view_own'] = 'Own post';
$txt['permissionname_posthistory_view_any'] = 'Any post';
$txt['permissionname_posthistory_restore'] = 'Restore older version';
$txt['permissionhelp_posthistory_restore'] = 'Allows user to start editing from older version of post.';
$txt['permissionname_posthistory_restore_own'] = 'Own post';
$txt['permissionname_posthistory_restore_any'] = 'Any post';
$txt['permissionname_simple_posthistory_view_own'] = 'View edit history of their own post';
$txt['permissionname_simple_posthistory_view_any'] = 'View edit history of someone else\'s post';
$txt['permissionname_simple_posthistory_restore_own'] = 'Restore older version of own post';
$txt['permissionname_simple_posthistory_restore_any'] = 'Restore older versions of someone else\'s post';
$txt['cannot_posthistory_view_any'] = 'You are not allowed to view history of this post!';
$txt['cannot_posthistory_restore_own'] = 'You are not allowed to start editing from older version of your posts!';
$txt['cannot_posthistory_restore_any'] = 'You are not allowed to start editing from older version of someone else\'s post!';
// Post History END
Quote from: Gryzor on January 25, 2018, 05:10:55 AM
Correct, the edits list is only visible to mods/admins
This mod adds a bunch of permissions in SMF. These permissions decide who can see older post versions or even restore them.
Quote from: Kolya on January 25, 2018, 09:53:03 AM
A better fix would be to open Themes/default/languages/Modifications.english.php (or whatever language you use) and add this line somewhere:
$txt['view_post_history'] = 'View Edits of Post';
Ahhh thanks so much, this seems to have hit the spot! :)
I am using this mod and I like it very much.
One question though: The messages-history file in my database gets a bit big now
Is there any option to "purge" outdated changes?
See here: https://www.simplemachines.org/community/index.php?topic=312474.msg3887573#msg3887573
This still seems to be the only solution.
If you use linux then add something like this into your crontab for weekly execution:
0 0 * * 0 UUUU Prune_Post_History
where UUUU is the designated user's name who runs the task
I run mine every 6 months now
Quote from: Kolya on February 04, 2018, 09:55:54 AM
Please post in the thread and I will explain there as good as I can.
Okay! I do!
But I did not want to disrupt this thread with my newbie-questions.
Unfortunately you have deleted/not quoted what I had asked you.
OK, I'll try to recall.
I wrote:
QuoteI am using this mod and I like it very much.
One question though: The messages-history file in my database gets a bit big now
Is there any option to "purge" outdated changes?
In the offered solution (
AVAILABLE HERE (https://www.simplemachines.org/community/index.php?msg=3887573))
you list a source code of a php file.
My questions would have been how to make use of that code
Save as what file? And where?
What adjustments are necessary to make it run on my side of the table?
And how to run it?This might sound too newbie, I really have never looked much into php, which is why I preffered to email you.
My apologies if that maybe sounds too stupid for you.
You save that code as a PHP file. Name it anything you want (eg post_history_removal.php), just make sure it has the .php extension.
Enter your database details in the code, below "//Connection details".
Then upload the file to your webspace where you keep your forum. The folder is not important, you just need to remember it for when you call this file.
Now call the file with your browser. Say if you uploaded it to the root directory of http://www.my-awesome-smf.com then you need to enter in your browser: http://www.my-awesome-smf.com/post_history_removal.php
This will delete all post history entries that are older than a year.
There will be no feedback in the browser, it will just show a white page.
For advanced usage you can let your server regularly (eg once a month) call this file automatically, by using a cron job. This is exactly what cron jobs do: It's like a scheduled task in Windows. It will regularly call a specific file.
How you set up a cron job will be specific to your hosting service. But generally (provided you have managed hosting and didn't set up the server yourself) you will have some kind of server backend, like cPanel where you can find cronjobs.
You just create a new job there, enter the URL from above (http://www.my-awesome-smf.com/post_history_removal.php) and choose how often you want to let it run.
I should add that there are better ways of getting into the database (through SMF functions) instead of writing down the connection details into a PHP file.
I didn't know this yet when I wrote the code you linked above. Maybe I'll update it sometime or maybe someone else will.
Of course the best solution would be if someone integrated it into the mod and let the removal code run as a scheduled task in SMF.
do the following
function scheduled_purge_post_history()
{
global $modSettings, $sourcedir, $mbname, $txt, $smcFunc, $scripturl;
if (!empty($modSettings['posthistory_timelimit']) && ((int) $modSettings['posthistory_timelimit']) > 0)
{
$datestamp = date('Y-m-d H:i:s', strtotime('-'.((int) $modSettings['posthistory_timelimit']).' day'));
$result = $smcFunc['db_query']('', '
DELETE FROM {db_prefix}messages_history
WHERE modified_time < {string:datestamp}',
array(
'datestamp' => $datestamp,
)
);
return true;
}
}
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
'',
$txt['posthistory_timelimit'],
array('int', 'posthistory_timelimit', 'subtext' => $txt['posthistory_timelimit_desc']),
'',
$txt['posthistory_timelimit'] = 'Maximum Age of Data (days)';
$txt['posthistory_timelimit_desc'] = 'Set the maximum time to save post history records';
$helptxt['posthistory_timelimit'] = 'This setting will run as a scheduled task and automatically purge all post history records older than the setting, in days. Set this value to 0 to retain all data, always.';
INSERT INTO `smf_scheduled_tasks` (`id_task`, `next_time`, `time_offset`, `time_regularity`, `time_unit`, `disabled`, `task`) VALUES (NULL, '0', '0', '1', 'd', '1', 'purge_post_history');
this will add a setting in admin > configuration > modification settings
this will add a scheduled task (disabled by default) that can be set to run automatically or run manually - which will delete all history older than the setting above.
That's pretty sweet. Thank you Kindred!
Many thanks for your help and efforts!
I will take a look, try it and report back in.
Again: VERY MUCH APPRECIATED!!
hey, that is cool.
it's good to see such a great feature get additional support and seamless integration.
ok, trying this out.
a question for the part with adding a task
where do I enter this:
INSERT INTO `smf_scheduled_tasks` (`id_task`, `next_time`, `time_offset`, `time_regularity`, `time_unit`, `disabled`, `task`) VALUES (NULL, '0', '0', '1', 'd', '1', 'purge_post_history');
everything else is done.
In the database... probably using phpmyadmin, if that's what your host uses.
Have you thought about creating a pull request for your changes, Kindred?
https://github.com/nikop/PostHistory
Quote from: Kindred on February 25, 2018, 06:10:16 PMIn the database... probably using phpmyadmin, if that's what your host uses.
Ah, so the following is not a command line then and I can just enter the values into the respective fields manually?
INSERT INTO `smf_scheduled_tasks` (`id_task`, `next_time`, `time_offset`, `time_regularity`, `time_unit`, `disabled`, `task`) VALUES (NULL, '0', '0', '1', 'd', '1', 'purge_post_history');
Then that is really much easier that I thought :)
I had thought that is a command line and looked where to enter that - DOH!
OUCH!
Since I did that - and I was not aware till I took at the logs just now... somehow all scheduled tasks are NOT running.
It looks as though I did something wrong here, all these tasks have not been run since two months:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fabload.de%2Fthumb%2Falloffheqlm.png&hash=be60cd88fe2283c91eeba9d6cb6678299b725b53) (http://abload.de/img/alloffheqlm.png)
What can I do to fix this?
A backup of the old file is of course there.
Any idea where to begin?
Thanks for your give to me
Fix for 2.0.14 and up so it won't spam the error log with "expected to be a reference, value given" errors anymore.
Quote from: Arnox on May 11, 2018, 08:09:45 PM
Fix for 2.0.14 and up so it won't spam the error log with "expected to be a reference, value given" errors anymore.
AAAAAH! There it is!!!! Thanks a lot, my error log got cluttered with that error already..
What line is the fix?
I have the log full with
2: mysql_num_rows() expects parameter 1 to be resource, object given
Apply Filter: Only show the errors from this file
File: ../forum/Sources/Subs-Post.php
Line: 1601
Is that the same?
Quote from: SMiFFER on May 12, 2018, 03:53:40 AM
I have the log full with
2: mysql_num_rows() expects parameter 1 to be resource, object given
Apply Filter: Only show the errors from this file
File: ../forum/Sources/Subs-Post.php
Line: 1601
Is that the same?
That is from something different.
EVERYONE DO NOT DOWNLOAD THE OLD 1.0.4 ZIP I UPLOADED EARLIER. IT STILL HAS THE OLD CODE BECAUSE I'M STUPID, AND I CAN'T MODIFY THE POST NOW. PLEASE USE THE ONE BELOW INSTEAD.
Quote from: SMiFFER on May 12, 2018, 03:47:32 AM
Quote from: Arnox on May 11, 2018, 08:09:45 PM
Fix for 2.0.14 and up so it won't spam the error log with "expected to be a reference, value given" errors anymore.
AAAAAH! There it is!!!! Thanks a lot, my error log got cluttered with that error already..
What line is the fix?
PH_actions. actionArray specifically. It should just be "$actionArray". No leading '&'.
BTW, please redownload. For some reason, I put in the old unedited PostHistory.php file into the zip. Sorry. DX
the strange thing is... I have this installed on 2.0.15 with no errors at all.
Quote from: Kindred on May 12, 2018, 04:56:51 PM
the strange thing is... I have this installed on 2.0.15 with no errors at all.
I think it only starts happening if you upgrade to 2.0.14 with it installed. And since it doesn't uninstall completely, the problem remains. Or at least that's what I think is happening.
Could you test something for me though? Just make an edit to any post and then try to view the edits. The popout seems to have the right URL but instead of showing me the edit history, it just dumps me right back to the forum main page. What's even more frustrating is that it's not printing out an error in the error log at all.
I did... I had it installed, upgraded to 2.0.14 and 2.0.15 with no issues.
And it works just as it is supposed to, as of last week, which is the last time I used the history function
Quote from: Kindred on May 12, 2018, 10:06:36 PM
I did... I had it installed, upgraded to 2.0.14 and 2.0.15 with no issues.
And it works just as it is supposed to, as of last week, which is the last time I used the history function
Hm... Do you have any idea at all why it's redirecting the popout back to the home page instead of bringing up a post's edit history?
Quote from: Kindred on May 12, 2018, 10:06:36 PM
I did... I had it installed, upgraded to 2.0.14 and 2.0.15 with no issues.
And it works just as it is supposed to, as of last week, which is the last time I used the history function
Also, are you actually running PHP 7.0 or above? Or PHP 5.6 and below?
I recall post history working beautifully when I had 5.6.
EDIT: FIXED IT. ****ING GOT 'EM.
To solve why the popout was dropping me back into the main page, I had to verse myself on how SMF very basically works internally.
So after poring over the install files and finding jack (or at least nothing that stood out to me), I decided to take a look at the main edit history URL.
"(my main forum domain)/index.php?action=posthistory;topic=5464.0;msg=69296"
I then started tracing exactly where each step was going. So as we can obviously see, it's starting out by making a usual request for the index.php of the forum. The starting point for most everything. The next part was the action it was calling. SMF has a long list of "actions" in its index.php that point to a file in the Sources directory and then a code function within that file. Usually the main starting code function.
Then I experimented and looked at what happened when I purposefully put in a bad (nonexisting) action call in the URL. So
"(my main forum domain)/index.php?action=ali;topic=5464.0;msg=69296"
The action "ali" is nonsense and doesn't exist in the index.php either. And there, I saw that it dumped me right back to the home page again. I had successfully duplicated the error. So now we know what exactly the error is.
I then took a look into my index.php and looked for a "posthistory" action. It didn't exist whatsoever. Hmmmmm... Now what's really strange is that it seemingly never HAD to exist in the index.php before for Post History to work. And I know this for an absolute fact too because all my old forum backups with Post History never had a "posthistory" action in any of their index.php's either. I looked. Nevertheless, nothing else seemed to make sense, so this simply had to be it.
I made a new action then in my index.php right beneath the 'post2' action.
'posthistory' => array('PostHistory.php', 'PostHistory'),
We're saying here that there is now indeed a posthistory action, and if it's called, bring up the main "PostHistory.php" file that is in the Sources directory and execute the "PostHistory" code function there.
After that, everything worked just fine. 1.0.5 zip below has the index.php install actions added now to avoid any future problems.
I'm running the original code by Niko. It never produced errors in the log and survived upgrading the forum just fine.
That's not too say that it didn't have problems. Comparisons of complex posts tend to fail. And the order of edits isn't chronological.
But the problems you fixed sound self produced. Glad it works for you now, but when you find that the mod should have never worked according to your logic and yet you know it did, then it's time to rethink your approach.
Quote from: Kolya on May 13, 2018, 11:55:30 AM
I'm running the original code by Niko. It never produced errors in the log and survived upgrading the forum just fine.
That's not too say that it didn't have problems. Comparisons of complex posts tend to fail. And the order of edits isn't chronological.
But the problems you fixed sound self produced. Glad it works for you now, but when you find that the mod should have never worked according to your logic and yet you know it did, then it's time to rethink your approach.
Are you running PHP 7.0 or above or are you using an earlier version?
I'm running PHP 5.5.12
Quote from: Kolya on May 13, 2018, 01:20:23 PM
I'm running PHP 5.5.12
That's why.
PHP 7.x brought a WHOLE lot of changes to how things are written. It's also a little more strict in what it accepts and what it doesn't. Things you could do that might have flown in 5.x might not work anymore in 7.0. For example, the leading '&' in actionArray and no posthistory action listed in index.php still work in 5.x but with 7.x, forget it. You need to fix it or drop the mod.
I believe that we are on 7.1, but you never know for sure, with godaddy
Quote from: Kindred on May 13, 2018, 08:28:25 PM
I believe that we are on 7.1, but you never know for sure, with godaddy
You can check your current PHP version by going here: (your domain)/index.php?action=admin;area=credits
Or at least what version your host is telling the forum it is.
lol.... yes, I know.... but with godaddy, you never know what reality is.
This is one of my all time favourite mods.
Is there any chance to update it to become compatible with SMF 2.1?
Cheers!
Mike
since 2.1 is still only in RC, many mod authors may not choose to make updates until final.
Author hasn't been here in over 3 years.
Since there is smf 2.1 now and no one has asked about this mod yet: is there any hope to get an update here? Any similar mod being developed? Anyone else interested?
Jessy
Quote from: JessyKa on July 06, 2022, 06:39:12 AMSince there is smf 2.1 now and no one has asked about this mod yet: is there any hope to get an update here? Any similar mod being developed? Anyone else interested?
Jessy
Last activity of the author is: September 08, 2015, 06:56:10 PM. They have not been logged in here for almost 7 years now. I higly doubt that there will be un update here.
You can request a new such mod at the Mod Request board though and hopefully someone will code it.
Dear developers,
Someone can adapt this mod for the current SMF v2.1 and PHP version 7.4> ?
:) :) :)
Or suggest an actual alternative?
Quote from: Eclipse16V on January 02, 2013, 08:14:29 AMQuote from: Eclipse16V on January 02, 2013, 03:45:06 AMDoesn´t work with the Broken Link List Mod.
Fatal error: Cannot redeclare loadEdit() (previously declared in /xxx/Sources/PostHistory.php:221) in /xxx/Sources/BrokenLinksList.php on line 416
:(
Can you help me?
Error fixed.
Hello, can you please let me know how you fixed this? Thank you