Hello, I’m not an php expert ;-)
Here is the code which I use to show the link of download to the members and the link of registration for the not members.
I added another parameter which is a condition if the file to be downloaded exists.
if (in_array('zipfull', get_field('fichiers_zip')) and current_user_can("access_s2member_level3"))
echo '<a title="Right clic to download this file" href="#">Zip Full (Between 3M and 6M pixels)</a><br/>';
else if (in_array('zipfull', get_field('fichiers_zip')))
echo '<a title="Right clic to download this file" href="/join">Zip Full (Between 3M and 6M pixels)</a><br/>';
else
echo 'No file to download';
Now I have to replace the url of download # by the real url and the good name of zip file.
I obtains the name of the file to be downloaded by this code
<?php the_field('id_model')_full.zip;?>
I looked at this page but I do not understand how to organize the group.
Thank you for your help