How to update an ACP module?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
AbaddonOrmuz
Registered User
Posts: 219
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

How to update an ACP module?

Post by AbaddonOrmuz » Fri Nov 17, 2017 10:13 pm

Hi,

I'm trying to update an ACP module of my Imgur extension to add another mode, I looked in the code, however I didn't find a way to do it.

In a migration you can update a config value with ['config.update', [..]] and I was hoping there was a similar method to update a module too, but there isn't.

Is removing the old module and adding the updated one or a custom function the only ways I can achieve this, without creating a custom function?
A proudly user of Arch Linux :: /r/sddm_themes

User avatar
3Di
Registered User
Posts: 11864
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano - Frankfurt
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di » Fri Nov 17, 2017 10:21 pm

I managed to add modes this way..

First migration - ACP module installation with 1 mode
https://github.com/3D-I/Steam-Group-Sui ... module.php

Second migration - Adding 2 more modes to ACP
https://github.com/3D-I/Steam-Group-Sui ... c1.php#L31
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
AbaddonOrmuz
Registered User
Posts: 219
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: How to update an ACP module?

Post by AbaddonOrmuz » Fri Nov 17, 2017 10:39 pm

So the modes are appended... I tried before, and I got an error message saying that a mode already exist, I only needed to remove the previous mode in the second migration :lol:

Edit: Where are my manners? thank you ;)
A proudly user of Arch Linux :: /r/sddm_themes

User avatar
3Di
Registered User
Posts: 11864
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano - Frankfurt
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di » Fri Nov 17, 2017 11:13 pm

You're welcome.
I had the same doubt at those times, I recall. :)
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

User avatar
posey
Registered User
Posts: 545
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: How to update an ACP module?

Post by posey » Sat Nov 18, 2017 12:43 am

Looking at the Module Tool we're using, there is not .update, only .remove and .add. So I guess just change the code for your current modes, or remove and add the things you want to change.
Last edited by posey on Sat Nov 18, 2017 1:09 am, edited 1 time in total.
Ultimate Extensions:
Image Ultimate Blog (coming soon)
Image Ultimate Teams

''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

User avatar
3Di
Registered User
Posts: 11864
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milano - Frankfurt
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di » Sat Nov 18, 2017 12:50 am

You can't change/modify existing migration(s) in a validated extension (CDB).

Mine above linked isn't in the CDB yet but I used that approach due to the fact I delivered it privately first then I was in need to avoid the client to have to delete data. To not loose the existing stored users's input in UCP.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 13 guests

cron