Hello,
First thanks for your solution.
Then few questions and ideas to enhance your solution :
1 - How I can change the default folder "media/com_osmembership/documents" ? I want to use an already existing folder share with another extension.
2 - How I can change the default folder name "update_packages" ? I want to use an already existing folder share with another extension.
3 - Can we restrict the number of domain by user ? and so the number of Download ID ?
4 - About the downloadurl tag, the document_id change even the file extension is the same, it's not usable, let me explain you :
I have several plans with different prices, what change between them is the level of support and some other things, but the extension file is exactly the same, so if I follow your how-to I have to segregate this extension in multiple version according to each plans, it's not simple.
I can understand the need to have different documents by plans (I have also the case) but you have to consider the specific case where the document/extension is common.
5 - About the plug_installer_foo.zip, it's an interesting way to add to the download url the needed parameters, but another way will be to add inside the extension itself these parameters, like done here :
github.com/mabdelaziz77/downloadid-custom-field
This can be done by :
a) Set inside the extension the "download_id" fieldset and using the "addfieldpath" feature of joomla, for example :
Code:
<fieldset name="basic" addfieldpath="/modules/mod_somemodule/assets/fields">
<field
name="download_id"
type="downloadid"
label="Download ID"
description="Enter your Download ID which can be get from our website https://domain.com. Each Download ID can only be used on one site"
default=""
extension="Extension 1 update package"
key="download_id"
filter="string"
size="50"
/>
</fieldset>
b) and add inside the extension package the download_id.php field script (/assets/fields/download_id.php)
see file attach
What do you think of this approach ?
Ps : You should precise to set an index.html inside "update_packages" folder