Advertisement:

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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,246
    • 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.1
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.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,269
  • 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,762
  • 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

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,686
  • 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,246
    • 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!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline lurkalot

  • Sr. Member
  • ****
  • Posts: 918
  • 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 »

Tinyportal.net Official Support Site For TinyPortal.
Camera Craniums Running SMF 2.0.13 / Tinyportal 1.2
Guitarist Guild Running SMF 2.0.14 / Tinyportal 1.2R Beta

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,246
    • 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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,633
  • 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
Please do not PM me for support.

Offline aegersz

  • Sr. Member
  • ****
  • Posts: 907
  • Gender: Male
    • 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 !!
"mods" junkie (SMF 2.0) with 130 on (the full List can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,246
    • 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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 3,633
  • 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?
Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,246
    • 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.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,246
    • 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.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline 4Kstore

  • SMF Hero
  • ******
  • Posts: 4,295
  • 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,246
    • XPtsp.com Community
Re: Automatic Package Version Emulation (SMF 2.0.x Only)
« Reply #15 on: Yesterday at 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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline mysimplesite

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