dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse

This website has run out of funding so feel free to contribute if you can afford it (see footer)

Author Topic: Post History  (Read 1777 times)

Online Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6502
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:05:24 AM
  • Deeply Confused Learner
  • Profession: IT Engineer
Post History
« on: August 10, 2016, 03:57:12 AM »
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 (see Moderate the Board permissions).

Features
 
. Save version of post when edited
. Compare changes between versions
. Restore old version if needed
. Uses hooks to minimize edits needed to

Only documented recently
« Last Edit: August 16, 2016, 01:05:24 PM by chipper »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Online Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6502
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:05:24 AM
  • Deeply Confused Learner
  • Profession: IT Engineer
Re: Post History
« Reply #1 on: August 16, 2016, 12:56:58 PM »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Online Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6502
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:05:24 AM
  • Deeply Confused Learner
  • Profession: IT Engineer
Re: Post History
« Reply #2 on: August 22, 2016, 11:01:49 PM »
http://www.simplemachines.org/community/index.php?topic=312474.msg3887573#msg3887573

PrunePostHistory.php

Clear Post History over a year old via a (monthly) cron job:

Code: [Select]
<?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);
?>

DO NOT RUN WITHOUT CONSULTING CHIPPER !
« Last Edit: August 22, 2016, 11:16:02 PM by smfadmin »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Online Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6502
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 06:05:24 AM
  • Deeply Confused Learner
  • Profession: IT Engineer
Re: Post History
« Reply #3 on: September 06, 2016, 08:21:42 AM »
moved to root, as it should be and added to cron to automatically run once a week prior to DB Optimization.
« Last Edit: September 06, 2016, 09:04:21 AM by chipper »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal