• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Release update for an add-on

abdfahim

Active member
#1
I want to release an update for my addon. The only change in the update is one additional template modification. I have few questions regarding that:

1. What is the difference in action between releasing an addon for the first time and releasing an update of an existing addon? Other than the intended template modification, is it enough to change the version string and export the add-on like a new one? Or, do I need to do it differently to make it an update version?

2. I have install.php and uninstall.php which should be called during install and uninstall of the addon. I do not want them to run during update. How can I ensure that?

Thanks,
 

Snog

Well-known member
#2
1) Change the version number and export the XML as usual.

2) Install.php will always run, so you should be sure there is something in your install.php file that does not produce errors. (such as by checking if an added table column exists or if a table exists before performing the actions).
 

abdfahim

Active member
#3
Thanks a lot. Out of curiosity, what happens if I don't change the version number and try to update the addon with an update with the same version number as the original.
 

Snog

Well-known member
#4
Thanks a lot. Out of curiosity, what happens if I don't change the version number and try to update the addon with an update with the same version number as the original.
Nothing happens. It updates as it should.

But, you'll end up having a hard time keeping track of changes without changing the version number.