Advertisement:

Author Topic: Automatic Package Version Emulation (SMF 2.0.x Only)  (Read 5822 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Automatic Package Version Emulation (SMF 2.0.x Only)
« on: March 01, 2016, 06:58:02 PM »
Link to Mod


AUTOMATIC PACKAGE VERSION EMULATION v1.5
By Dougiefresh -> Link to Mod


Introduction
This mod just makes it a little easier to install mods that were written exclusively for earlier versions of SMF!!!  How?  Well, continue reading!

This mod determines what version of Simple Machines Forum software (SMF) is needed to be emulated in order to install the mod and alters the install/upgrade/uninstall link so that the necessary forum version is included automatically, making mod installation a bit easier.  It also displays what version is going to be emulated in the install/upgrade/uninstall link.

Inspiration
This feature was backported from the SMF 2.1 Beta 2 software, which has similar functionality built in.  However, no code from SMF 2.1 Beta 2 was used in the making of this mod.

Compatibility Notes
This mod was tested on SMF 2.0.11, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Furthermore, SMF 2.1 will not be supported, as it already has this functionality built in.

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

License
Quote
Copyright (c) 2016 - 2017, 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 live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,273
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #1 on: March 01, 2016, 07:01:33 PM »
This is going straight into my arsenal. 
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #2 on: March 01, 2016, 07:02:54 PM »
Ditto! :)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Colin

  • Developer
  • SMF Hero
  • *
  • Posts: 7,857
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #3 on: March 01, 2016, 07:50:53 PM »
Great mod, Dougie. Thanks for your work on this.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #4 on: March 01, 2016, 10:20:08 PM »
Thanks, guys!
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 lurkalot

  • Sophist Member
  • *****
  • Posts: 1,097
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #5 on: March 02, 2016, 03:09:10 AM »
Nice mod.  8) Haven't tried it yet, so a quick question.

Does it work in reverse, I mean when uninstalling mods will the uninstall links also show without having to set emulation manually? 

Edit: I mean mods installed prior to installing this one.
« Last Edit: March 02, 2016, 03:43:01 AM by lurkalot »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #6 on: March 02, 2016, 08:51:16 AM »
They should be able to uninstall without setting the emulation beforehand.  In my tests, I was able to do so effortlessly....  And I tested with 10 mods....
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 Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,301
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #7 on: March 02, 2016, 09:04:26 AM »
This is going straight into my arsenal. 
Ditto! :)

Make it three! Thanks for all the work you do dougie. ;D
Online Manual

Please do not PM me for support.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,354
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #8 on: July 13, 2017, 06:39:52 AM »
I love this one too ... you're one hell of a programmer !!
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #9 on: August 12, 2017, 01:28:43 PM »
UPDATE:  I've discovered an issue with this mod.  When you set a specific version to emulate, the mod completely ignores the version that was set....
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 Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,301
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #10 on: August 12, 2017, 05:40:59 PM »
Is that an FYI for us so we know you're aware of it and are working on a fix?
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #11 on: August 12, 2017, 06:09:31 PM »
Is that an FYI for us so we know you're aware of it and are working on a fix?
Yep.
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: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #12 on: August 14, 2017, 11:12:42 AM »
Uploaded v1.1 - August 14th, 2017
o Fixed issue where user-selected version emulation was ignored.
o Fixed issue where text was displayed before templates started.
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 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,312
  • Gender: Male
    • agustintari on Facebook
    • @agustintarifa on Twitter
    • SSIMPLE TEAM PAGE
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #13 on: August 14, 2017, 12:02:21 PM »
Great mod, thanks!
¡¡NEW MOD: Sparkles User Names!!!

Offline TiPsY

  • Semi-Newbie
  • *
  • Posts: 61
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #14 on: August 15, 2017, 01:15:00 PM »
I've gotten this error on the upper left side after trying to uninstall: http://i.imgur.com/ZXxo1vN.png

Now, I couldn't find the origin but I reversed that from the package backups, any info on how to install the new version without getting this for uninstalling the previous one?

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #15 on: August 16, 2017, 10:15:39 AM »
I've gotten this error on the upper left side after trying to uninstall: http://i.imgur.com/ZXxo1vN.png

Now, I couldn't find the origin but I reversed that from the package backups, any info on how to install the new version without getting this for uninstalling the previous one?
You will have to edit Themes/default/Packages.template.php and remove everything before <?php.  The new version should solve that particular issue with the Package Manager template....
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 mysimplesite

  • Semi-Newbie
  • *
  • Posts: 54
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #16 on: August 16, 2017, 11:50:06 AM »
Thanks for the great mod. Can't wait to try it out. Installed flawlessly.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,691
  • Mod King
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #17 on: August 19, 2017, 10:27:28 PM »
Uploaded v1.2 - August 19th, 2017
o Fixed undefined element error in Sources/Sub-Packages.php.
o Fixed undefined element error in Themes/default/Packages.template.php.
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: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #18 on: August 27, 2017, 01:06:11 PM »
UPDATE:  I'm aware that version 1.2 is still screwed up....  Packages that require emulation are not being caught by the mod.  I'm working on a solution....
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 efk

  • Jr. Member
  • **
  • Posts: 119
  • Gender: Male
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #19 on: August 28, 2017, 02:30:43 PM »
Expecting to try stable version. About copyrights, is this mod free for use?