background preloader

Token

Token
Tokens are small bits of text that can be placed into larger documents via simple placeholders, like %site-name or [user]. The Token module provides a central API for modules to use these tokens, and expose their own token values. Note that Token module doesn't provide any visible functions to the user on its own, it just provides token handling services for other modules. For Drupal 6, the Token module provides a "Token Actions" module which can be enabled separately. Modules that use the Token module and provide tokens via the API include Organic Groups, Pathauto, Comment Notify, and Commerce. Pledges #D7CX: The basic token API is now a part of Drupal 7! #D7AX - I pledge to make this module as accessible as it can be. Related:  Drupal 7 : Essential Modules

Panels An Overview of Panels The Panels module allows a site administrator to create customized layouts for multiple uses. At its core it is a drag and drop content manager that lets you visually design a layout and place content within that layout. Integration with CTools module Panels 3 utilizes the CTools' system of "context" so that the content you place on the page can be aware of what is being displayed. Panels uses Contexts - What are they? In a Panel, you can create contexts, which represent the objects being displayed. In addition, these contexts can be checked for information and use that not only to make content available to be displayed, but to choose which layout to display! Panels also includes simpler applications of the drag and drop system. Panels can also be used for items smaller than pages. Other Features of Panels Panels supports styles, which can control how individual content panes, regions within a panel, and the entire panel will be rendered. Known Issues Status of Panels

Pathauto The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123 . The aliases are based upon a "pattern" system that uses tokens which the administrator can change. Requirements Versions The 7.x-1.x and 6.x-2.x branches are currently accepting new feature requests and are kept in sync as much as possible. Known issues Multilingual URL alias support is still a little unstable and should be tested before used in production. Recommended modules Redirect (D7) / Path Redirect (D6) when installed Pathauto will provide a new "Update Action" in case your URLs change. Co-Maintainers Pathauto was originally written by mikeryan and maintained by Greg Knaddison (greggles) . Pledges #D8CX : I pledge that Pathauto will have a full Drupal 8 release on the day that Drupal 8 is released. Downloads

drupal_set_message | bootstrap.inc Sets a message to display to the user. Messages are stored in a session variable and displayed in page.tpl.php via the $messages theme variable. Example usage: drupal_set_message(t('An error occurred and processing did not complete.'), 'error'); Parameters string $message: (optional) The translated message to be displayed to the user. string $type: (optional) The message's type. 'status''warning''error' bool $repeat: (optional) If this is FALSE and the message is already set, then the message won't be repeated. Return value array|null A multidimensional array with keys corresponding to the set message types. See also drupal_get_messages() theme_status_messages() 265 calls to drupal_set_message() File includes/bootstrap.inc, line 1777 Functions that need to be loaded on every Drupal request. Code

ImageAPI This API is meant to be used in place of the API provided by image.inc. You probably do not need to install this module unless another module are you using requires it. It provides no new features to your Drupal site. This module is specifically for Drupal 6 and older. Differences from Drupal core's image.inc Images are objects.Images are not written on each image operation and must be explicitly closed when processing is complete. Related Modules Weight This module adds a weight option to enabled node types. Nodes with lower weight will float to the top of lists, while heavier items will sink. You might be interested in reading Comparison of Node Ordering Modules. This is useful for sorting non-chronological nodes like bios, e-commerce products, or whatever you would like. Nodes will be sorted first by stickiness, then by weight, then by creation date. With support for 7.x, the support for 5.x ends. Version 7.x-2.x is currently the recommended and supported release for Drupal 7. Issues As with all contributed modules, when considering submitting an issue: Read the documentation (two or three times is better). Development version status The development versions (-dev, which rolls up at Noon and Midnight GMT) are where the newest stuff is, including any bug fixes and new features.

