Writing Your First Plugin

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Writing Your First Plugin - Presentation Transcript

    1. Writing your first EE Plugin George Ornbo shapeshed.com @shapeshed
    2. Hello! • London-based • EE Pro Network • github.com/shapeshed
    3. Don’t miss this http://net.tutsplus.com/tutorials/ cmss/building-your-first- expressionengine-plugin/
    4. Plugins, Extensions Modules. WTF? • Plugins are simple run-time enhancements • Extensions extend core functionality • Modules interact with a database and generally have a control panel
    5. Starting out • Basic PHP • Understanding of templates and tags • Willpower
    6. Mummy! • It is not as hard as it seems • There’s help available in the forums • It greatly enhances your offering as a developer
    7. Plugins solve small problems • Client: I want all the titles on the site to have the first letter of each word capitalised • You: Can’t the editors fix that? • Client: There are 2000 articles. • You: OK Big Boy. Time for a plugin.
    8. A typical weblog loop
    9. Plugin setup
    10. Naming the bits • The filename for a plugin should pi.class_name.php (all lowercase) • The class should be Class_name (first word uppercase only) • The function should match the Class name exactly
    11. Adding plugin info
    12. Add usage info
    13. Add to /system/plugins/
    14. It is easy to get this wrong • The plugin may not show up in the control panel • The plugin page in your control panel may error • You may get no output from your plugin
    15. Do the magic
    16. Add to your template
    17. What this does • Takes the the input from the title tag • Sends it to the plugin • The plugin makes the first letter of each word uppercase • This is returned and displayed by the template • e.g. “My article title” becomes “My Article Title”
    18. Job done.
    19. What about EE 2.0? • Built on CodeIgniter • Plugins need to be ported • Generally not that difficult • CodeIgniter brings a lot of libraries and good things
    20. Porting to EE 2.0
    21. Other changes • Upload to /system/expressionengine/ thirdparty/pluginname/ • Weblogs are channels • Global classes are replaced by the EE Super Object $this->EE =& get_instance();
    22. LE FIN • Slides and example plugin available at shapeshed.com/talks • Photos Creative Commons Licensed from Flickr: radville, its*me*red, craigmdennis, bfick
    SlideShare Zeitgeist 2009

    + George OrnboGeorge Ornbo Nominate

    custom

    167 views, 1 favs, 2 embeds more stats

    An introduction to writing your first plugin in Exp more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 167
      • 122 on SlideShare
      • 45 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 9
    Most viewed embeds
    • 39 views on http://shapeshed.com
    • 6 views on http://0.0.0.0:4000

    more

    All embeds
    • 39 views on http://shapeshed.com
    • 6 views on http://0.0.0.0:4000

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories