SlideShare a Scribd company logo
1 of 58
How to start
developing your own
      addons


     http://newism.com.au / @newism
Leevi Graham
•   Developed 25+ addons over 2
    years

•   First Addon: LG Better Meta -
    July 2007

•   Technical Director at Newism

•   Devot:ee ExpressionEngine
    developer of the year

•      leevigraham
Introduction

• Addon primer
• Finding addons + development
  resources
• Developing addons
Plugins
Strengths
•   Simple to build

•   Front end tag parsing

•   Custom field text
    formatting

•   Single PHP file
Strengths               Weaknesses
•   Simple to build         •   No control panel
                                adminstration
•   Front end tag parsing

•   Custom field text        •   No built in settings
    formatting              •   No language file

•   Single PHP file          •   No form submission
                                processing
Image Sizer

•   Developed by: Lumis
                                 {exp:imgsizer:size

•   Resizes images - single      
                                 
                                     image='foo.jpg'
                                     width='200'
    tag
                                 
   alt='My Title'

•   Caches output                
                                 
                                     id='img_5334'
                                     class='entry_img'
•   http://www.lumis.com/page/   }
    imgsizer/
NSM Referrer Alert
•   Developer: Newism              {exp:nsm_referrer_alert_pl}
                                       {if no_results}<p>No referrer found</p>{/if}
                                       <ul>


•   Outputs refer data in a                 <li>ref_scheme: {ref_scheme}</li>
                                            <li>ref_host: {ref_host}</li>

    tag pair                                <li>ref_port: {ref_port}</li>
                                            <li>ref_user: {ref_user}</li>
                                            <li>ref_pass: {ref_pass}</li>


•
                                            <li>ref_path: {ref_path}</li>
    Check the number of                     <li>ref_query: {ref_query}</li>

    references
                                            <li>ref_fragment: {ref_fragment}</li>
                                            <li>ref_search_engine: {ref_search_engine}</li>
                                            <li>ref_search_terms: {ref_search_terms}</li>
                                            <li>ref_visit_count: {ref_visit_count}</li>

•   http://newism.github.com/          </ul>

    nsm.referrer_alert.ee_addon/   {/exp:nsm_referrer_alert_pl}
Modules
Strengths
•   Front end tag parsing

•   Control panel
    administration

•   Easy upgrade from
    plugin

•   Process form
    submissions
Strengths               Weaknesses
•   Front end tag parsing   •   Multiple module and
                                language files
•   Control panel
    administration          •   Multiple install
                                locations
•   Easy upgrade from
    plugin                  •   No built in settings

•   Process form
    submissions
Freeform
•   Developed by: Solspace

•   Custom forms

•   Record submissions in DB

•   Email notifications

•   http://www.solspace.com/software/
    detail/freeform/
LG Quarantine
•   Developed by: Newism

•   Flag comments & entries
    as inappropriate

•   Quarantine comments /
    entries after n flags

•   Control Panel reporting

•   http://leevigraham.com/cms-
    customisation/expressionengine/lg-
    quarantine/
LG Quarantine
•   Developed by: Newism

•   Flag comments & entries
    as inappropriate

•   Quarantine comments /
    entries after n flags

•   Control Panel reporting

•   http://leevigraham.com/cms-
    customisation/expressionengine/lg-
    quarantine/
LG Quarantine
•   Developed by: Newism

•   Flag comments & entries
    as inappropriate

•   Quarantine comments /
    entries after n flags

•   Control Panel reporting

•   http://leevigraham.com/cms-
    customisation/expressionengine/lg-
    quarantine/
Extensions
  'Take control'
Strengths
•   Extend existing tags

•   Extend control panel

•   Built in settings form -
    can be extended

•   All through hooks
Strengths                  Weaknesses
•   Extend existing tags       •   Must be activated

•   Extend control panel       •   No tag parsing

•   Built in settings form -   •   Hook registration +
    can be extended                setting complexity

•   All through hooks
Hooks
• Hook into the core EE processing
• Over 170 hooks
  http://expressionengine.com/developers/extension_hooks/


• Hooks in use
  http://devot-ee.com/hooks/


• Extension class method called by EE when
  hook executed
Creating Hooks
• Insert row into exp_extensions DB table
 • class: The current extension class
 • hook: The hook that calls the method
 • method: The class method to call
 • version: Extension version
 • settings: Serialised array of settings
EE
Hook
EE    Extension
Hook    method
Passes data




 EE                  Extension
Hook                  method
Passes data




 EE                  Extension
Hook                  method




   Returns modified data
Always check if someone else
       is using the same hook
public function my_hook_method($html){
  $this->get_last_call($html, '');
}

/**
 * Get the last call from a previous hook
 *
 * @access private
 * @param mixed $param The variable we are going to fill with the last call
 * @param mixed $default The value to use if no last call is available
 */
private function get_last_call(&$param, $default = NULL){
   global $EXT;
   if ($EXT->last_call !== FALSE)
       $param = $EXT->last_call;
   else if ($param !== NULL && $default !== NULL)
       $param = $default;
}
FieldFrame

•   Developed by: Brandon
    Kelly

•   Easily add custom fields

•   Integrates with SAEF

•   http://brandon-kelly.com/
    fieldframe
NSM Publish Plus
•   Developed by: Newism

•   Publishing workflow,
    drafts and revisions

•   Member publishing
    permissions

•   http://leevigraham.com/cms-
    customisation/expressionengine/
    nsm-publish-plus/
NSM Publish Plus
•   Developed by: Newism

•   Publishing workflow,
    drafts and revisions

•   Member publishing
    permissions

•   http://leevigraham.com/cms-
    customisation/expressionengine/
    nsm-publish-plus/
NSM Publish Plus
•   Developed by: Newism

•   Publishing workflow,
    drafts and revisions

•   Member publishing
    permissions

•   http://leevigraham.com/cms-
    customisation/expressionengine/
    nsm-publish-plus/
Addons
Strengths
•   Powerful: Can change
    every aspect of an install

•   Combined strengths of
    all the components
Strengths                    Weaknesses
•   Powerful: Can change         •   Lots of files in many
    every aspect of an install       different locations

•   Combined strengths of        •   Dependency on
    all the components               components
Structure
•   Developed by: Travis
    Schmeisser

•   Organise EE content in a
    control panel module

•   Output navigation in the
    front end w/ custom tags

•   http://buildwithstructure.com/
Structure
•   Developed by: Travis
    Schmeisser

•   Organise EE content in a
    control panel module

•   Output navigation in the
    front end w/ custom tags

•   http://buildwithstructure.com/
Structure
•   Developed by: Travis
    Schmeisser

•   Organise EE content in a
    control panel module

•   Output navigation in the
    front end w/ custom tags

•   http://buildwithstructure.com/
LG Better Meta
•   Developed by: Leevi
    Graham

•   Add entry meta in a
    publish form custom tab

•   Output meta on the
    front end w/ custom tags

•   http://leevigraham.com/cms-
    customisation/expressionengine/
    lg-better-meta/
LG Better Meta
•   Developed by: Leevi
    Graham

•   Add entry meta in a
    publish form custom tab

•   Output meta on the
    front end w/ custom tags

•   http://leevigraham.com/cms-
    customisation/expressionengine/
    lg-better-meta/
Finding addons
•   Official Repository (144)
    http://expressionengine.com/downloads/addons/


•   ExpressionEngine Forums (?)
    http://expressionengine.com/wiki/


•   Devot:ee (480)
    http://devot-ee.com/add-ons/


•   GitHub (114)
    http://github.com/search?q=ee_addon&type=Repositories


•   http://leevigraham.com
    http://leevigraham.com/cms-customisation/expressionengine/
Developing your
     own addons
http://expressionengine.com/docs/development/

   http://expressionengine.com/developers/
               extension_hooks/
What will it do?
                          Plugin   Module   Extension   Addon

Settings                             x         x         x
Custom fields                                   x         x
Custom tabs                                    x         x
Custom tags                 x        x                   x
Modify existing tags                           x         x
Field text formatting       x                            x
Core manipulation                              x         x
Language files                        x         x         x
Database tables                      x         x         x
Process front end forms              x         x         x
GitHub.com
nsm.custom_tab.ee_addon
/system
                 /extensions
                   /ext.nsm_custom_tab_ext.php
                 /language
                   /english
                    /lang.custom_tab.php


 Addon
                    /lang.custom_tab_ext.php
                 /lib
                   /nsm_custom_tab
                    /views

 Folder               /nsm_custom_tab
                       /index.php
                      /nsm_custom_tab_ext


Structure
                       /form_settings.php
                       /publish_tab.php
                 /modules
                   /nsm_custom_tab
                    /mcp.nsm_custom_tab.php
                    /mod.nsm_custom_tab.php
                /themes
                 /cp_themes
Not so simple      /nsm_custom_tab
                    /admin.css
                    /admin.js
                 /site_themes
                   /nsm_custom_tab
                    /index.php
                    /entry.php
/system
 /extensions
  /ext.nsm_custom_tab_ext.php
 /language
  /english
    /lang.custom_tab.php
    /lang.custom_tab_ext.php
 /lib
  /nsm_custom_tab
    /models
    /updates
    /views
      /nsm_custom_tab
       /index.php
      /nsm_custom_tab_ext
       /form_settinings.php
       /publish_tab.php
 /modules
  /nsm_custom_tab
    /mcp.nsm_custom_tab.php
    /mod.nsm_custom_tab.php
/themes
 /cp_themes
   /nsm_custom_tab
    /admin.css
    /admin.js
 /site_themes
   /nsm_custom_tab
    /index.php
    /entry.php
! Code ahead !
Kicking off
                  ext.nsm_custom_tab_ext.php



Class Nsm_custom_tab_ext(){

    var   $name = 'NSM Custom Tab';
    var   $version = '1.0.0';
    var   $description = 'Adds a custom tab';
    var   $settings_exist = 'y';
    var   $docs_url = '';

    public function __construct($settings=FALSE){
      $this->settings = $setttings;
    }

}
Add hooks
var $hooks = array(
   'lg_addon_update_register_source',
   'lg_addon_update_register_addon',
   'publish_form_new_tabs',
   'publish_form_new_tabs_block',
   'submit_new_entry_start',
   'submit_new_entry_end',
   'publish_form_start'
);

public function enable_extension(){
 global $DB;
 foreach($this->hooks as $hook){
        // insert the hook into the exp_extensions table w/
        // $this->settings
    }
}
Implement settings
public function settings_form($current_settings){
    //   add the page title
    //   build crumb navigation
    //   add PayPal donations button?
    //   link to the module dashboard page?
    //   link to help?
    ob_start();
    include(PATH_EXT.'nsm_custom_tab_ext/views/form_settings.php');
    $out .= ob_get_clean();
    return $out;
}

public function save_settings(){
    // process & serialize $_POST
    // save to exp_extension_settings table
}
Add the tab
// Add the tab
public function publish_form_new_tabs($publish_tabs, $weblog_id, $entry_id)
{
  $this->get_last_call($publish_tabs);
  $publish_tabs['tab_id'] = 'Tab label';
  return $publish_tabs;
}
Add the tab content
// Add the tab content
public function publish_form_new_tabs_block(){
  $this->get_last_call($out, '');
  $data = $this->get_tab_data();
  ob_start();
  include(PATH_EXT.'nsm_custom_tab_ext/views/tab.php');
  $out .= ob_get_clean();
  return $out;
}

// Get the tab content and merge in the preview / revision
private function get_tab_data(){
 $data = array('foo' => 'bar');
    // merge the post data
    $post = $IN->GBL('Nsm_custom_tab_ext', 'POST');
    return array_merge($data, $post);
}
Process the submission
// Validate the submission data
public function submit_new_entry_start( $which, $errors, $entry_id){
  global $IN;
  $data = $IN->GBL('Nsm_custom_tab_ext');
  if($data['foo'] == '') $errors .= '<br />Another Error!';
  if($errors){
    $EE->new_entry_form('preview', $errors, $entry_id);
    $EXT->end_script = TRUE;
  }
}

// Save the submission data
public function submit_new_entry_end($entry_id, $data){
    // Take the post data and do what you need to like save to the database
}
Quicksave
// Runs before any data is processed
public function publish_form_start($which, $error, $entry_id, $hidden){
 global $IN;
 if(empty($entry_id)) $entry_id = $IN->GBL('entry_id');
    // If the $which is save, jump to submit_new_entry_end()
    if($which == 'save' && $entry_id != FALSE){
      $this->submit_new_entry_end($entry_id);
    }
}
LG Addon Updater
// register the xml versions source
public function lg_addon_update_register_source($sources){
  global $EXT;
  $this->get_last_call($sources);
  $sources[] = 'http://yoursite.com/versions.xml';
  return $sources;
}

// register this addon
public function lg_addon_update_register_addon($addons){
  global $EXT;
  $this->get_last_call($addons);
  $addons['nsm_custom_tab_ext'] = $this->version;
  return $addons;
}
Next steps
Free LG /
NSM addons!
Thankyou.
Questions?


http://newism.com.au / @newism

More Related Content

What's hot

IBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersIBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersAlan Seiden
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentCss Founder
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraStoyan Zhekov
 
Custom Development with Novell Teaming
Custom Development with Novell TeamingCustom Development with Novell Teaming
Custom Development with Novell TeamingNovell
 
RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3Anton Narusberg
 
Linux, Apache, Mysql, PHP
Linux, Apache, Mysql, PHPLinux, Apache, Mysql, PHP
Linux, Apache, Mysql, PHPwebhostingguy
 
drupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupaldrupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupalrolf vreijdenberger
 
Apache Solr for TYPO3 at TYPO3 Usergroup Day Netherlands
Apache Solr for TYPO3 at TYPO3 Usergroup Day NetherlandsApache Solr for TYPO3 at TYPO3 Usergroup Day Netherlands
Apache Solr for TYPO3 at TYPO3 Usergroup Day NetherlandsIngo Renner
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Eugenio Minardi
 
My site is slow
My site is slowMy site is slow
My site is slowhernanibf
 
ZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorMichele Orru
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your websitehernanibf
 
19 free flash photo galleries
19 free flash photo galleries19 free flash photo galleries
19 free flash photo galleriestsonlinen
 

What's hot (15)

IBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP DevelopersIBM i: Fertile Ground for PHP Developers
IBM i: Fertile Ground for PHP Developers
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 
Lecture 7: Server side programming
Lecture 7: Server side programmingLecture 7: Server side programming
Lecture 7: Server side programming
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
 
Custom Development with Novell Teaming
Custom Development with Novell TeamingCustom Development with Novell Teaming
Custom Development with Novell Teaming
 
RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3
 
Linux, Apache, Mysql, PHP
Linux, Apache, Mysql, PHPLinux, Apache, Mysql, PHP
Linux, Apache, Mysql, PHP
 
drupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupaldrupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupal
 
Apache Solr for TYPO3 at TYPO3 Usergroup Day Netherlands
Apache Solr for TYPO3 at TYPO3 Usergroup Day NetherlandsApache Solr for TYPO3 at TYPO3 Usergroup Day Netherlands
Apache Solr for TYPO3 at TYPO3 Usergroup Day Netherlands
 
Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)Drupal theming - a practical approach (European Drupal Days 2015)
Drupal theming - a practical approach (European Drupal Days 2015)
 
My site is slow
My site is slowMy site is slow
My site is slow
 
ZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchor
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your website
 
19 free flash photo galleries
19 free flash photo galleries19 free flash photo galleries
19 free flash photo galleries
 

Viewers also liked

416 The Practical Use Of Mobile Learning Matthijs Leendertse
416 The Practical Use Of Mobile Learning   Matthijs Leendertse416 The Practical Use Of Mobile Learning   Matthijs Leendertse
416 The Practical Use Of Mobile Learning Matthijs LeendertseSURFfoundation
 
716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove
716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove
716 Elektronische Lessen Als Onderwijstijd, Eus Van HoveSURFfoundation
 
412 Arrangeren Is De Core Business Van Elke Docent Wim De Boer, Leo Bakker ...
412 Arrangeren Is De Core Business Van Elke Docent   Wim De Boer, Leo Bakker ...412 Arrangeren Is De Core Business Van Elke Docent   Wim De Boer, Leo Bakker ...
412 Arrangeren Is De Core Business Van Elke Docent Wim De Boer, Leo Bakker ...SURFfoundation
 
718 De Open Leermaterialenbank, Kansen Voor Docenten Willem Jan Van Elk
718 De Open Leermaterialenbank, Kansen Voor Docenten   Willem Jan Van Elk718 De Open Leermaterialenbank, Kansen Voor Docenten   Willem Jan Van Elk
718 De Open Leermaterialenbank, Kansen Voor Docenten Willem Jan Van ElkSURFfoundation
 
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de VosSURFfoundation
 
