• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
When Webform and Feeds Aren't Enough
 

When Webform and Feeds Aren't Enough

on

  • 1,020 views

 

Statistics

Views

Total Views
1,020
Views on SlideShare
964
Embed Views
56

Actions

Likes
0
Downloads
5
Comments
0

2 Embeds 56

http://www.forumone.com 38
http://forumone.com 18

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    When Webform and Feeds Aren't Enough When Webform and Feeds Aren't Enough Presentation Transcript

    • WHEN WEBFORM AND FEEDS AREN’T ENOUGH ^AND NODESMonday, July 30, 2012
    • WELCOME!2 Monday, July 30, 2012
    • ABOUT ME / US Keenan  Holloway  ::  Developer FORUM  ONE  ::  forumone.comMonday, July 30, 2012
    • THIS SESSION WILL COVER: An  overview  of  the  Data  module -­‐  What  it  does,  Strengths,  Weaknesses Various  valuable  uses -­‐  CreaHng/Defining  Data -­‐  ManipulaHng  Data  through  custom  Forms  module,  Direct   database  insert,  and  Views -­‐  InteracHng  with  data  through  Views  and  PanelsMonday, July 30, 2012
    • WHAT IT DOES Helps  you  model,  manage  and  query  custom   tables. Offers  an  administra@on  interface  and  a  low   level  API  for  manipula@ng  tables  and   accessing  their  contents. Provides  Views  integra@on.Monday, July 30, 2012
    • STRENGTHS Great  for  flat  simple  data  sets. Great  for  data  that  is  frequently  updated. Great  for  custom  module  interac@on. Simplis@c  table  design. Built  on  en@ty  framework. Integrates  with  views.Monday, July 30, 2012
    • WEAKNESSES Quite  a  few  bugs  present  most  likely  as  a   result  of  updated  support  modules. Coding  required  for  complex  table   rela@onships. Search  and  Feeds  integra@on  are  a  liLle   buggy  and  require  numerous  patches.Monday, July 30, 2012
    • DATA VS NODES8 Monday, July 30, 2012
    • CAPITAL BIKESHARE LETS BUILD IT! capitalbikeshare.com9 Monday, July 30, 2012
    • 2012 Q1 TRIP HISTORY DATA id;  bikeid;  sta+onid ;W00006    ;  31237 ;W00008    ;  31238 ;W00009    ;  31011 ;W00010    ;  31305 ;W00012    ;  31622 ;W00013    ;  31703 ;W00014    ;  31108 ;  ...  ;  ...Monday, July 30, 2012
    • MODULE VERSIONS data-­‐7.x-­‐1.x-­‐dev -­‐  Must  Install  Patch -­‐  h;p://drupal.org/node/1412014#comment-­‐5697626 ctools-­‐7.x-­‐1.x-­‐dev views-­‐7.x-­‐3.x-­‐dev panels-­‐7.x-­‐3.x-­‐devMonday, July 30, 2012
    • WE NEED BIKE STATIONSMonday, July 30, 2012
    • WE NEED BIKESMonday, July 30, 2012
    • LETS ADOPT THEMMonday, July 30, 2012
    • DEMONSTRATION TIME!15 Monday, July 30, 2012
    • sites/all/modules/contrib/bikes/bikes.info name  =  Bikes descrip/on  =  Form  UI  to  add  addi/onal  bikes. package  =  Bikes core  =  7.x php  =  5.2Monday, July 30, 2012
    • sites/all/modules/contrib/bikes/bikes.module <?php /**  *  Implements  hook_menu().  */ func/on  bikes_menu()  {    //  Add  menu  item  callback  for  custom  form    $items[bikes/add]  =  array(        type  =>  MENU_CALLBACK,            page  callback  =>  drupal_get_form,            page  arguments  =>  array(bikes_myform),  //  Returns  our  custom  form  item            access  arguments  =>  array(access  content),  //  Sets  access  to  see  this  form        );    return  $items; }Monday, July 30, 2012
    • sites/all/modules/contrib/bikes/bikes.module  (Con@nued...) /*  *  Defines  the  custom  input  form  */ func/on  bikes_myform()  {    //  Define  form  input  field  for  Bike  ID    $form[id]  =  array(        #type  =>  tex]ield,        #/tle  =>  t(Bike  ID),        #size  =>  30,        #maxlength  =>  64,        #descrip/on  =>  t(Enter  the  ID  of  the  bike.),    );    //  Define  form  input  field  for  Sta/on  ID    $form[sta/on_id]  =  array(        #type  =>  tex]ield,        #/tle  =>  t(Sta/on  ID),        #size  =>  30,        #maxlength  =>  64,        #descrip/on  =>  t(Enter  the  sta/on  ID  of  the  bike.),    );    //  Define  form  submit  bucon    $form[submit]  =  array(#type  =>  submit,  #value  =>  t(Save));    return  $form; }Monday, July 30, 2012
    • sites/all/modules/contrib/bikes/bikes.module  (Con@nued...) /*  *  Defines  submit  opera/ons  */ func/on  bikes_myform_submit($form,  &$form_state)  {    //  On  submit,  insert  the  Bike  ID  and  Sta/on  ID  fields  into  the  bikes  table    db_insert(bikes)    -­‐>fields(array(        bikeid  =>  $form_state[values][id],        sta/onid  =>  $form_state[values][sta/on_id],    ))    -­‐>execute();    //  Set  the  confirma/on  message    drupal_set_message(t(Your  form  has  been  saved.)); }Monday, July 30, 2012
    • WHAT WE COVERED: An  overview  of  the  Data  module -­‐  What  it  does,  Strengths,  Weaknesses Various  valuable  uses -­‐  CreaHng/Defining  Data -­‐  ManipulaHng  Data  through  custom  Forms  module,  Direct   database  insert,  and  Views -­‐  InteracHng  with  data  through  Views  and  PanelsMonday, July 30, 2012
    • THANKS! QUESTIONS AND ANSWERS21 Monday, July 30, 2012
    • CONTACT / RESOURCES Email:  holloway.keenan@gmail.com Drupal.org:  deviantpixel Presenta@on:  forumone.com/capitalcamp2012 Addi@onal:  forumone.com/blogs/post/drupal-­‐tutorial-­‐pushing-­‐ drupal-­‐6-­‐core-­‐auto-­‐completeMonday, July 30, 2012