Devel A suite of modules containing fun for module developers and themers ... Devel Helper functions for Drupal developers and inquisitive admins. This module can print a summary of all database queries for each page request at the bottom of each page. The summary includes how many times each query was executed on a page (shouldn't run same query multiple times), and how long each query took (short is good - use cache for complex queries).Also a dprint_r($array) function is provided, which pretty prints arrays. Useful during development. Generate content Accelerate development of your site or module by quickly generating nodes, comments, terms, users, and more. Devel Node Access (DNA) View the node access entries for the node(s) that are shown on a page.

Administration menu Provides a theme-independent administration interface (aka. navigation, back-end). It's a helper for novice users coming from other CMS, a time-saver for site administrators, and useful for developers and site builders. Administrative links are displayed in a CSS/JS-based menu at the top on all pages of your site. It not only contains regular menu items — tasks and actions are also included, enabling fast access to any administrative resource your Drupal site provides. Showcase and Quality Assurance Test-drive in various themes on the demonstration site or watch a short demo reel or a installation tutorial video. Behaviour and Integration Works in all themes and all browsers.Exposes all administration links including all tabs/tasks and actions to provide direct access to any page.Extensible with add-on features by other modules. Related modules Installation Documentation Credits Current maintainers: This project has been sponsored by: unleashed mind Drupal consulting and development.

Form API Quickstart Guide Note that these instructions focus on Drupal 6. Corresponding documentation for Drupal 7 is here. The Drupal Form API provides sophisticated form techniques and also allows for almost unlimited possibilities for custom theming, validation, and execution of forms. Even better, ANY form (even those in core) can be altered in almost any way imaginable—elements can be removed, added, and rearranged. Perhaps most important, the Form API provides a secure framework for forms, protecting against many exploits, and the programmer has to do almost nothing to get this protection. This page is certainly not a comprehensive guide to this functionality. Jump to sections on creating, theming, validating, submitting and understanding the flow. Creating Forms <? Create a submit button: <? a few things to note: The element's name property is declared in the $form array, at the very end of the array tree. Let's take a look at a working piece of code using the API: drupal_get_form does the following: Theming Forms

Printer, e-mail and PDF versions This module allows you to generate the following printer-friendly versions of any node: Printer-friendly version (webpage format) (at www.example.com/print/nid)PDF version (at www.example.com/printpdf/nid)EPUB version (at www.example.com/printepub/nid)Send by email (at www.example.com/printmail/nid) where nid is the node id of content to render. Important: The current versions of the module require at least Drupal 6.11 or 7.0. By editing the default print.css or specifying your own CSS file and/or the print.tpl.php files, it is possible to change the look of the output page to suit your taste. Drupal 6: print[_html|_mail|_pdf][.node-node-type].tpl.php located in either the current theme or the module directory. Drupal 7: print[--html|--mail|--pdf][--node--node-type].tpl.php located in the current theme directory. Where node-type is Drupal's node type (e.g. page, story, etc.). You must install one of the following third-party tools to generate PDFs: PHPePub (only in the 7.x-2.x branch)

Chaos tool suite (ctools) This suite is primarily a set of APIs and tools to improve the developer experience. It also contains a module called the Page Manager whose job is to manage pages. In particular it manages panel pages, but as it grows it will be able to manage far more than just Panels. For the moment, it includes the following tools: Plugins -- tools to make it easy for modules to let other modules implement plugins from .inc files. Exportables -- tools to make it easier for modules to have objects that live in database or live in code, such as 'default views'.

References This project provides D7 versions of the 'node_reference' and 'user_reference' field types, that were part of the CCK package in D6, at functional parity with the D6 counterparts. See for details. Note for users upgrading from References 7.x-2.0-beta3 There were a couple changes in the way 'References' views are handled ("referenceable nodes/users defined by a view"), which might require double-checking those existing on your site: The 'label' (node title or user name) is no longer automatically added if not included in the view. Note for users upgrading from CCK D6 The References project integrates with the content_migrate module present in CCK 7.x-2.x-dev to allow the migration of field definitions and field values from D6 nodereference and userreference fields. Similar modules:

Entity API This module extends the entity API of Drupal core in order to provide a unified way to deal with entities and their properties. Additionally, it provides an entity CRUD controller, which helps simplifying the creation of new entity types. Requirements Drupal 7.2 or later; suggested Drupal >= 7.15 Documentation You can find documentation in the handbooks. Overview For site-builders This is an API module, so it doesn't provide any end-user features. A Views display plugin and field to render or link to any entity (by view-mode)A CTools content plugin to render any entity (by view-mode)It ships with the Entity tokens module which makes sure there are tokens for most entity properties and fields, i.e. it provides token replacements for all entity properties (or fields) that have no tokens and are known to the entity module (read about the entity property info API below). For developers Changes Credits The project has been sponsored by Maintainer Wolfgang Ziegler (fago)

Form generation | form.inc Functions to enable the processing and display of HTML forms. Drupal uses these functions to achieve consistency in its form processing and presentation, while simplifying code and reducing the amount of HTML that must be explicitly generated by modules. The primary function used with forms is drupal_get_form(), which is used for forms presented interactively to a user. drupal_get_form() handles retrieving, processing, and displaying a rendered HTML form for modules automatically. Here is an example of how to use drupal_get_form() and a form builder function: $form = drupal_get_form('my_module_example_form'); ... function my_module_example_form($form, &$form_state) { $form['submit'] = array( '#type' => 'submit', '#value' => t('Submit'), ); return $form; } function my_module_example_form_validate($form, &$form_state) { } function my_module_example_form_submit($form, &$form_state) { } Or with any number of additional arguments: See drupal_build_form() for documentation of $form_state keys. File

Related: