Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Hj Ahmad Rasyid Hj Ismail on August 08, 2010, 08:19:58 PM

Title: IUMQ - Install & Uninstall Mods Quickly (Fully Hook!)
Post by: Hj Ahmad Rasyid Hj Ismail on August 08, 2010, 08:19:58 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2670)

IUMQ - Install & Uninstall Mods Quickly

- For SMF 2.0.x
- Fully hook, no file modification.

1. Please do your own backup though every installation is backed up automatically.
2. This mod will add a Reinstall and Delete link to the page that appears after the mod is uninstalled.
3. Similarly a Uninstall link is added to page which appears after mod is installed.
4. This enables you to remove and re-install mods quickly.
5. Upon successful installation, you will be directed to Mod Settings page where you can turn this mod on/off.
6. You can test it in lower SMF 2.0.x version too as IMO it should work just fine. ;)


Thank you for using/testing it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep original and current authors' link(s) if it is in there somewhere. ;)

Original Author: Joker™ (http://www.simplemachines.org/community/index.php?action=profile;u=226111)
Alternative Support Site: BurkeKnight Enterprises (http://www.burkeknight.com/)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fvalidator.w3.org%2Fimages%2Fvalid_icons%2Fvalid-xhtml10&hash=f3694497572838dc55641db875ff57107ebabaed)  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fjigsaw.w3.org%2Fcss-validator%2Fimages%2Fvcss&hash=710d7530f8727db53c62cb8f44abbef39967e693)


#Changes Log

@Version 1.5.1
- Re-upgraded to be a fully hook mod with no file modification for SMF 2.0.x.

@Version 1.5.0m
- Downgraded to a partly hook mod due to undefined errors.

@Version 1.5.0
- The mod is now maintained by ahrasis.
- Upgraded to a fully hook mod.

@Version 1.4.0
- Compatible with SMF 2.0 final
- License added to the mod

@Version 1.3.0
- Language files sorted out.
- Added support for Turkish language
- Compatible with RC4

@Version 1.2.0
- Added support for portuguese language.
- Added " Delete Button " on page that appears after uninstalling the mod . Now you can delete the mod directly after uninstalling the mod without going to mod list page.

@Version 1.1.0
- Added support for Russian language

@Version 1.0.0
- Initial release.


#Important Notes For Translators
- Language can simply be created and added on your own.
- Simply copy, translate and save current english language file to IUMQ.yourforumlanguage.php.
- Upload it to this mod support page if you want it to be attached together with the main file.
- There are cahnges in text strings, that is why the current translation is not re-added.
Title: Re: Install & Uninstall Mods Quickly
Post by: Afro on August 09, 2010, 06:36:52 AM
Ok. So the purpose of this is to re-install mods quickly after uninstall and to uninstall quickly after install
So that the codes wont have time to destroy something inside the files.

Great!!
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on August 09, 2010, 08:08:38 AM
Good work Joker. A very helpful mod indeed.
Title: Re: Install & Uninstall Mods Quickly
Post by: Masterd on August 09, 2010, 08:45:27 AM
Nice mod.
Title: Re: Install & Uninstall Mods Quickly
Post by: Sabre™ on August 09, 2010, 10:13:55 AM
Another one ported to smf2.
Good job :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 09, 2010, 10:25:24 AM
Thanks everyone for nice comments :).


Ported means ? as i wrote it on mod site also

Quote(Made it specifically for my mods testing)
Title: Re: Install & Uninstall Mods Quickly
Post by: DoctorMalboro on August 09, 2010, 10:32:51 AM
Cool mod, actually... very useful and it can be a very nice feature (the re-install of mods)
Title: Re: Install & Uninstall Mods Quickly
Post by: Sabre™ on August 09, 2010, 10:54:08 AM
Quote from: Joker™ on August 09, 2010, 10:25:24 AM
Ported means ? as i wrote it on mod site also

There had been an smf1 version for years. It might be in archives now.
Ported = made compatible(in a rough sense) 
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 09, 2010, 11:02:48 AM
Quote from: Sabre™ on August 09, 2010, 10:54:08 AM
There had been an smf1 version for years. It might be in archives now.
ohh , never knew it
Title: Re: Install & Uninstall Mods Quickly
Post by: ɔɔɔɔɔɔuɥoɾ on August 09, 2010, 11:11:05 AM
Good work, this will be good on a testing forum :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Bugo on August 12, 2010, 07:03:17 AM
Russian translation
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 12, 2010, 07:15:58 AM
Quote from: Bugo on August 12, 2010, 07:03:17 AM
Russian translation
Thanks a lot bro , will add this in next update :).
Title: Re: Install & Uninstall Mods Quickly
Post by: sAce on August 12, 2010, 02:44:24 PM
Nice tools for mod developers , good job buddy
Title: Re: Install & Uninstall Mods Quickly
Post by: ɔɔɔɔɔɔuɥoɾ on August 12, 2010, 02:46:28 PM
Quote from: S-Ace on August 12, 2010, 02:44:24 PM
Nice tools for mod developers , good job buddy

We should make this a core feature, not for the public, but for a homebrew version of smf lol
Title: Re: Install & Uninstall Mods Quickly
Post by: sAce on August 12, 2010, 02:53:01 PM
I dont think this will be very useful for General Admins , i mean why the hell would you install then uninstall and then again re install ( unless broken )
Title: Re: Install & Uninstall Mods Quickly
Post by: ɔɔɔɔɔɔuɥoɾ on August 12, 2010, 03:16:48 PM
Quote from: S-Ace on August 12, 2010, 02:53:01 PM
I dont think this will be very useful for General Admins , i mean why the hell would you install then uninstall and then again re install ( unless broken )

Actually come to think of if, its not that useful for testing, I mean for what it says its for and it does well..

For testing, you install check for errors then uninstall, remove and then upload and install your changed package...
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 12, 2010, 03:32:07 PM
Quote from: JohnCcCcCc on August 12, 2010, 03:16:48 PM
Quote from: S-Ace on August 12, 2010, 02:53:01 PM
I dont think this will be very useful for General Admins , i mean why the hell would you install then uninstall and then again re install ( unless broken )

Actually come to think of if, its not that useful for testing, I mean for what it says its for and it does well..

For testing, you install check for errors then uninstall, remove and then upload and install your changed package...
I rarely re-install my test site. Most of my mods are still installed on it.Many time there is file clashes between 2 mods , so at that time i felt need for this mod , that's why i wrote this
QuoteMade it specifically for my mods testing
Title: Re: Install & Uninstall Mods Quickly
Post by: ɔɔɔɔɔɔuɥoɾ on August 12, 2010, 03:34:51 PM
Quote from: Joker™ on August 12, 2010, 03:32:07 PM
Quote from: JohnCcCcCc on August 12, 2010, 03:16:48 PM
Quote from: S-Ace on August 12, 2010, 02:53:01 PM
I dont think this will be very useful for General Admins , i mean why the hell would you install then uninstall and then again re install ( unless broken )

Actually come to think of if, its not that useful for testing, I mean for what it says its for and it does well..

For testing, you install check for errors then uninstall, remove and then upload and install your changed package...
I rarely re-install my test site. Most of my mods are still installed on it.Many time there is file clashes between 2 mods , so at that time i felt need for this mod , that's why i wrote this
QuoteMade it specifically for my mods testing

And it does its job well :)
Title: Re: Install & Uninstall Mods Quickly
Post by: blow on August 16, 2010, 04:24:35 PM
It's a very helpful mod, thank you.

Here are the words for: portuguese_br, portuguese_br-utf8, portuguese_pt and portuguese_pt-utf8:

$txt['click'] = 'Clique aqui para ';
$txt['reinstall'] = 'Reinstalar';
$txt['mod'] =' o Pacote';


;)
Title: Re: Install & Uninstall Mods Quickly
Post by: live627 on August 16, 2010, 06:50:44 PM
Someone beat me to making this. Shh, quiet.
Title: Re: Install & Uninstall Mods Quickly
Post by: KensonPlays on August 16, 2010, 06:57:37 PM
Quote from: JohnCcCcCc on August 12, 2010, 02:46:28 PM
Quote from: S-Ace on August 12, 2010, 02:44:24 PM
Nice tools for mod developers , good job buddy

We should make this a core feature, not for the public, but for a homebrew version of smf lol
Yes, for my localhost install this would be nice!
Title: Re: Install & Uninstall Mods Quickly
Post by: Sabre™ on August 16, 2010, 06:59:19 PM
lol guys, I was waiting for these replies, as I found the same when I used to use the old version for smf1.
One mod idea I found useful which I had integrated into this(old version), was after the package is installed, it auto redirects to the packages area without you having to click anything.
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 16, 2010, 09:20:06 PM
Quote from: Sabre™ on August 16, 2010, 06:59:19 PM
One mod idea I found useful which I had integrated into this(old version), was after the package is installed, it auto redirects to the packages area without you having to click anything.
You mean to the list area where all packages are shown ?
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 16, 2010, 09:21:39 PM
Quote from: blow on August 16, 2010, 04:24:35 PM
It's a very helpful mod, thank you.

Here are the words for: portuguese_br, portuguese_br-utf8, portuguese_pt and portuguese_pt-utf8:

$txt['click'] = 'Clique aqui para ';
$txt['reinstall'] = 'Reinstalar';
$txt['mod'] =' o Pacote';


;)
thanks , will add this in next update.

Thanks to all of you for great comments :).
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 27, 2010, 06:31:59 AM
Mod Updated - Version 1.2 - Change Log*

Added support for portuguese language. (Thanks to blow for providing the translation) .

Also added " Delete Button " on page that appears after uninstalling the mod . Now you can delete the mod directly after deleting the mod without going to mod list page .
Title: Re: Install & Uninstall Mods Quickly
Post by: Bugo on August 28, 2010, 02:19:17 AM
Joker, please don't past differently encoded text in the same file. For russian language we may recommend you to use two files.

In the first file, for example russian.xml, past your code:

    <file name="$languagedir/Modifications.russian.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// Install & Uninstall Mods Quickly
$txt['click'] = '';
$txt['reinstall'] = 'Переустановить';
$txt['mod'] =' мод';
]]></add>
        </operation>
    </file>

You have to save this file in ANSI coding and then you have to create second file which we call russian-utf8.xml and past code in there:

    <file name="$languagedir/Modifications.russian-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
// Install & Uninstall Mods Quickly
$txt['click'] = '';
$txt['reinstall'] = 'Переустановить';
$txt['mod'] =' мод';
]]></add>
        </operation>
    </file>

... save second file in the UTF8 coding without BOM.
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 28, 2010, 05:24:02 AM
Bugo do i have to do the same thing for Portuguese language also ? , i've updated the package , please give a feedback if i made a mistake . (I've never used language files :P )
Title: Re: Install & Uninstall Mods Quickly
Post by: Bugo on August 28, 2010, 08:03:02 AM
Simply try to save utf and non-utf translations in languages-utf8.xml and languages.xml files.
Of course use a good program for saving files (i.e. Notepad++ (http://notepad-plus-plus.org/)).
You can't learn without damaging, as you can't learn how to walk without falling :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 28, 2010, 10:16:17 AM
Quote from: Bugo on August 28, 2010, 08:03:02 AM
Simply try to save utf and non-utf translations in languages-utf8.xml and languages.xml files.
Of course use a good program for saving files (i.e. Notepad++ (http://notepad-plus-plus.org/)).
You can't learn without damaging, as you can't learn how to walk without falling :)
I've upgraded the mod again , please have a look . Notepad ++ is quite a nice tool for programming .
Title: Re: Install & Uninstall Mods Quickly
Post by: Bugo on August 28, 2010, 10:57:10 AM
Quote from: Joker™ on August 28, 2010, 10:16:17 AM
I've upgraded the mod again , please have a look
Fine. I make two files for all languages usually: languages.xml and languages-utf8.xml :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on August 29, 2010, 12:40:43 AM
Quote from: Bugo on August 28, 2010, 10:57:10 AM
Fine. I make two files for all languages usually: languages.xml and languages-utf8.xml :)
kk, will separate language files in next upgrade in the manner you have shown ;) . Thanks for the tip.
Title: Re: Install & Uninstall Mods Quickly
Post by: iPhoneDestek on September 14, 2010, 07:15:10 AM
translatıon ın turkısh



<file name="$languagedir/Modifications.turkish.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Buraya tıklayın ';
    $txt['reinstall'] = 'Yeniden Kurmak';
    $txt['mod'] =' Modifikasyon';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.turkish-utf8.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Buraya tıklayın ';
    $txt['reinstall'] = 'Yeniden Kurmak';
    $txt['mod'] =' Modifikasyon';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>

Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on September 14, 2010, 10:17:22 AM
Quote from: ®SirtLan on September 14, 2010, 07:15:10 AM
translatıon ın turkısh



<file name="$languagedir/Modifications.turkish.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Buraya tıklayın ';
    $txt['reinstall'] = 'Yeniden Kurmak';
    $txt['mod'] =' Modifikasyon';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.turkish-utf8.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Buraya tıklayın ';
    $txt['reinstall'] = 'Yeniden Kurmak';
    $txt['mod'] =' Modifikasyon';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>


Mod updated , thanks for translation :).
Title: Re: Install & Uninstall Mods Quickly
Post by: iPhoneDestek on September 14, 2010, 07:34:03 PM
where do I go to uninstall or reinstall modification. I find nothing in the admin panel ??????
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on September 14, 2010, 10:32:24 PM
Quote from: ®SirtLan on September 14, 2010, 07:34:03 PM
where do I go to uninstall or reinstall modification. I find nothing in the admin panel ??????
????? , see the pics on mod page , you don't have to go anywhere , the options appears automatically after you install or uninstall a mod.
Title: Re: Install & Uninstall Mods Quickly
Post by: iPhoneDestek on September 15, 2010, 07:06:56 AM
translation in german





