Introduction to Module Development John Fiala and Ezra Barnett Gildesgame.

Slides:



Advertisements
Similar presentations
Welcome to GoBig Printing | Quick Start Presentation The company that brought you here has spent years perfecting your marketing material. Each product.
Advertisements

Become a Panels Rockstar. Audience Survey Have you tried Panels? Are you a …. –Themer / Designer? –Developer / Code Junkie? –Information Architect?
Using Drupal for Your Organizational Website (or, how to use Drupal without cursing) Michelle Murrain Nonprofit Open Source Initiative MetaCentric Technology.
Members Only & Login Modules Members Only works with the Login module to provide password protection to Web pages and files. Login Groups may be created.
Seattle Drupal Clinic Introduction to Drupal and Web Content Management.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Easy Website Creation Using WordPress Welcome and Thank You to our Sponsors.
Drupal Online Tutorial A Product of an ENGL 421 class at Purdue University Page 1.
Our aims ease the pain – for all our users get with the times better communication with our supporters recruit and engage people to our campaigns raise.
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
By Laura Trawin.
Creating Online Class Communities Jennifer Dorman Discovery Education
UNIT-V The MVC architecture and Struts Framework.
Drupal Workshop Introduction to Drupal Part 1: Web Content Management, Advantages/Disadvantages of Drupal, Drupal terminology, Drupal technology, directories.
Walking the walk and talking the talk… T HE L ANGUAGE OF D RUPAL.
Drupal and the CMS Project. Lesson Learned #1 Keep your modules updated, especially when there are security concerns in the update notes 2010 | The Sky’s.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
1/30/11 Hacking your way through the Drupal API, a themers intro Baris Wanschers (BarisW)
HTML Forms What is a form.
Administration Tab CiviCRM. Data Organization in CiviCRM: "Building Blocks" Contacts Reports Mail Tags Activities Contribe Member Events and Event Attendences.
Server-side Scripting Powering the webs favourite services.
Nonprofit? There's an App for That! Drupal Modules for Activism, Donations and other Nonprofit #NYCCamp Benjamin J. Kallos iMediaEDGE
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
What is Drupal? Open Source software written in php. A CMS or content-management system. A sophisticated web application building tool.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Entities in Drupal 7 & the Entity API #sudrupalcamp April 6, 2013 JD Leonard ModernBizConsulting.com ModernBizConsulting.com ModernBizConsulting.com.
FACEBOOK IS THE BEST THING THAT EVER HAPPENED TO FRIENDSHIP WHY I LIKE FACEBOOK! By Mike Matthews.
Introduction to the Self-Service Engine Richard Oberlin NOCCCD Session B4 (Part 2)
A little PHP. Enter the simple HTML code seen below.
SHOPPING CARTS CHAPTER 19. E-COMMERCE Typically, an e-commerce site will have public pages and admin pages.
Introduction to eChalk For Students. What is eChalk? eChalk’s unique online learning environment provides your school with its own electronic “town square”
Office of Educational Technology School District of Philadelphia Introduction to Sites Google Sites This presentation is available at
Agenda Last class: Internet Literacy Lab Today: Internet Safety.
UNIT 14 1 Websites. Introduction 2 A website is a set of related webpages stored on a web server. Webmaster: is a person who sets up and maintains a.
TIMES 3 Technological Integrations in Mathematical Environments and Studies Jacksonville State University 2010.
Translating Drupal Websites Sean Burlington Quick run through  Translation generally  Lessons learned  Drupal specifics  String.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Drupal Commerce Better than Uber Andrew Root: druroot.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Drupal Overview Prepared by : Agustin D. Gumogda Jr. Instructor.
Introduction to Omeka. What is Omeka? - An Open Source web publishing platform - Used by libraries, archives, museums, and scholars through a set of commonly.
Seattle Drupal Clinic Introduction to Drupal Part 1: Web Content Management, Advantages/Disadvantages of Drupal, Drupal terminology.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Web page management system Jonathan Millis Educational Design Resources NTID at RIT.
Entities in Drupal 7 & the Entity API #sfdug March 11, 2013 JD Leonard ModernBizConsulting.com.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Welcome Welcome to the third part of this tracking system website tour! This tour is for (facilitators) those who coach/mentor or resource church planters.
Outline Working together Working with Nodes Working with Blocks Working with Taxonomy The Form API jQuery Summary.
How does Drupal Work? Information Systems 337 Prof. Harry Plantinga.
Introduction To HTML Form Inputs Written By George Gimian.
12/14/20151 Uniquescriptz Backend Support Document Ver 2.0.
 Shopping Basket  Stages to maintain shopping basket in framework  Viewing Shopping Basket.
