Advertisement:

Author Topic: Archive Old PMs  (Read 1079 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Archive Old PMs
« on: January 08, 2018, 02:45:46 PM »
Link to Mod


ARCHIVE OLD PMS v1.2
By Dougiefresh -> Link to Mod


Introduction
This mod moves conversation PMs that are over a user-specified number of days to the bottom of the PM list.  It also attaches an "archived" image to the PM subject, making it easy to identify which PMs have been archived.

The number of days is set on a per-member basis and is initially set to 0.  Changing this value lower than it's current value does not unarchive messages already marked as archived.

Profile Settings
There is a new setting in My Messages => Preferences => Change Settings:
o Enable archiving personal messages?
o Archive personal messages older than [x] days

Compatibility Notes
This mod was tested on SMF 2.0.15 and SMF 2.1 Beta 3 using a MySQL database, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported.  Postgres databases have not been tested.

Related Discussion
o PM Archiving?

Translators
o Spanish Latin translation: Rock Lee.

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Quote
Copyright (c) 2017 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. 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.

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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Archive Old PMs
« Reply #1 on: January 09, 2018, 11:21:50 AM »
Uploaded v1.1 - January 9th, 2018
o Added support for 2.1 Beta 3.
o Fixed name of mod in readme.txt documentation file.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline landyvlad

  • Full Member
  • ***
  • Posts: 558
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Archive Old PMs
« Reply #2 on: January 22, 2018, 10:17:01 PM »
I'm sure this is a stupid question, but - if PMs are sorted 'newest first' - wouldn't that make the oldest ones at the bottom anyway ?

From my reading of this it doesn't actually archive PM's, it just marks then as such...?


Perhaps an improvement / suggestion might be to have an option where all PMs older than (x days) are automatically archived into a .zip format and which can then be downloaded easily by the user. ?
[The pm's thus archived would now exist only within that archive]

Just spitballing...
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Archive Old PMs
« Reply #3 on: January 25, 2018, 10:53:59 AM »
Naturally, in "One at a time" or "All at once" mode, it is fairly useless, as you pointed out.  However, in conversation mode, the PMs are grouped by which PM is started first (I believe).  So forcing those PMs to the back of the list is the objective....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline landyvlad

  • Full Member
  • ***
  • Posts: 558
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Archive Old PMs
« Reply #4 on: January 28, 2018, 09:17:41 PM »
Ah gotcha. :)
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Online Rock Lee

  • SMF Hero
  • ******
  • Posts: 1,632
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Archive Old PMs
« Reply #5 on: February 14, 2018, 09:17:40 AM »
Here I leave the Spanish Latin translation anything you tell me!


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Archive Old PMs
« Reply #6 on: February 14, 2018, 11:10:20 AM »
Uploaded v1.2 - February 14th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee.
o Added LICENSE.txt to satisfy licensing concerns.
o Moved code that marks PMs as archived so I can use display mode context variable.



@Rock Lee:  Thank you for the translation!  It's been included in this version!

@landyvlad:  I've made a change to the mod so that it only works with the forum set to conversation mode, since it really doesn't make sense to use it in any other PM mode....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!