<file name="$languagedir/Modifications.german.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Bitte hier Klicken ';
    $txt['reinstall'] = 'Neuinstallation';
    $txt['mod'] =' Modifikation';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.german-utf8.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Insatll Uninstall Mod translation by SirtLanVadisi.net
    $txt['click'] = 'Bitte hier Klicken ';
    $txt['reinstall'] = 'Neuinstallation';
    $txt['mod'] =' Modifikation';
// End Insatll Uninstall Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>





Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on November 14, 2010, 04:16:03 AM
- Update - Compatible with RC4
Title: Re: Install & Uninstall Mods Quickly
Post by: dougiefresh on April 07, 2011, 08:18:57 PM
Since installing this mod, I have been getting a lot of errors in the admin log during mod uninstalls on my forum.  I uninstalled this mod and the errors stopped.  Reinstall and the errors come back again during uninstalls.  So I modded the modification.xml file with this bit of text:
<file name="$themedir/Packages.template.php">
<operation>
<search position="replace"><![CDATA[ echo '
', $txt['package_uninstall_done'];
]]></search>
<add><![CDATA[ {
echo '
', $txt['package_uninstall_done']
, ' <br /><br /><a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $_REQUEST['package'], '"><strong>',$txt['click'], $txt['reinstall'], $txt['mod'],'</strong></a>
<br /><a href="', $scripturl, '?action=admin;area=packages;sa=remove;package=', $_REQUEST['package'], ';', $context['session_var'], '=', $context['session_id'], '"';
if (isset($package)) { echo $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : ''; }
echo '><strong>[ ', $txt['click'], $txt['package_delete'], $txt['mod'], ' ]</strong></a>';
}
]]></add>
</operation>
<operation>
This code checks to see if the $package variable exists.  If it does, then it processes the conditional with the $package array.  It solves my particular problem with this mod and I thought I'd share my solution.
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on April 07, 2011, 09:51:05 PM
What were the errors in your error log, as I'm unable to replicate the issue on my test forum?
Title: Re: Install & Uninstall Mods Quickly
Post by: dougiefresh on April 09, 2011, 08:52:59 AM
QuoteApply Filter: Only show the error messages of this URL
http://*****.net/board/index.php?action=admin;area=packages;sa=uninstall2;package=RC4_Theme_Fix.zip;pid=3
Apply Filter: Only show the errors with the same message
8: Undefined variable: package
Apply Filter: Only show the errors from this file
File: /****/******/public_html/xptsp.net/board/Themes/default/Packages.template.php
Line: 420
I'm attaching my Packages.template.php file.  It's a 2.0 RC3 file running on a RC5 forum, because I wanted the Sortable Packages (and Installed Time) (http://www.simplemachines.org/community/index.php?topic=355665.0) mod working on my forum and it seemed like the easiest solution.  However, I haven't had any issues with doing so until I installed this mod......
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on April 09, 2011, 10:26:45 AM
And may I know who advised you to use a RC3 file on RC5? There must be a lot of changes in the files and you should avoid replacing files from older versions to new versions. Also if you had difficulty instaling a mod you must see the mod code, try to understand it and then implement it into your file, rather than replacing the whole file.

I would advise you that don't replace files as such, instead of it ask mod author to help in installing the mod in new versions.

As you are using a different version file on your file, that might be creating problems for you, as for me the mod is working quite fine on my own forum running with RC4 security patch.
Title: Re: Install & Uninstall Mods Quickly
Post by: live627 on April 10, 2011, 12:24:20 AM
In addition, the RC3 Packages template contains a bug
Title: Re: Install & Uninstall Mods Quickly
Post by: Arantor on April 10, 2011, 06:20:38 AM
In addition, the RC5 Packages template fixed one bug and left one in.
Title: Re: Install & Uninstall Mods Quickly
Post by: dougiefresh on April 10, 2011, 03:24:07 PM
Joker: I wanted the Sorted Packages mod installed, but that mod was a pay-for mod and I decided to be cheap until I could get the money to pay for the thing....  No one "advised" me to replace the file, but it works for my purposes at the moment.  Sorry if I stepped on any toes  :-[ 

I just thought I'd mention the problem and show the solution that I figured out....  I thought it funny that the package installer worked fine, but produced errors with this mod installed....
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on April 11, 2011, 08:50:42 AM
I would advise you to place the original RC5 file in your forum instead of RC3 file.
Title: Re: Install & Uninstall Mods Quickly
Post by: dougiefresh on April 21, 2011, 05:30:34 PM
Sorry about the late reply..... I restored the RC5 file and gave up on the sorted packages mod.  Everything seems to work without issue using the RC5 mod.... Thanks for your assistance!
Title: Re: Install & Uninstall Mods Quickly
Post by: T3CHN0 on October 11, 2011, 10:14:11 AM
Nice mod, will come in very handy
Title: Re: Install & Uninstall Mods Quickly
Post by: Hackathon on October 11, 2011, 10:43:53 AM
Well done.. :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Tibbetts on October 18, 2011, 12:42:55 PM
When I try to download this, there is no .zip file to unzip.  It just downloads a file that says install.


-Tibbetts
Title: Re: Install & Uninstall Mods Quickly
Post by: Hackathon on October 18, 2011, 01:28:21 PM
Quote from: Tibbetts on October 18, 2011, 12:42:55 PM
When I try to download this, there is no .zip file to unzip.  It just downloads a file that says install.


-Tibbetts

just rename and add .zip at the end

I've no idea why this happens..
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on October 18, 2011, 01:51:15 PM
Quote from: Tibbetts on October 18, 2011, 12:42:55 PM
When I try to download this, there is no .zip file to unzip.  It just downloads a file that says install.


-Tibbetts
Try downloading the mod now. Do post your feedback :).
Title: Re: Install & Uninstall Mods Quickly
Post by: Tibbetts on October 18, 2011, 02:12:38 PM
It downloads as a .zip now.  Thanks! :D


-Tibbetts
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on October 18, 2011, 02:39:24 PM
Quote from: Tibbetts on October 18, 2011, 02:12:38 PM
It downloads as a .zip now.  Thanks! :D


-Tibbetts
Are you using FF7? That browser version is playing a bit naughty with headers :P.
Title: Re: Install & Uninstall Mods Quickly
Post by: Tibbetts on October 18, 2011, 02:42:23 PM
Yeah, I'm using FF 7.0.1.  lol...


-Tibbetts
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on October 18, 2011, 03:21:47 PM
Quote from: Tibbetts on October 18, 2011, 02:42:23 PM
Yeah, I'm using FF 7.0.1.  lol...
Thanks for the info ;).

