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.

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

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

Transliteration Provides one-way string transliteration (romanization) and cleans file names during upload by replacing unwanted characters. Generally spoken, it takes Unicode text and tries to represent it in US-ASCII characters (universally displayable, unaccented characters) by attempting to transliterate the pronunciation expressed by the text in some other writing system to Roman letters. According to Unidecode, from which most of the transliteration data has been derived, "Russian and Greek seem to work passably. But it works quite bad on Japanese and Thai." Do I need to use transliteration for uploaded files? This question can't be generally answered, rather it depends on what you want to do with user submitted file uploads. you let users upload files to your site and offer these files as download without PHP processing, and you're on Drupal 6 or later, and not using a Windows-based web server. By enabling this module, it will be easier for people to search with or without accents. Credits Authors:

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 Token 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 #D7AX - I pledge to make this module as accessible as it can be.

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.

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

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 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'.

Views Slideshow Views Slideshow can be used to create a slideshow of any content (not just images) that can appear in a View. Powered by jQuery, it is heavily customizable: you may choose slideshow settings for each View you create. Potential uses News item slideshow (such as the title, image and teaser of the last 5 news articles submitted) The Last X number of X submitted (images, videos, blog entries, forum posts, comments, testimonials, etc.). Rotate any image, based on any filters you can apply in views. The possibilities are really endless, as the more ways you can think of to categorize and add to views, the more you can rotate. Views Slideshow Installation and Configuration Related modules Requirements Views Slideshow 2.x requires Views 2.Views Slideshow ThumbnailHover 2.1+ requires Views 2.7+.Views Slideshow 3.x requires Views 3. There is no upgrade path from views slideshow 2 to views slideshow 3. Unless you use jquery_update module the latest version of jquery cycle won't work for Drupal 6.

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

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)

Views You need Views if You like the default front page view, but you find you want to sort it differently. You like the default taxonomy/term view, but you find you want to sort it differently; for example, alphabetically. You use /tracker, but you want to restrict it to posts of a certain type. You like the idea of the 'article' module, but it doesn't display articles the way you like. You want a way to display a block with the 5 most recent posts of some particular type. Views can do a lot more than that, but those are some of the obvious uses of Views. Views for Drupal 8 Views is in Drupal 8 Core! Recommended versions of Views! For new installs of Drupal 6, we recommend the 6.x-3.x branch. The 6.x-2.x branch of Views is in critical/security maintenance mode only. Dependencies The Drupal 7 version of Views requires the Chaos Tool Suite also known as CTools. Views' bug squad Views documentation Views 1 Views 2 (This link goes to the Advanced Help project page. Sponsorship Our book

Related: