Welcome To Snipplr


Everyone's Recent Snippets Tagged drupal



1 2 3 4 5 6 ... 14
0 1176 posted 15 years ago by hamsterbacke82
Drupal 5. Simply print <code>$uc\_cart\_shopping\_block</code> where ever you want.
0 1130 posted 15 years ago by resting
This snippet saves in the $return array all the names of the fields that a content type has added with CCK, has to be installed the cck module.
0 2523 posted 15 years ago by JohnnyGamba
0 1231 posted 15 years ago by karmacode
Add block in anywhere in the content, node in drupal
2 1350 posted 15 years ago by jesudasjj
Used the first sql statement to find your menu item. (Replace menu-% with the name of your menu eg. "primary-links" . Then using the menu item id fix the items you want to regain the good old delete button on the menu item.
0 2752 posted 15 years ago by Onfire60
0 1443 posted 15 years ago by focal55
Put in /sites/default/settings.php
0 1345 posted 15 years ago by resting
1 1412 posted 15 years ago by focal55
Automatically add a class to the body tag on each page. Remember to add <?php> to your body tag in the page.tpl.php file. You can also override or insert PHPTemplate variables into the templates with this function.
1 1349 posted 15 years ago by focal55
0 1168 posted 15 years ago by focal55
Drupal Messages with a nice green color
1 1440 posted 15 years ago by focal55
Drupal messages with a nice orange color
1 1370 posted 15 years ago by focal55
Just my personal favorite defaults
1 1326 posted 15 years ago by focal55
1 1402 posted 15 years ago by focal55
When adding a link to a form say for instance a login form you can use drupal_get_destination() to return the user to the page they were on when they finish loging in. This show you how to do this programatically in a link l(); function.
0 1499 posted 15 years ago by Onfire60
1 1327 posted 15 years ago by titosemi
1 1157 posted 15 years ago by titosemi
Adjust the size of the body field window. For use in hook_form_alter().
0 1752 posted 15 years ago by tgbdad
Only this portion needed // Add page template suggestions based on node type, if we aren't editing the node. if ($vars['node'] && arg(2) != 'edit') { $vars['template_files'][] = 'page-nodetype-'. $vars['node']->type;...
1 1612 posted 15 years ago by resting
Example from New Play Map
0 1237 posted 15 years ago by mimlee
Example used in New Play Map
0 1129 posted 15 years ago by mimlee
Suppress button to "split summary at cursor" on node bodies that are generally short and won't ever be displayed as teasers. (These lines go in hook_form_alter functions.)
0 1387 posted 15 years ago by tgbdad
Suppress the input format section of a node form when you don't really want users (even admin) to change it. Particularly handy for uncluttering forms with lots of CCK fields on them.
0 1202 posted 15 years ago by tgbdad
1 2 3 4 5 6 ... 14