You are previewing Drupal 7 First Look.
O'Reilly logo
Drupal 7 First Look

Book Description

Learn the new features of Drupal 7, how they work and how they will impact you

  • Get to grips with all of the new features in Drupal 7

  • Upgrade your Drupal 6 site, themes, and modules to Drupal 7

  • Explore the new Drupal 7 administration interface and map your Drupal 6 administration interface to the new Drupal 7 structure

  • Complete coverage of the DBTNG database layer with usage examples and all API changes for both Themes and Modules

  • Also includes an Appendix that introduces the beta release for Drupal 7. It is not a part of the book (print or e-book) but only available for free download

In Detail

Drupal 7 contains features for which site administrators have been clamoring for years, including support for fields, an improved administration interface, better database support, improved theming, and more. You could of course make a laborious search on sites, blogs, and many online tutorials that would promise to update you about every new feature, but there's an even better way to know all about Drupal 7's new features: Drupal 7 First Look is the first and only book that covers all of the fantastic new features in Drupal 7 in depth and covers the process of upgrading your Drupal 6 site to Drupal 7. If you've used Drupal 6 and want to use Drupal 7, you need this book.

Drupal 7 First Look takes an in-depth look into all of the major new features in Drupal 7 so you can quickly take full advantage of Drupal 7. It also assists you in upgrading your site to Drupal 7. Some of the new features in Drupal 7 include:

  • Fields API, based on Drupal 6 CCK, which allows you to easily build your own content types

  • Improved user interface for administering your website

  • Built-in support for working with images and files

  • Improved security for the site and users of the site

  • Completely rewritten database layer DBTNG to make working with the database easier and more secure.

  • Improved API for custom module development and user interface theming

This book is your one-stop shop to know and utilize all of the major new features of Drupal 7

Table of Contents

  1. Drupal 7 First Look
    1. Drupal 7 First Look
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    6. 1. What's New In Drupal 7?
      1. Goals of Drupal 7
      2. Key new features in Drupal 7
        1. Improved installation
        2. New administration toolbar and overlay administration
        3. Improved interface for creating content
        4. Improved interface for creating new content types
        5. New Field API
        6. Additional support for files and images
        7. Improved filter system
        8. Added context information to messages during translation
        9. Built-in automated cron functionality
        10. Improved security
        11. Added a new plugin manager
        12. Added the Seven theme for administration
        13. Added the jQuery UI to core
        14. Allows additional preprocessing of themed information
        15. Added the New Stark theme
        16. Rewritten database layer (DBTNG)
        17. Improved node access system
        18. Added the Queue API for long-running tasks
        19. Added a new test framework
        20. RDF capabilities
      3. Unmet goals
      4. Key changes to Drupal 7
      5. Removed functionality
      6. Contributed modules
      7. Minimum requirements for Drupal 7
      8. Summary
    7. 2. Installation and Upgrades
      1. Installing Drupal 7
        1. Obtaining Drupal
        2. Selecting an installation profile
          1. Minimal profile
          2. Standard profile
        3. Language selection
        4. Requirements check
        5. Database configuration
        6. Configure site
        7. New home page
      2. Command-line installation
      3. Upgrading from Drupal 6 to Drupal 7
      4. Creating custom installation profiles
        1. Components of an installation profile
          1. The .info file
          2. The .profile file
          3. The .install file
            1. File structure
            2. Block creation
            3. Node type definition
            4. Additional default settings
            5. Setting up permissions and roles
            6. Theme configuration
      5. Summary
    8. 3. Site Building with Drupal 7
      1. Creating content
        1. Selecting a content type to create
        2. Content UI
          1. Creating node summaries
          2. Formatting text
          3. Additional node properties
      2. Creating new content types with custom fields
        1. Creating a custom content type
          1. Additional content type properties
            1. Display settings
            2. Comment settings
            3. Menu settings
        2. Field API
          1. Boolean fields
          2. Numeric fields (Decimal, Float, and Integer)
          3. File fields
          4. Term Reference fields
          5. Text fields
            1. Text field
            2. Long text field
            3. Long text and summary field
        3. Field display
      3. Taxonomy changes
      4. Image styles
      5. Comment changes
      6. Removed functionality
      7. Summary
    9. 4. Drupal 7 Administration
      1. New administration interface
        1. Administration toolbar
        2. Dashboard
        3. Overlay window
        4. Appearance section
          1. Installing and updating themes and modules
            1. Installing new themes and modules
            2. Updating themes and modules
        5. People section
        6. Modules section
        7. Configuration section
          1. Configuring settings
            1. Regional and language
              1. Regional settings
              2. Date and time
              3. Language
              4. Translate interface
            2. Search and metadata
              1. Clean URLs
              2. Search settings
              3. URL aliases
            3. Development
              1. Logging and errors
              2. Maintenance mode
              3. Performance
              4. Testing
            4. Media section
              1. File system
              2. Image styles
              3. Image toolkit
            5. System section
              1. Site information
              2. Actions
              3. Shortcuts
              4. Statistics
            6. People and permissions section
              1. Account settings
              2. Roles
              3. Permissions
              4. IP address blocking
              5. Profiles
            7. Web Services section
              1. Feed aggregator
              2. RSS publishing
            8. Content Authoring section
              1. Text formats
        8. Shortcuts
        9. Edit Anywhere
      2. Configuring Date and Time display
      3. User management
        1. Account settings
        2. User fields
        3. Password strength meter
        4. Login rate limitations
      4. Search
      5. Changes to the cron system
        1. Protection from unauthorized access
      6. Reports
        1. Field list report
      7. Summary
    10. 5. Drupal 7 for Themers
      1. Template changes
        1. Everything there is to know about .info files
        2. html.tpl.php
        3. Rendering the entire page with page.tpl.php
        4. Theming individual regions with region.tpl.php
        5. Theming individual nodes with node.tpl.php
        6. template.php
        7. Other changes
      2. New JavaScript functionality
        1. jQuery tools
        2. AJAX framework from CTools
        3. Including other JavaScript libraries
      3. CSS changes
        1. System classes
        2. Classes array
        3. Hiding information
      4. Theme API changes
        1. Signature changes
        2. Alter hooks
        3. New methods
          1. template_preprocess_menu_tree(&$variables)
          2. template_preprocess_username(&$variables)
          3. template_process_username(&$variables)
          4. theme_admin_block($variables)
          5. theme_confirm_form($variables)
          6. theme_container($variables)
          7. theme_dashboard($variables)
          8. theme_dashboard_admin($variables)
          9. theme_dashboard_disabled_block($variables)
          10. theme_dashboard_disabled_blocks($variables)
          11. theme_dashboard_region($variables)
          12. theme_filter_guidelines($variables)
          13. theme_form_element_label($variables)
          14. theme_form_required_marker($variables)
          15. theme_forum_form($variables)
          16. theme_html_tag($variables)
          17. theme_image_anchor($variables)
          18. theme_image_crop_summary($variables)
          19. theme_image_resize_summary($variables)
          20. theme_image_rotate_summary($variables)
          21. theme_image_scale_summary($variables)
          22. theme_image_style_effects($variables)
          23. theme_image_style_list($variables)
          24. theme_image_style_preview($variables)
          25. theme_link($variables)
          26. theme_locale_date_format_form($variables)
          27. theme_locale_languages_configure_form($variables)
          28. theme_locale_translation_filters($variables)
          29. theme_menu_link(array $variables)
          30. theme_menu_local_action($variables)
          31. theme_rdf_metadata($variables)
          32. theme_rdf_template_variable_wrapper($variables)
          33. theme_shortcut_set_customize($variables)
          34. theme_system_compact_link()
          35. theme_system_date_time_settings($variables)
          36. theme_system_modules_fieldset($variables)
          37. theme_system_modules_incompatible($variables)
          38. theme_system_run_cron_image($variables)
          39. theme_system_settings_form($variables)
          40. theme_system_themes_page($variables)
          41. theme_text_format_wrapper($variables)
          42. theme_update_last_check($variables)
          43. theme_update_manager_update_form($variables)
          44. theme_user_admin_permissions($variables)
          45. theme_vertical_tabs($variables)
        4. Removed methods
      5. Upgrading Drupal 6 themes to Drupal 7
      6. Summary
    11. 6. Drupal 7 Database Changes
      1. What is DBTNG?
        1. Background
      2. Key concepts in DBTNG
        1. Drivers
        2. Connections
        3. Statements
        4. Queries
      3. Using select statements
        1. Static queries
          1. Limiting the data returned
          2. Adding parameters to static queries
          3. Query options
          4. Saving query results to a temporary table
        2. Dynamic queries
        3. Working with fields
        4. Ordering results
        5. Joining tables
        6. Preventing duplicate records
        7. Retrieving summary information
        8. Using expressions to retrieve and manipulate data
        9. Limiting the data returned
      4. Dynamic query extensions
        1. Paging records
        2. Sorting data
        3. Custom extensions
      5. Adding conditions to a query
        1. Condition method
        2. Where method
        3. Chaining conditions
      6. Working with result sets
        1. fetch and fetchAll
        2. fetchObject
        3. fetchAssoc
        4. fetchAllAssoc
        5. fetchField
        6. fetchAllKeyed
        7. fetchCol
        8. Direct iteration
      7. Tagging queries
      8. insert statement syntax
        1. Inserting single records
        2. Inserting multiple records
        3. Inserting records from another query
        4. Delayed inserts
      9. update statement syntax
      10. merge statement syntax
      11. delete statement syntax
      12. truncate statement syntax
      13. Transaction support
      14. Master/slave replication
      15. SQLite support
      16. Summary
    12. 7. Drupal 7 for Developers
      1. .info file changes
      2. Drupal hook changes
        1. Hooks split by op code
        2. Other changed hooks
          1. hook_load
          2. hook_system_info_alter
          3. hook_view
        3. New hooks
          1. hook_admin_paths
          2. hook_admin_paths_alter
          3. hook_archiver_info
          4. hook_css_alter
          5. hook_dashboard_regions
          6. hook_dashboard_regions_alter
          7. hook_date_formats
          8. hook_date_formats_alter
          9. hook_date_format_types
          10. hook_drupal_goto_alter
          11. hook_library
          12. hook_library_alter
          13. hook_modules_disabled
          14. hook_modules_enabled
          15. hook_modules_installed
          16. hook_modules_uninstalled
          17. hook_openid
          18. hook_openid_response
          19. hook_path_delete
          20. hook_path_insert
          21. hook_path_update
          22. hook_registry_files_alter
          23. hook_overlay_child_initialize
          24. hook_overlay_parent_initialize
          25. hook_shortcut_default_set
          26. hook_system_info_alter
          27. hook_url_inbound_alter
          28. hook_url_outbound_alter
          29. hook_username_alter
          30. hook_xmlrpc_alter
          31. module_hook_info
        4. Removed methods
      3. Menu system changes
        1. New hooks
          1. hook_menu_active_handler_alter
          2. hook_menu_contextual_links_alter
          3. hook_menu_delete
          4. hook_menu_insert
          5. hook_menu_local_tasks_alter
          6. hook_menu_update
        2. New methods
        3. Changed methods
          1. menu_execute_active_handler
          2. menu_get_names
          3. menu_local_tasks
          4. menu_router_build
          5. menu_tree_all_data
          6. menu_tree_data
          7. menu_tree_page_data
        4. Removed methods
      4. Form API changes
        1. New Form API hooks
          1. hook_element_info
          2. hook_element_info_alter
          3. hook_form_system_theme_settings_alter
          4. hook_node_prepare
        2. Changed methods
          1. form_type parameter renamed
          2. drupal_rebuild_form
          3. drupal_redirect_form
          4. form_builder
          5. form_set_error
          6. form_type_image_button_value
        3. New methods
        4. Removed methods
      5. File handling system
        1. New file hooks
          1. hook_file_copy
          2. hook_file_delete
          3. hook_file_insert
          4. hook_file_load
          5. hook_file_mimetype_mapping_alter
          6. hook_file_move
          7. hook_file_references
          8. hook_file_update
          9. hook_file_url_alter
          10. hook_file_validate
        2. Changed hooks
        3. New and changed methods
          1. PHP method wrappers
          2. File IO
          3. File information
          4. Stream wrapper implementations
          5. URI and URL handling
          6. .htaccess file protection
        4. Removed methods
      6. Field API
        1. Entities
        2. Field types
        3. Field instances
        4. Field bundles
        5. Displaying fields in forms with field widgets
        6. Displaying field data
        7. Saving, retrieving, and deleting field data
        8. Getting information about fields
      7. Node access and permission changes
        1. Added methods
          1. hook_node_access
          2. hook_node_access_records_alter
          3. hook_node_grants_alter
          4. hook_user_cancel
          5. hook_user_cancel_methods_alter
          6. hook_user_role_delete, hook_user_role_insert, and hook_user_role_update
          7. node_list_permissions
          8. node_permissions_get_configured_types
          9. user_role_permissions
          10. user_role_grant_permissions, user_role_change_permissions, and user_role_revoke_permissions
        2. Changed methods
      8. Text filter changes
          1. hook_filter_format_delete
          2. hook_filter_format_insert
          3. hook_filter_format_update
          4. hook_filter_info
          5. hook_filter_info_alter
        1. Removed methods
      9. Taxonomy changes
          1. hook_taxonomy_term_delete
          2. hook_taxonomy_term_insert
          3. hook_taxonomy_term_load
          4. hook_taxonomy_term_update
          5. hook_taxonomy_vocabulary_delete
          6. hook_taxonomy_vocabulary_insert
          7. hook_taxonomy_vocabulary_load
          8. hook_taxonomy_vocabulary_update
        1. Removed methods
      10. Searching changes
        1. Added methods
          1. hook_search_access
          2. hook_search_admin
          3. hook_search_execute
          4. hook_search_info
          5. hook_search_reset
          6. hook_search_status
          7. hook_node_search_result
          8. hook_node_update_index
          9. hook_ranking
        2. Changed methods
        3. Removed methods
      11. Cron changes
          1. hook_cron_queue_info
      12. Tokens
        1. hook_tokens
        2. hook_token_info
        3. hook_token_info_alter
        4. token_info
      13. Image handling
        1. hook_image_default_styles
        2. hook_image_styles_alter
        3. hook_image_style_delete
        4. hook_image_style_flush
        5. hook_image_style_save
        6. hook_image_effect_info
        7. hook_image_toolkits
      14. Trigger changes
      15. RDF API
      16. Translation API changes
        1. hook_language_fallback_candidates_alter
        2. hook_language_negotiation_info
        3. hook_language_negotiation_info_alter
        4. hook_language_switch_links_alter
        5. hook_language_types_info
        6. hook_language_types_info_alter
        7. hook_multilingual_settings_changed
        8. hook_node_prepare_translation
      17. Coder module
      18. Testing framework
        1. Setting up SimpleTest
        2. Running tests
        3. Creating Tests
        4. Available hooks
          1. hook_test_finished
          2. hook_test_group_started
          3. hook_test_group_finished
          4. hook_simpletest_alter
      19. Summary