Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Developing a prize-giveaway style component

546 views

Published on

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.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Developing a prize-giveaway style component

  1. 1. myFidgets by Bill Visser
  2. 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. 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. 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. 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. 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
  7. 7. edit.php
  8. 8. Cron Jobs make_a_draw.php Once a day at 2:05am send_emails.php Every hour at 5 mins past the hour
  9. 9. make_a_draw.php
  10. 10. send_emails.php

×