By chance is was reading header of ff only and saw unusual behavior while content disposition. Will try to see more in it.
Title: Re: Install & Uninstall Mods Quickly
Post by: T3CHN0 on October 18, 2011, 08:21:57 PM
this happens because the one who uploads a file with a space on SMF gets the first part of the file name
such as new install.zip will rename it self to new and no extension but you the file was uploaded
such as new_install.zip then the file would download with its full name and extension.
Title: Re: Install & Uninstall Mods Quickly
Post by: Tibbetts on October 18, 2011, 08:28:43 PM
Weird how that does that.  Good thing to know for the future.


-Tibbetts
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on October 19, 2011, 05:37:43 AM
Quote from: T3CHN0 on October 18, 2011, 08:21:57 PM
this happens because the one who uploads a file with a space on SMF gets the first part of the file name
such as new install.zip will rename it self to new and no extension but you the file was uploaded
such as new_install.zip then the file would download with its full name and extension.
Are you sure about that? As all other browsers are able to download the same package with no issues at all. Most probably there are some changes in ff7 which might be causing the issue.
Title: Re: Install & Uninstall Mods Quickly
Post by: T3CHN0 on October 19, 2011, 07:03:06 AM
Quote from: Joker™ on October 19, 2011, 05:37:43 AM
Quote from: T3CHN0 on October 18, 2011, 08:21:57 PM
this happens because the one who uploads a file with a space on SMF gets the first part of the file name
such as new install.zip will rename it self to new and no extension but you the file was uploaded
such as new_install.zip then the file would download with its full name and extension.
Are you sure about that? As all other browsers are able to download the same package with no issues at all. Most probably there are some changes in ff7 which might be causing the issue.
Yes you are right, my mistake... FF7 is the problem. I just tested downloading with IE9 and Google Chrome and the broken naming downloads fine.
I use FF 90% of the time and other browsers for testing my site to see how it looks with other browsers... so an over look on by behalf.
but just to be on the safe side within SMF if offering downloads just give the download a full unbroken name and that will stop others asking why there
download has no ".extension
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on April 29, 2014, 11:07:59 PM
I perfectly know that this topic hasn0t had replies for more than 2 years but i got an error from this everytime i try to uninstall ANY other mod it gives me this thing:

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=521464.0;attach=230889;image)

And the lines compared to the original "Packages.Template.php" are these ones:

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=521884.0;attach=230910)

Please help me, as this topic has been very inactive i will pm you as well so you can see it...
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on May 31, 2014, 02:59:49 PM
Quote from: Flavio93Zena on April 29, 2014, 11:07:59 PM
I perfectly know that this topic hasn0t had replies for more than 2 years but i got an error from this everytime i try to uninstall ANY other mod it gives me this thing:
Nice catch, I've updated the mod, please try the new version.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on May 31, 2014, 03:53:23 PM
Awesome dude, already tried and works perfectly! It was my only error in my error log now it's empty and works :D congratulations and thanks for the mod, everything should be fine :D good job!

Also thanks for your reply, a lot of people after 2 years would have ignored it but you didn't, I really appreciate that.
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on June 01, 2014, 10:05:25 AM
Quote from: Flavio93Zena on May 31, 2014, 03:53:23 PM
Awesome dude, already tried and works perfectly! It was my only error in my error log now it's empty and works :D congratulations and thanks for the mod, everything should be fine :D good job!

Also thanks for your reply, a lot of people after 2 years would have ignored it but you didn't, I really appreciate that.
No issues, even I nearly took a month to reply :P.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on June 01, 2014, 10:33:38 AM
Lol but you did that's the most important part XD
Title: Re: Install & Uninstall Mods Quickly
Post by: Joker™ on June 01, 2014, 10:51:25 AM
Quote from: Flavio93Zena on June 01, 2014, 10:33:38 AM
Lol but you did that's the most important part XD
Thanks for nice words and appreciation :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 08, 2014, 05:46:33 AM
Hiya all.

I am entrusted with this mod now but I haven't have time to look into it deeply yet. I also believe that my brother Joker is a better coder than I am. I will try to do my best in handling this mod.

Another mod I am having similar to this is (Un)Install Auto Redirect (http://custom.simplemachines.org/mods/index.php?mod=3159). By default it will simply inform user that the mod has been installed without doing anything since most do not redirect. This automatically and immediately redirects user to Package Manager (browsing) page.

That's why these two mods have their similarities though not actually the same.

Thank you for supporting this mod and do feel free to ask for support.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 10, 2014, 02:49:18 AM
I'm a little confused... You took the mod over and that's ok but... How could BurkeKnight edit the first post? O.o Anyway it will be an easy task my friend, I think I had spotted the last bug of this mod a while ago and Joker already fixed it. It doesn't have problems with themes so it should be all fine, don't worry too much ;)
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 10, 2014, 02:56:53 AM
It was passed over to Burke before it was passed over to me. :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 10, 2014, 11:03:36 AM
Then BK left SMF (as well as me except a few topics) and then it was taken over by you, roger, thanks :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 11, 2014, 02:20:50 PM
I will try to help whenever possible. And yes, you are right. Most of Joker's mods do not need any fix. May be an upgrade to hook and that will be all.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 11, 2014, 04:32:46 PM
Yeah maybe, if you can due it, with due time :) anyway rest assured that it works perfectly and I can definitely say it after installing 110+ mods :P
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 12, 2014, 12:44:11 AM
This mod is updated to fully using hook and no file modification. Do give your feedback.