CIS Intro to JAVA Lecture Notes Set July-05 GUI Programming –TextField Action Listeners, JEditorPane action listeners, HTML in a JEditorPane,
Social CRM March 7, The Case for Social CRM » On average 31% of people change their address every year New job Moving ISP change Change.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
MashupAds Lesson 1: Making a One-Way Widget Example: AT&T Store Locator Widget.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
SOCIAL MEDIA’S IMPACT ON PERSONAL BRANDING WHY YOUR DIGITAL FOOTPRINT MATTERS Image retrieved from socialmediatoday.com Created by Nicole Gennarelli.
Welcome Welcome to the third part of this tracking system website tour! This tour is for (facilitators) those who coach/mentor or resource church planters.
Fab25 User Training Cerium Labs LabCollector - LIMS Lynette Ballast.
INFM 700 Project 3 (Aqua) - Akashdeep Ray - Arnaud Lawson - Neha AR - Vidisha Vedvyas.
Joomla Awdhesh Kumar Singsys Pte Ltd. What is Joomla? Joomla is an award-winning content management system (CMS), which enables you to build Web sites.
Now login to your Distributor Panel on
TechKnowlogy Conference August 2, 2011 Using GoogleDocs for Collaboration.
Drupal Basics May 30, 2012 By Sean Fitzpatrick. Sean Fitzpatrick | Welcome We're going to talk about Drupal We're going to keep it pretty.
Project Management: Messages
Easy Website Creation Using WordPress
Presentation transcript:

Introduction to Module Development John Fiala and Ezra Barnett Gildesgame

What is a module? Apollo Lunar Service and Excursion Modules

What is a module? A piece of software that adds or extends functionality on a Drupal website

Adds functionality o Ubercart - Provides a sophisticated online store o Fivestar - Provides a star rating widget for rating content o Signup - Let's users sign up to attend events

Extends Functionality UC_Signup - Allows people to to pay for Ubercart Events Token - Many modules rely on Token to provide configurable messages including variable (like [user-name])

Often, adding a new feature entails extending or connecting existing features You usually don't have to start from scratch :) Fivestar stores data using the VotingAPI UC_Signup connects Ubercart and Signup Embedded Media Field provides a new field for use with the Content Construction Kit

Core, Contrib & Custom Core - Part of the official Drupal package. Everyone using Drupal has it Contrib - Publicly available optional download, not specific to a particular website. (Though sometimes specific to a kind of feature) Custom - Specific to a particular website. Useful for that website, but not generally useful to the public.

Drupal Community Check out the issue queue Find a related group on groups.drupal.org

Custom Modules Often avoidable Often necessary Usually cost more to maintain o API changes, version updates o Security o Feature additions o Friends you lose when you duplicate their module o (We still <8 you)

You usually don't have to start from scratch! Drupal Core and Contrib have nice systems that you can harness in your module o Displaying and processing forms for user input o Handling user accounts o Handling Content (Core node, contrib CCK) o Creating custom listings of content (Views)

And much, much more!

How do modules add or extend functionality?

With hooks I'm performing a particular action. Does anyone have anything to say about it? Person A: I'm getting up to get napkins. Does anybody want me to get anything else? Person B: Yes! Please get straws. Module A: I'm presenting a form to the user. Module B: Please add a checkbox to the form! A - The hook Definition B - The hook Implemenation

Examples of Hook Events Displaying a form to the user (hook_form_alter) o Add a custom checkbox A user signs up for an account (hook_user) o Display a friendly message Submitting a node (hook_nodeapi) o Store custom data in the database The website sends mail ( o Connect to an SMTP sever

Writing a module Create a.info file - Tell Drupal your module exists Create a.module file o Implement one or more hooks Create a.install file (optional)

Go to Your Basic Info File: ; $Id$ name = Example module description = "Gives an example of a module." core = 6.x Optional: package = Views dependencies[] = views dependencies[] = panels php = 5.1

How Do I Interact with a Form? hook_form_alter(&$form, $form_state, $form_id) The $form Array: (We'll get to this) The Form Status $form_state['values'] is what was entered Which Form Is This? Step 1: Use dpm($form_id); to find out! 6

Form Array? What? Something like this: $form['foo'] = array( '#type' => 'textfield', '#title' => t('bar'), '#default_value' => $object['foo'], '#size' => 60, '#maxlength' => 64, '#description' => t('baz'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); QuickStart:

How do you Interact with nodes? hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) The node to change What's happening to the node (There's a long list): delete/insert/update/view/validate Extra data: if 'view', then $teaser, if 'validate', then $form. Extra data: if 'view' then $page 6

What about interacting with User accouts. hook_user($op, &$edit, &$account, $category = NULL) What the User is Doing (Again, a list, but...) delete/insert/load/login/l ogout/register/update /etc, etc, etc Form Values submitted The User's User Object (Why isn't it $user?) $category - the category of User Info being changed

So, let's throw something together...

Modules That Help Build Modules

Token

Image Credits Tube Man NASA Toys pollo.html

Updating Modules from 5.x to 6.x Form API Reference - rms_api_reference.html/6 Form API Quickstart - s_api.html "Easy" d.o Newbie tag ects=&assigned=&submitted=&participant=&status %5B%5D=Open&issue_tags=Newbie