718 Dlwo Functionaliteiten Ronald Ham
718 Dlwo Functionaliteiten   Ronald Ham718 Dlwo Functionaliteiten   Ronald Ham
718 Dlwo Functionaliteiten Ronald HamSURFfoundation
 
311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk
311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk
311 Een Gezamelijke Toetsvragenbank, Douwe Van DijkSURFfoundation
 
214 Coaching Met Het Oortje Nele Coninx
214 Coaching Met Het Oortje    Nele Coninx214 Coaching Met Het Oortje    Nele Coninx
214 Coaching Met Het Oortje Nele ConinxSURFfoundation
 

Viewers also liked (8)

416 The Practical Use Of Mobile Learning Matthijs Leendertse
416 The Practical Use Of Mobile Learning   Matthijs Leendertse416 The Practical Use Of Mobile Learning   Matthijs Leendertse
416 The Practical Use Of Mobile Learning Matthijs Leendertse
 
716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove
716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove
716 Elektronische Lessen Als Onderwijstijd, Eus Van Hove
 
412 Arrangeren Is De Core Business Van Elke Docent Wim De Boer, Leo Bakker ...
412 Arrangeren Is De Core Business Van Elke Docent   Wim De Boer, Leo Bakker ...412 Arrangeren Is De Core Business Van Elke Docent   Wim De Boer, Leo Bakker ...
412 Arrangeren Is De Core Business Van Elke Docent Wim De Boer, Leo Bakker ...
 
718 De Open Leermaterialenbank, Kansen Voor Docenten Willem Jan Van Elk
718 De Open Leermaterialenbank, Kansen Voor Docenten   Willem Jan Van Elk718 De Open Leermaterialenbank, Kansen Voor Docenten   Willem Jan Van Elk
718 De Open Leermaterialenbank, Kansen Voor Docenten Willem Jan Van Elk
 
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos
211 Verbindende Werking Van Online Studiemateriaal, Van Leijen-de Vos
 
718 Dlwo Functionaliteiten Ronald Ham
718 Dlwo Functionaliteiten   Ronald Ham718 Dlwo Functionaliteiten   Ronald Ham
718 Dlwo Functionaliteiten Ronald Ham
 
311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk
311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk
311 Een Gezamelijke Toetsvragenbank, Douwe Van Dijk
 
214 Coaching Met Het Oortje Nele Coninx
214 Coaching Met Het Oortje    Nele Coninx214 Coaching Met Het Oortje    Nele Coninx
214 Coaching Met Het Oortje Nele Coninx
 

Similar to How to start developing your own ExpressionEngine addons

Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With LoveUp2 Technology
 
WordPress Under Control (Boston WP Meetup)
WordPress Under Control (Boston WP Meetup)WordPress Under Control (Boston WP Meetup)
WordPress Under Control (Boston WP Meetup)Matt Bernhardt
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 WorkflowsRyan Street
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPagesUlrich Krause
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14slobodanmanic
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityMichelle Davies (Hryvnak)
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Sauce Labs
 

Similar to How to start developing your own ExpressionEngine addons (20)

Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
WordPress Under Control (Boston WP Meetup)
WordPress Under Control (Boston WP Meetup)WordPress Under Control (Boston WP Meetup)
WordPress Under Control (Boston WP Meetup)
 
Ci2
Ci2Ci2
Ci2
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
 
NEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & SecurityNEPA BlogCon 2013 - WordPress Customization & Security
NEPA BlogCon 2013 - WordPress Customization & Security
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 

Recently uploaded

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

How to start developing your own ExpressionEngine addons

  • 1. How to start developing your own addons http://newism.com.au / @newism
  • 2. Leevi Graham • Developed 25+ addons over 2 years • First Addon: LG Better Meta - July 2007 • Technical Director at Newism • Devot:ee ExpressionEngine developer of the year • leevigraham
  • 3. Introduction • Addon primer • Finding addons + development resources • Developing addons
  • 5. Strengths • Simple to build • Front end tag parsing • Custom field text formatting • Single PHP file
  • 6. Strengths Weaknesses • Simple to build • No control panel adminstration • Front end tag parsing • Custom field text • No built in settings formatting • No language file • Single PHP file • No form submission processing
  • 7. Image Sizer • Developed by: Lumis {exp:imgsizer:size • Resizes images - single image='foo.jpg' width='200' tag alt='My Title' • Caches output id='img_5334' class='entry_img' • http://www.lumis.com/page/ } imgsizer/
  • 8. NSM Referrer Alert • Developer: Newism {exp:nsm_referrer_alert_pl} {if no_results}<p>No referrer found</p>{/if} <ul> • Outputs refer data in a <li>ref_scheme: {ref_scheme}</li> <li>ref_host: {ref_host}</li> tag pair <li>ref_port: {ref_port}</li> <li>ref_user: {ref_user}</li> <li>ref_pass: {ref_pass}</li> • <li>ref_path: {ref_path}</li> Check the number of <li>ref_query: {ref_query}</li> references <li>ref_fragment: {ref_fragment}</li> <li>ref_search_engine: {ref_search_engine}</li> <li>ref_search_terms: {ref_search_terms}</li> <li>ref_visit_count: {ref_visit_count}</li> • http://newism.github.com/ </ul> nsm.referrer_alert.ee_addon/ {/exp:nsm_referrer_alert_pl}
  • 10. Strengths • Front end tag parsing • Control panel administration • Easy upgrade from plugin • Process form submissions
  • 11. Strengths Weaknesses • Front end tag parsing • Multiple module and language files • Control panel administration • Multiple install locations • Easy upgrade from plugin • No built in settings • Process form submissions
  • 12. Freeform • Developed by: Solspace • Custom forms • Record submissions in DB • Email notifications • http://www.solspace.com/software/ detail/freeform/
  • 13. LG Quarantine • Developed by: Newism • Flag comments & entries as inappropriate • Quarantine comments / entries after n flags • Control Panel reporting • http://leevigraham.com/cms- customisation/expressionengine/lg- quarantine/
  • 14. LG Quarantine • Developed by: Newism • Flag comments & entries as inappropriate • Quarantine comments / entries after n flags • Control Panel reporting • http://leevigraham.com/cms- customisation/expressionengine/lg- quarantine/
  • 15. LG Quarantine • Developed by: Newism • Flag comments & entries as inappropriate • Quarantine comments / entries after n flags • Control Panel reporting • http://leevigraham.com/cms- customisation/expressionengine/lg- quarantine/
  • 16. Extensions 'Take control'
  • 17. Strengths • Extend existing tags • Extend control panel • Built in settings form - can be extended • All through hooks
  • 18. Strengths Weaknesses • Extend existing tags • Must be activated • Extend control panel • No tag parsing • Built in settings form - • Hook registration + can be extended setting complexity • All through hooks
  • 19. Hooks • Hook into the core EE processing • Over 170 hooks http://expressionengine.com/developers/extension_hooks/ • Hooks in use http://devot-ee.com/hooks/ • Extension class method called by EE when hook executed
  • 20. Creating Hooks • Insert row into exp_extensions DB table • class: The current extension class • hook: The hook that calls the method • method: The class method to call • version: Extension version • settings: Serialised array of settings
  • 22. EE Extension Hook method
  • 23. Passes data EE Extension Hook method
  • 24. Passes data EE Extension Hook method Returns modified data
  • 25. Always check if someone else is using the same hook public function my_hook_method($html){ $this->get_last_call($html, ''); } /** * Get the last call from a previous hook * * @access private * @param mixed $param The variable we are going to fill with the last call * @param mixed $default The value to use if no last call is available */ private function get_last_call(&$param, $default = NULL){ global $EXT; if ($EXT->last_call !== FALSE) $param = $EXT->last_call; else if ($param !== NULL && $default !== NULL) $param = $default; }
  • 26. FieldFrame • Developed by: Brandon Kelly • Easily add custom fields • Integrates with SAEF • http://brandon-kelly.com/ fieldframe
  • 27. NSM Publish Plus • Developed by: Newism • Publishing workflow, drafts and revisions • Member publishing permissions • http://leevigraham.com/cms- customisation/expressionengine/ nsm-publish-plus/
  • 28. NSM Publish Plus • Developed by: Newism • Publishing workflow, drafts and revisions • Member publishing permissions • http://leevigraham.com/cms- customisation/expressionengine/ nsm-publish-plus/
  • 29. NSM Publish Plus • Developed by: Newism • Publishing workflow, drafts and revisions • Member publishing permissions • http://leevigraham.com/cms- customisation/expressionengine/ nsm-publish-plus/
  • 31. Strengths • Powerful: Can change every aspect of an install • Combined strengths of all the components
  • 32. Strengths Weaknesses • Powerful: Can change • Lots of files in many every aspect of an install different locations • Combined strengths of • Dependency on all the components components
  • 33. Structure • Developed by: Travis Schmeisser • Organise EE content in a control panel module • Output navigation in the front end w/ custom tags • http://buildwithstructure.com/
  • 34. Structure • Developed by: Travis Schmeisser • Organise EE content in a control panel module • Output navigation in the front end w/ custom tags • http://buildwithstructure.com/
  • 35. Structure • Developed by: Travis Schmeisser • Organise EE content in a control panel module • Output navigation in the front end w/ custom tags • http://buildwithstructure.com/
  • 36. LG Better Meta • Developed by: Leevi Graham • Add entry meta in a publish form custom tab • Output meta on the front end w/ custom tags • http://leevigraham.com/cms- customisation/expressionengine/ lg-better-meta/
  • 37. LG Better Meta • Developed by: Leevi Graham • Add entry meta in a publish form custom tab • Output meta on the front end w/ custom tags • http://leevigraham.com/cms- customisation/expressionengine/ lg-better-meta/
  • 38. Finding addons • Official Repository (144) http://expressionengine.com/downloads/addons/ • ExpressionEngine Forums (?) http://expressionengine.com/wiki/ • Devot:ee (480) http://devot-ee.com/add-ons/ • GitHub (114) http://github.com/search?q=ee_addon&type=Repositories • http://leevigraham.com http://leevigraham.com/cms-customisation/expressionengine/
  • 39. Developing your own addons http://expressionengine.com/docs/development/ http://expressionengine.com/developers/ extension_hooks/
  • 40. What will it do? Plugin Module Extension Addon Settings x x x Custom fields x x Custom tabs x x Custom tags x x x Modify existing tags x x Field text formatting x x Core manipulation x x Language files x x x Database tables x x x Process front end forms x x x
  • 43. /system /extensions /ext.nsm_custom_tab_ext.php /language /english /lang.custom_tab.php Addon /lang.custom_tab_ext.php /lib /nsm_custom_tab /views Folder /nsm_custom_tab /index.php /nsm_custom_tab_ext Structure /form_settings.php /publish_tab.php /modules /nsm_custom_tab /mcp.nsm_custom_tab.php /mod.nsm_custom_tab.php /themes /cp_themes Not so simple /nsm_custom_tab /admin.css /admin.js /site_themes /nsm_custom_tab /index.php /entry.php
  • 44. /system /extensions /ext.nsm_custom_tab_ext.php /language /english /lang.custom_tab.php /lang.custom_tab_ext.php /lib /nsm_custom_tab /models /updates /views /nsm_custom_tab /index.php /nsm_custom_tab_ext /form_settinings.php /publish_tab.php /modules /nsm_custom_tab /mcp.nsm_custom_tab.php /mod.nsm_custom_tab.php
  • 45. /themes /cp_themes /nsm_custom_tab /admin.css /admin.js /site_themes /nsm_custom_tab /index.php /entry.php
  • 47. Kicking off ext.nsm_custom_tab_ext.php Class Nsm_custom_tab_ext(){ var $name = 'NSM Custom Tab'; var $version = '1.0.0'; var $description = 'Adds a custom tab'; var $settings_exist = 'y'; var $docs_url = ''; public function __construct($settings=FALSE){ $this->settings = $setttings; } }
  • 48. Add hooks var $hooks = array( 'lg_addon_update_register_source', 'lg_addon_update_register_addon', 'publish_form_new_tabs', 'publish_form_new_tabs_block', 'submit_new_entry_start', 'submit_new_entry_end', 'publish_form_start' ); public function enable_extension(){ global $DB; foreach($this->hooks as $hook){ // insert the hook into the exp_extensions table w/ // $this->settings } }
  • 49. Implement settings public function settings_form($current_settings){ // add the page title // build crumb navigation // add PayPal donations button? // link to the module dashboard page? // link to help? ob_start(); include(PATH_EXT.'nsm_custom_tab_ext/views/form_settings.php'); $out .= ob_get_clean(); return $out; } public function save_settings(){ // process & serialize $_POST // save to exp_extension_settings table }
  • 50. Add the tab // Add the tab public function publish_form_new_tabs($publish_tabs, $weblog_id, $entry_id) { $this->get_last_call($publish_tabs); $publish_tabs['tab_id'] = 'Tab label'; return $publish_tabs; }
  • 51. Add the tab content // Add the tab content public function publish_form_new_tabs_block(){ $this->get_last_call($out, ''); $data = $this->get_tab_data(); ob_start(); include(PATH_EXT.'nsm_custom_tab_ext/views/tab.php'); $out .= ob_get_clean(); return $out; } // Get the tab content and merge in the preview / revision private function get_tab_data(){ $data = array('foo' => 'bar'); // merge the post data $post = $IN->GBL('Nsm_custom_tab_ext', 'POST'); return array_merge($data, $post); }
  • 52. Process the submission // Validate the submission data public function submit_new_entry_start( $which, $errors, $entry_id){ global $IN; $data = $IN->GBL('Nsm_custom_tab_ext'); if($data['foo'] == '') $errors .= '<br />Another Error!'; if($errors){ $EE->new_entry_form('preview', $errors, $entry_id); $EXT->end_script = TRUE; } } // Save the submission data public function submit_new_entry_end($entry_id, $data){ // Take the post data and do what you need to like save to the database }
  • 53. Quicksave // Runs before any data is processed public function publish_form_start($which, $error, $entry_id, $hidden){ global $IN; if(empty($entry_id)) $entry_id = $IN->GBL('entry_id'); // If the $which is save, jump to submit_new_entry_end() if($which == 'save' && $entry_id != FALSE){ $this->submit_new_entry_end($entry_id); } }
  • 54. LG Addon Updater // register the xml versions source public function lg_addon_update_register_source($sources){ global $EXT; $this->get_last_call($sources); $sources[] = 'http://yoursite.com/versions.xml'; return $sources; } // register this addon public function lg_addon_update_register_addon($addons){ global $EXT; $this->get_last_call($addons); $addons['nsm_custom_tab_ext'] = $this->version; return $addons; }
  • 56.
  • 57. Free LG / NSM addons!

Editor's Notes

  1. - Github: Create a new repo and suffix it with .ee_addon - developer_prefix.addon_name.ee_addon
  2. - Github: Create a new repo and suffix it with .ee_addon - developer_prefix.addon_name.ee_addon
  3. Documentation Marketing Sales Support