#Important Notes For Translators
- Language can simply be created and added on your own.
- Simply copy, translate and save current english language file to IUMQ.yourforumlanguage.php.
- Upload it to this mod support page if you want ti to be attached together with the main file.
- There is extra text string, that is why the current translation want won't be simply added.


#Changes Log
@Version 1.5.0
- The mod is now maintained by ahrasis.
- Upgraded to a fully hook mod.
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 12, 2014, 01:25:18 AM
Tutorial - How this basic hook mod is written?

As I already started tutorial on hook for one of my mods, I will also write for this one. Based on what is written by my brother Joker™, which you can see when you parse the older mod or open its modification file, you will find that it added code to two places in Packages.template.php i.e.

$txt['package_uninstall_done']
and
$txt['package_installed_done']

I then prepare to convert the mode to hook as suggested earlier here: http://www.simplemachines.org/community/index.php?topic=527314.msg3752859#msg3752859

In the created source file (please download it to see all of its content), I inserted code using &buffer to replace the above said texts. Here is the code in particular:

$iumq = array();

// Define the old and the new code
$old_code = $txt['package_uninstall_done'];
$new_code = $txt['package_uninstall_done'] . '
<br /><br /><a href="' . $scripturl . '?action=admin;area=packages;sa=install;package=' . $_REQUEST['package'] . '"><strong>' .
$txt['iumq_click'] . $txt['iumq_reinstall'] . $txt['iumq_mod'] . '
</strong></a>
<br /><a href="' . $scripturl . '?action=admin;area=packages;sa=remove;package=' . $_REQUEST['package'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '"' . '><strong>
[ ' . $txt['iumq_click'] . $txt['package_delete'] . $txt['iumq_mod'] . ' ]
</strong></a>';
$iumq[$old_code] = $new_code;

// Define the old and the new code #2
$old_code2 = $txt['package_installed_done'];
$new_code2 = $txt['package_installed_done'] . '
<br /><a href="' . $scripturl . '?action=admin;area=packages;sa=uninstall;package=' . $_REQUEST['package'] . '"><strong>' .
$txt['iumq_click'] . $txt['iumq_uninstall'] . $txt['iumq_mod'] . '
</strong></a>';
$iumq[$old_code2] = $new_code2;

// Now let's change the title, if we're allowed to
return str_replace(array_keys($iumq), array_values($iumq), $buffer);


As you can see, there are two code that need to be inserted and is done by replacing them with longer code.

I then make sure that the mod can be enable or disable by covering the above code with normal $modSettings condition:
if (!empty($modSettings['iumq_enable'])) {
}


Don't forget to globalize and load your mod language. It is important or it either won't work or cause error(s).

Then add the said $modSettings in the Mod Settings page as already described in here: http://www.simplemachines.org/community/index.php?topic=527314.msg3752859#msg3752859

Do note $modSettings also need to be defined in language file where necessary.

Good luck.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 12, 2014, 08:46:36 AM
*Ninja wonders WTF IS THAT...*
And replies, nice, thanks, I will update and report any bugs, but I will keep a backup of the previous version if you don't mind, since the change is quite radical ;)
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 12, 2014, 09:13:52 AM
Why do you even need to ask me permission for that? :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 12, 2014, 11:33:30 AM
I just wanted to tell you :) besides I really like you, I got to say it, you are always helpful and extremely kind, unlike a few others :D Btw I have a few minutes coz I finished cleaning up my piece of the room and my gf is washing the dishes so I can try to install the hooks version. Let's see...
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 12, 2014, 11:55:39 AM

Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: iumq_uninstall
File: /Sources/IUMQ.subs.php
Line: 43


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package
File: /Sources/IUMQ.subs.php
Line: 42


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package_installed_done
File: /Sources/IUMQ.subs.php
Line: 41


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package_installed_done
File: /Sources/IUMQ.subs.php
Line: 40


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package_delete
File: /Sources/IUMQ.subs.php
Line: 35


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package
File: /Sources/IUMQ.subs.php
Line: 34


http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package
File:/Sources/IUMQ.subs.php
Line: 31


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package_uninstall_done
File: /Sources/IUMQ.subs.php
Line: 30


Type of error: Undefined
http://vige.altervista.org/forum/index.php?action=admin;area=modsettings;sa=general
8: Undefined index: package_uninstall_doneA
File: /Sources/IUMQ.subs.php
Line: 29

It took me almost half an hour tolist all of these and remove all the crap in the middle of the error messages... Consider this list DOUBLED because when I tried to install it it installed successfully but it threw me the above from my admin account but ALSO from the same IP shown as guest for no reason... So not quite good XD if you fix those I bet it will be fine or almost fine. ;)

P.s. Link to mod is missing in the OP
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 13, 2014, 04:52:49 AM
@Version 1.5.0m
- Downgraded temporarily to a partly hook mod due to undefined errors.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 13, 2014, 11:18:37 AM
No errors in the error log this time, but I still got the previous version listed below it for some unknown reasons. As attached.
The logout prompt mod was uninstalled and quickly reinstalled to test if this mod worked as intended (and it did). Let me know :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Burke ♞ Knight on October 13, 2014, 11:30:10 AM
Maybe because it is a different version, with different zip file name.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 13, 2014, 11:51:26 AM
It doesn't happen with any other mod though, at least AFAIK... If I install it again it messes the list up again by moving the previous version there again :/
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 13, 2014, 05:45:59 PM
1.5.0m is different from 1.4 version. The latest version will supersede the older version. That is very normal to me.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 13, 2014, 05:58:48 PM
Didn't know it was default behaviour it never happened to me before... Well it works as intended then.
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 13, 2014, 06:32:39 PM
Good to hear it is working fine for now. If there is any error(s) do report. I am still fixing the fully hook version, if it is possible. If not, then, there will no upgrade until there is something new to add or there is something broken needed to be fixed.

By the way, normally, I didn't remove the older package from the mod page unless the new one is safer and better. Nor that I created a mod package that supports upgrading. Just have to uninstall the older one and re-install the latest one. Don't forget to backup whenever necessary.
Title: Re: Install & Uninstall Mods Quickly
Post by: Ninja ZX-10RR on October 14, 2014, 10:09:39 AM
I will be looking less often at this though since I am leaving so feel free to PM me if you need some help with testing or anything esle :) congrats for the update anyway. See you my friend :)
Title: Re: Install & Uninstall Mods Quickly
Post by: Hj Ahmad Rasyid Hj Ismail on October 14, 2014, 08:26:37 PM
Will do. Thank you.
Title: Re: IUMQ - Install & Uninstall Mods Quickly (Fully Hook!)
Post by: Hj Ahmad Rasyid Hj Ismail on December 30, 2014, 01:04:58 PM
Re-upgraded to fully hook mod.

#Changes Log

@Version 1.5.1
- Re-upgraded to be a fully hook mod with no file modification for SMF 2.0.x.
Title: Re: IUMQ - Install & Uninstall Mods Quickly (Fully Hook!)
Post by: roza on May 07, 2016, 01:49:32 PM

Thank you @ahrasis for making and sharing this useful mod. I've got following errors on IUMQ.subs.php file(attached):
8: Undefined index: uninstall (on line 32)
8: Undefined index: package_installed_done (on lines 30, 31)
8: Undefined index: package_uninstall_done (on lines 24, 25)
8: Undefined index: package_delete (on line 27)
Would you please help me about this please?
Thanks in advance.

Title: Re: IUMQ - Install & Uninstall Mods Quickly (Fully Hook!)
Post by: -Rock Lee- on May 08, 2016, 08:37:30 PM
@ahrasis very good work indeed  8) ... had a doubt in the file IUMQ.hooks.php on line 16 and 39 what does it say:

die('<b>Error:</b> Cannot install - please verify you put this file in the same place as SMF\'s SSI.php.');

   echo 'Congratulations! You have successfully installed this mod!';


also I was not sure I translated and I'll leave if you need it:

die('<b>Error:</b> No se puede instalar - por favor, compruebe si este archivo esta en el mismo lugar que SMF y SSI.php.');

   echo 'Felicitaciones! Se ah instalado con &eacute;xito este mod!';


And attach the file translated into Latin Spanish hope you serve ;D


Regards!
Title: Re: IUMQ - Install & Uninstall Mods Quickly (Fully Hook!)
Post by: Hj Ahmad Rasyid Hj Ismail on May 20, 2016, 12:06:13 AM
Will check the error later roza.

And thank you Rock Lee.