Discover Drupal snippets

Title Categories Createdsort ascending

Disable status messages for all forms

by netlooker
View disable status messages for all forms
php
  1. function modulename_form_alter(&$form, $form_state, $form_id) {
  2. ...
Form API
for Drupal 7

snippet rating: 1

2 days 10 hours ago

Changing the Node Creation Title

by netlooker
View changing the node creation title
php
  1. function your_module_form_alter(&$form, $form_state, $form_id) {
  2. ...
Form API, Theming/Templates
for Drupal 7

snippet rating: 0

3 days 10 hours ago

Auto select Drush version for Drupal 7/8 core

by kalabro
View auto select drush version for drupal 7/8 core
bash
  1. # Function selects Drush 6 if we are in Drupal 8 folder.
  2. drush() {
  3. ...
Drush/Bash
for Drupal 7, 8

snippet rating: 1

4 days 4 hours ago

Clean up a view's taxonomy term name field with pathauto settings

by mordonez
View clean up a view's taxonomy term name field with pathauto settings
php
  1. /**
  2.  * Implements hook_views_pre_prender().
  3. ...
Fields, Views
for Drupal 7

snippet rating: 2

5 days 9 hours ago

Persist all query string parameters during user login

by jessehs
View persist all query string parameters during user login
php
  1. // If we're at the login page, and there is a destination, save any other
  2. // query parameters in the URL.
  3. ...
Form API
for Drupal 6

snippet rating: 0

6 days 6 hours ago

Easy and fast way to add new language to Your site

by fadehelix
View easy and fast way to add new language to your site
bash
  1. drush dl drush_language
  2. drush dl l10n_update && drush en -y $_
Location, Multilingual
for Drupal 7

snippet rating: 1

6 days 15 hours ago

Add nouislider to text fields with class slider

by StoraH
View add nouislider to text fields with class slider
javascript
  1. (function ($) {
  2. // Run when document is...
Ajax/JavaScript, Fields, Theming/Templates

snippet rating: 0

6 days 16 hours ago

Detect missing module files.

by mkhamash
View detect missing module files.
bash
  1. for FN in `drush --extra=--skip-column-names sql-query "SELECT filename FROM system WHERE status = 1"`; do...
Drush/Bash, Performance/Scalability
for Drupal 7

snippet rating: 1

comments: 2

6 days 16 hours ago

Restrict webform components by role

by mordonez
View restrict webform components by role
php
  1. /**
  2.  * Alter the list of available Webform components.
  3. ...
Access Control
for Drupal 7

snippet rating: 0

6 days 17 hours ago

Rename files during upload.

by malcolm
View rename files during upload.
php
  1. /**
  2.  * Implements hook_file_insert().
  3.  */
    ...
Fields, File Management
for Drupal 7, 8

snippet rating: 0

1 week 16 hours ago
Subscribe to Dropbucket.org - Drupal Snippets Repository Main Feed