Code walkthru Exercises
- Enable all debugging switches in Global Settings Screen
- Add the following to your settings file:
- Add a smartyDebug=1 to a GET request and see the smarty variables exposed
- Hack the template and add (hint: find the tpl file using view source)
to the top of the file to display the contents of an Event Registration Confirmation page
- Use firebug with the contact search autocomplete and find the file/query that is responds to this ajax call
- Send an email to a contact (or use CiviMail) and check the logged email
Hook Exercises
- Implement the validate hook (hook_civicrm_validate) on the Contact Edit Form:
- Make external_identifier a required field
- Validate external_identifier to ensure it is a valid SSN ( 123-45-6789)
- Implement the pageRun hook on the user dashboard: q=civicrm/user&reset=1&id=XX
- Expose some data to the template via the pageRun hook
- Customize the template to include this data at the top of the template
- Implement the buildForm hook on the Contact Edit Form
- Introduce a text form field. Make this field required
- Add this field to the template
- Implement the validate hook to ensure that this field is numeric
- Implement the postProcess hook and save the value to the CiviCRM log file
Views2 Exercises
- Implement a Contact Directory (name, address, phone)
- Implement a Latest Contributions block, ordered by receive_date desc
Labels:
