4

As this article says, the extension update system is now compulsory for all extensions in JED. I searched the web but did not find any satisfactory information about implementing it for my premium extensions. So here is my proposed solution-

  1. In extension's any class constructor add download id (or whatever) value (like dlid=12345678901) in extra_query column in #__update_sites table. This process depends on your own like you may take dlid input from extension's setting page and add it to the above table column via class constructor or any other ways.

  2. The Joomla update system will add this extra_query parameter at the end of your defined download URL(if I am wrong tell me!). If you set the download url in your update site xml file like this - http://www.yourwebsite.com/index.php?option=com_yourcom&task=comsubctrl.updateverify then the full download url will be - http://www.yourwebsite.com/index.php?option=com_yourcom&task=comsubctrl.updateverify&dlid=12345678901

  3. Now when the Joomla update system sends the request by the above url to your update website then your site's component's subcontroller's (comsubctrl) method updateverify() will verify the validity of dlid and then respond with the premium extension zip file. Then after getting the zip file in response, the Joomla update system installs that zip as a new updated extension.

These are my basic ways to handle updating premium extensions directly from the Joomla update manager. So kindly suggest corrections, alternatives or easier and more secure ways to do that. I hope this is gonna be a great post for implementing update system for everybody including myself.

  • Hi any experts here am i going right direction?. It's very important because we are dealing with commercial extensions so that hackers don't get access for free. – dev-m Feb 20 '17 at 22:30
  • hello no one interested in that important topic?? – dev-m Feb 24 '17 at 11:48
  • As for now adding extra parameter to the update URL is the best way but I would also think about connecting the ID or any other parameter you gonna use with IP address. So basically customer will create the access key in your selling software and use it in the component. That way if he shares the key with other people or use it beyond what is in the license you can detect it easily. – Artur Stępień Apr 13 '17 at 18:30
  • you mean something like access key is related with the domain/IP address so that it can't be used in multiple site? need some elaboration from you, I will do something like that else access key can use anyone. Actually it's permitted to use same soft in some websites of the same buyer. – dev-m Apr 13 '17 at 21:12
1

Actually, instead of modifying core table, you should define a plugin of type "installer" that will append a download is to the request. That download id could be a parameter attached to the plugin and entered by the customer. Feel free to get inspired by this plugin: https://www.daycounts.com/shop/plugins/daycounts-updater-plugin.htm

  • A extra_query column already added to the core table, forgot from which joomla version. I know of that plugin but it will be a additional plugin headache. – dev-m Mar 4 '17 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.