Diving In: Practical Tips for Writing Custom Plugins
This repository serves as companion code to my talk Diving In: Practical Tips for Writing Custom Plugins at EECI 2012. All of the non-client specific code samples are contained in named branches in the repository. The plugin file (
eeci_demo/pi.eeci_demo.php) appears as it would exactly in your
third_party folder in an EE installation and
index.html contains the tags as they would be used in a template.
The branches match sections in "Section II: Getting it Written" as follows as well as the CI section toward the end of the presentation:
- Blank Plugin Templates -
- The Simplest of Plugins -
- Plugin Methods -
- Passing Parameters -
- Tag Pairs -
- Complex Output -
- Returning Muliple Results -
- Nested Tag Pairs -
- Using CI Libraries -
- Using CI Helpers -
To see the code related to each section, use the built-in Github branch switcher or, once cloned locally, use the command
git checkout origin/branch_name to view the code or
git checkout -b branch_name origin/branch_name to work with the code.
The slides are available online at Speaker Deck.
Additional resources from my talk: