Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4086)
AUTOMATIC PACKAGE VERSION EMULATION v1.6
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) -> Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=4086)
IntroductionThis 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.
InspirationThis 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 NotesThis 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.
ChangelogThe changelog can be viewed at XPtsp.com (http://www.xptsp.com/board/free-modifications/automatic-package-version-emulation/).
LicenseQuoteCopyright (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.
This is going straight into my arsenal.
Ditto! :)
Great mod, Dougie. Thanks for your work on this.
Thanks, guys!
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.
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....
Quote from: live627 on March 01, 2016, 07:01:33 PM
This is going straight into my arsenal.
Quote from: margarett on March 01, 2016, 07:02:54 PM
Ditto! :)
Make it three! Thanks for all the work you do dougie. ;D
I love this one too ... you're one hell of a programmer !!
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....
Is that an FYI for us so we know you're aware of it and are working on a fix?
Quote from: Steve 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?
Yep.
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.
Great mod, thanks!
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?
Quote from: TiPsY 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?
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....
Thanks for the great mod. Can't wait to try it out. Installed flawlessly.
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.
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....
Expecting to try stable version. About copyrights, is this mod free for use?
The licence is given in the opening post, including the copyright and rules about whether you can use it.
i went to install the new version of a few mods from dougiefresh because i love the extra functionality they offer BUT I got an error that I can see ((it's very vague message/line of code) and it looks like "uninstall emulation":
This was the error presented at the very top of the screen:
'empty($package['emulate_version']) ? $txt['uninstall_mod'] : $txt['uninstall_emulating'] . ': ' . strtoupper($package['emulate_version']), ' ]';
I think this is related to dougie's Automatic Version Emulation BUT EVEN after i uninstalled it, i still have this code fragment at the very top of my screen:
[ ', $txt['uninstall'], ' ]';
Please move this thread to the appropriate area, i'm sorry for dumping this here.
This mod has caused me some grief, even after uninstalling it.
The problem only presents in the Package Manager.
Please see https://www.simplemachines.org/community/index.php?topic=556174
Topic merged with this one, see post just before this one ~ Steve
What i would like to know (and fix) is why i am still seeing residual code (that i assume wasn't carefully undone upon uninstall (?))
I want to get my systems back to being stable. Don't get me wrong, I love your mods but they need some more love and attention as they are impacting on core SMF functions. I can only assume that you are over-delivering at a rapid rate ... but you can fix anything. Slow down brother !
dougie, i have made you an Admin again so log into my site and head for the Package Manager and look at the very top of the screen - try to mark it (it highlights) to catch the residual code fragment.
or take this link now: https://forum.drugs-and-users.org/index.php?action=admin;area=packages
Quote from: aegersz on September 13, 2017, 09:02:33 AMI can only assume that you are over-delivering at a rapid rate ... but you can fix anything. Slow down brother !
As you seem to be the only one having all these problems maybe you should consider the possibility that it's your system causing issues, not the other way around.
(I'm a fan of dougie and his mods so I'm quick to jump to his defense. :) )
Yeah, I'd generally assume that having 100+ mods is automatically part of the problem, not part of the solution.
@aegersz: I would guess you are running version 1.0 of the mod, which does have the "residual code leftover after uninstall" issue. It appears to install just fine, so I don't understand what I messed up on in version 1.0... But I fixed that with version 1.1... I'm working on a version 1.3, which solves the issues that I've seen on my test forum....
Anyways, edit Themes/default/Packages.template.php and remove everything up to <?php. That will take care of this issue.
@Steve and @Arantor: No, he has a point. I've delivered a few versions of mods with typos. I really do need to slow down and verify the code/mod works before I release it..... (Sigh)
But aegersz has been pointing out issues with my mods, and I'll happily fix whatever issues anybody finds if it is within my capability to fix them.
guys, there is no bigger fan of dougie's mods than me.
I did install and uninstall the first release so I will follow his advice.
then I will reinstall the mod. I just got a bit worried for a moment.
I always take any new mod or most existing mods and see how they coexist with others for the sake of adding functionality and helping out existing and future users of his mods - for everyone's benefit.
I only want to help him to build the best possible code so don't take me the wrong way. he takes pride in his work and always tries to add suggested functionality, if possible.
without doubt, the best overall mod contributer here (and possibly on the planet), IMO.
I am just in a good position to do so as I have so many mods (of his and others) so I might as well be useful.
he always fixes all his issues so it's a win-win situation for SMF, myself, dougie and all current/new/future users of his code.
it's the mods that make SMF the best forum software, as I see it, not to mention the fact that it's open source.
everyone involved playing their role, selflessly devoting time and energy and resources into this, does so for the pure satisfaction that it brings for themselves and others- it's a beautiful thing.
@dougie, thanks - i did it and it's all good now.
I hope you didn't take my comments the wrong way ... you're a coding machine !
BTW, i tried to register on your site but got an error so i couldn't complete the registration.
I fixed the error on my website. What do ya know, another syntax typo on the No Log Certain User Errors (http://custom.simplemachines.org/mods/index.php?mod=4041) mod.... This one about one year old....
Quote from: dougiefresh on September 15, 2017, 01:23:52 PM
I fixed the error on my website. What do ya know, another syntax typo on the No Log Certain User Errors (http://custom.simplemachines.org/mods/index.php?mod=4041) mod.... This one about one year old....
Time for a new keyboard or just typing too fast for good accuracy levels? ;D
Hell, I dunno..... I've done replaced my keyboard within the 9 months year.... Maybe a brain replacement is necessary, too...
Uploaded v1.3 - November 20th, 2017
o Fixed code so that user-selected version emulation is taken into account.
Recently I have seen this modification seems very curious, we will "break it a little" :laugh: in local to see how it goes lol. And in passing we leave the translation to Latin Spanish :), anything you tell me!
Regards!
Uploaded v1.5 - November 22th, 2017
o Added Spanish Latin translation, courtsey of Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)!
@Rock Lee: Thank you for the translation! It's been included in this version!
@Everybody: I noticed some version confusion with version 1.3, in that it will show up in Package Manager as version 1.4. I decided to put this version at version 1.5, in order to reduce confusion. I apologize for any confusion that mistake caused.....
Uploaded v1.6 - October 10th, 2018
o No functionality change.
o Updated documentation to point to new website.