A fake company called Fidget Spinner wants to give away prizes (figet spinners) in a competition. The number of competitions, the dates,the number of prizes and the frequency of the draws will be determined by the user.
2. Aim
To produce a Joomla component that
allows for the creation of 'give-a-way'
type of competition.
It must be 'front-end' only:
a 'public section' for members and a
'private section' for administration.
No Joomla backend
3. Members
• View all published and active competitions
• Enter a competition – only once per day
• View a member's prizes
• View all competitions
• Make a new competition
• Edit previous competitions
• Upload competition photo and prizes
• View winners
Administrators
4. Auto – cron job
• Make a draw
• Email results to members – include a pdf
• Set Title, Status, Description
• Show the number of Entrants
• Set the Keys per Draw, Draw Cycle, Days of Entry
before the 1st Draw, and the 1st Draw Date
Computer
5. Method
• Copy com_folio_v2.4.1.zip (Tim Plummer)
• Uncompress it
• Global search and replace –
• folio -> fidget
• Folio -> Fidget
• FOLIO -> FIDGET
• Replace folio in filenames to fidget
• Compress com_fidget to com_fidget_v1.zip
• Install
• com_fidget_v1.zip
• JCE – for ease of use
6. (Look at the component)
Next we will look at the code of 4 items –
• fidget/components/com_fidget/views/updfidget/tmpl/edit.php
• cron jobs
• fidget/components/com_fidget/cron_jobs/make_a_draw.php
• fidget/components/com_fidget/cron_jobs/send_emails.php