Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged drupal



1 ... 4 5 6 7 8 ... 11
This example will return values -15 through 15 to be presented to the user in a select list for an integer CCK field.
0 1865 posted 16 years ago by tgbdad
0 1590 posted 16 years ago by unravelme1
A simple script to run with [drush](http://drupal.org/project/drush) to clean all Drupal nodes containing style tags.
1 1840 posted 16 years ago by mongolito404
0 1367 posted 16 years ago by sennesaelium
Resizing fields using a custom module You could also resize the field using a custom module. For example, if you created mysite.module, you could use something like this to reduce the field size to 30 characters
4 2502 posted 16 years ago by marcelodornelas
Drupal allows hook_update_N to run any sort of code. Most of the time, however, people only use this to alter the database scheme. But you can use it for much more. Like setting variables, creating nodes, importing views and so on. This code show...
2 2262 posted 16 years ago by berkes
2 2037 posted 16 years ago by marcelodornelas
2 1471 posted 16 years ago by sennesaelium
0 1902 posted 16 years ago by humanoid
1 1826 posted 16 years ago by humanoid
By using hook_form_alter, you can add your own callback functions to any Drupal form. These functions will be called when Drupal validates the form and when Drupal submits it. In example below, a module called 'simple_checkout' adds its own hand...
1 2094 posted 16 years ago by berkes
Not tested yet on drupal 6
1 1337 posted 16 years ago by mbria
0 1519 posted 16 years ago by karmacode
1 1463 posted 16 years ago by jodm
themes the primary links adding spans (useful for sliding doors technique) and nice ID's based on the link title rather than the standard ugly menu-851 classes etc.
1 2016 posted 16 years ago by ReeceMarsland
Wizzlern, a Dutch Drupal trainer, has a Dutch article online on how to remove the "search this site" label in the Drupal search-block.
2 1804 posted 16 years ago by berkes
Use the l() in Drupal with an array('html' => TRUE) to get a linked image
0 1474 posted 16 years ago by karmacode
Use the l() in Drupal with an array('html' => TRUE) to get a linked image
0 1589 posted 16 years ago by karmacode
0 1471 posted 16 years ago by karmacode
1 1789 posted 16 years ago by berkes
0 1013 posted 16 years ago by michamilz
What it does: clears & submits exposed filters form via AJAX (if enabled, otherwise normal page refresh). This is for Views 2.x. It works with the 'remember me' option. You need to create a custom module. E.g. custom/custom.module and custom/cu...
1 2576 posted 16 years ago by morningtime
this specifically checks the view name and then checks the arg length altering the page title if its a match
1 1531 posted 16 years ago by ReeceMarsland
1 ... 4 5 6 7 8 ... 11