How to update an ACP module?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
AlfredoRamos
Recognised Extension Developer
Posts: 1302
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

How to update an ACP module?

Post by AlfredoRamos »

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?
Some of my phpBB extensions:
:chart_with_upwards_trend: SEO Metadata | Image Markdown | :shield: hCaptcha
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user | Linux Boards :penguin:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di »

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
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
AlfredoRamos
Recognised Extension Developer
Posts: 1302
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: How to update an ACP module?

Post by AlfredoRamos »

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 ;)
Some of my phpBB extensions:
:chart_with_upwards_trend: SEO Metadata | Image Markdown | :shield: hCaptcha
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user | Linux Boards :penguin:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di »

You're welcome.
I had the same doubt at those times, I recall. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: How to update an ACP module?

Post by mrgoldy »

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 mrgoldy on Sat Nov 18, 2017 1:09 am, edited 1 time in total.
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: How to update an ACP module?

Post by 3Di »

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.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “Extension Writers Discussion”