background preloader

Drupal

Facebook Twitter

La page d'accueil. Form API Reference. Drupal 7 Javascript exemple Ajax Framework à partir d'un lien. For a Daily Dose of Drupal episode that covers this blog post topic as well, take a look at Drupal 7 Ajax Framework Link Example .

Drupal 7 Javascript exemple Ajax Framework à partir d'un lien

After struggling to find documentation on how to take advantage of the Drupal Ajax Framework with just a simple HTML link I decided to provide an example to anyone else who might be struggling with the same problem. The documentation on drupal.org is very detailed, however most of the documentation centers around using the Drupal 7 Ajax Framework with forms. Effet miroir sur une image avec le canvas HTML5. Comment créer et appliquer des styles d’images avec Drupal 7 via le code. Reset admin password in drupal 7. Views : afficher du contenu hierarchisé. Cet article est la traduction du billet de Michael Anello : Displaying Hierarchical Content.

Views : afficher du contenu hierarchisé

Vous connaissez Michael Anello : vous avez été nombreux à lire et, je n'en doute pas ;-) , apprécier son papier sur Blueprint CSS. Dans Displaying Hierarchical Content il aborde notamment une des fonctionnalités de Views : les relations. Avec son accord, ses exemples ont été francisés et j'ai également détaillé le processus CCK de création des types de contenus personnalisés qu'il utilise pour l'article. Afficher du contenu de façon hiérarchisée est un besoin courant pour les sites pilotés par bases de données. The JIT. The JIT (Javascript InfoVis Toolkit) module provides integration with the Javascript InfoVis Toolkit ( and Drupal.

The JIT

The JIT is a javascript information visualization library that enables interactive visualizations of data using only html, css and javascript. 7.x The 7.x version is useful for site builder when installing graphapi which provides views integration. See the screenshots which are from the 7.x version 6.x. Search for taxonomy_get.

Modules

Migrate. Theming. Comment créer et mettre à jour un node par la programmation. Bien que cela puisse paraître compliqué de l’extérieur, créer et modifier des contenus Drupal sans l’aide de l’interface d’administration est une chose relativement simple lorsque l’on s’est déjà confronté au problème. Néanmoins il faut être prudent avec ce que vous voulez sauvegarder, puisqu’en outrepassant le système naturel de création de contenus via l’interface d’admin vous avez la possibilité de faire tout et n’importe quoi et d’empêcher les autres modules de fonctionner correctement. Voici donc un poste très simple sur la création de nodes via la programmation. 1.1 Initialisation de l’objet node Notes : - Définition de la langue : Si le module Locale n’est pas activé sur votre site, utilisez la constante LANGUAGE_NONE afin de ne pas spécifier de langue en particulier à votre contenu, sinon insérez la langue désirée. - Node_object_prepare() : remplit par défaut certaines valeurs telles que le statut, la promotion en page d’accueil, les commentaires ou encore le sticky.

Drupal Development, Alfresco Development and SproutCore Development from Appnovation. Wonder Drupal. Rendering Drupal 7 fields (the right way) The short answer.

Rendering Drupal 7 fields (the right way)

Use field_view_field()! The long answer. Drupal 7 brought us Entities, and with them the powerful Field API for 'storing, loading, editing, and rendering field data.' attached to them. If you're managing everything through 'manage fields' and 'manage display' tabs of your content type, then every part of that process is rather wonderfully taken care of for you. We often, however, come across the need to render a field outside the context of it's entity. Taxonomy CSV import/export help. This module allows to import/export taxonomies, structures or simple lists of terms into/from a vocabulary from/to a CSV file, a url or a copy-and-paste text.

Taxonomy CSV import/export help

CSV format is a simple list of values separated by a delimiter, often comma (,) or semicolon (;), and enclosures, often quotation marks ("). If you are unsure how to create a CSV file, you might want to use LibreOffice Calc or another spreadsheet application to export your data into a CSV file. Specific import or export formats can be added simply by a plug-in mecanism (or ask author!). After enabling the module, permissions "import taxonomy by csv" and "export taxonomy by csv" need to be set. Main "administer taxonomy" permission is not needed to use module, but this is recommended. Drupal 7 Database Schema. Drupal7_model_0.png (2553×2399) Token. Tokens are small bits of text that can be placed into larger documents via simple placeholders, like %site-name or [user].

Token

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. This provides several "actions" for the Drupal core Actions/Trigger modules to use that take advantage of the Token replacement functionality. Modules that use the Token module and provide tokens via the API include Organic Groups, Pathauto, Comment Notify, and Commerce. Form generation. Functions to enable the processing and display of HTML forms.

Form generation

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. Forms can also be built and submitted programmatically without any user input using the drupal_form_submit() function. 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 API Reference. Drupal_set_message. Sets a message to display to the user.

drupal_set_message

Messages are stored in a session variable and displayed in page.tpl.php via the $messages theme variable. Form API Quickstart Guide. Note that these instructions focus on Drupal 6.

Form API Quickstart Guide

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. System.api.php. Define menu items and page callbacks.

system.api.php

This hook enables modules to register paths in order to define how URL requests are handled. Paths may be registered for URL handling only, or they can register a link to be placed in a menu (usually the Navigation menu). A path and its associated information is commonly called a "menu router item". This hook is rarely called (for example, when modules are enabled), and its results are cached in the database.

Migrate Drupal 6 to Drupal 7. Changing from Drupal 6 to Drupal 7 is not just a simple update. The steps seem straightforward, but there are major changes in the way Drupal 7 works and stores data. So a move up across major version numbers is really a "migration" as opposed to a simple update or patch. If your site is fairly simple, with good backups, and you use the right approach, you can accomplish the migration without too much trouble. The more complex your site is, the more complex the migration will be. Doing a migration involves several steps. Step 1: Backup your site's database * It is wise to try an update or upgrade on a test copy of your site before applying it to your live site.

There is a handy tool called Backup and Migrate, which helps simplify the backup process, which you can download from this page Note: it only works with MySQL, and is still under development. Step 2: Backup all your folders and files. Search for api. Le manuel du designer.