Page 1 of 1

Download center - need help with Front-End

Posted: Tue Jan 08, 2019 11:25 pm
by SkyAn
A long time ago I was looking a Download Center for my site. Now I started writing my first component. And I ran into the problem of writing code for Front-End. Maybe this is not a problem, but I don't know how to start writing.
What I want to do (in the future, something like this)
- all links look like this &f=123 (if you can recommend something better, I will be glad)
- First. Check if we have this record in DB. If not, an error message to the user and send email to the webmaster (write into DB);
- The second. Check the user group. It's important. If the user is not in the group, show pop-up windows with information and send email to the webmaster (write into DB);
- The third. Check if the file exists. If the file exists - create a link to download the file(send email to the webmaster, write into DB), if it does not exists - show a pop-up form with a request where the user can leave a message and send it to us (send email to the webmaster, write into DB)
For the beta version, I think will be enough.

Re: Download center - need help with Front-End

Posted: Wed Jan 09, 2019 12:44 pm
by toivo
You should study the structure and functions of a few available free extension to see how the front end forms are integrated into the component.

Please note that it is very useful to check extensions with the JED Checker, available from JED:
https://extensions.joomla.org/extension/jedchecker/

In addition, this recent topic lists some tools and techniques to maintain coding standards when developing extensions: viewtopic.php?f=715&t=968636