Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged drupal
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
simple preprocess function to alter the site name depending on the section of the site
0
872
posted 10 years ago by emijayne
This script is a custom module to copy one field to another.
0
961
posted 10 years ago by DesignGoggles
Change the Views Slideshow pager items in <li> elements so that they are easier to style
0
799
posted 11 years ago by mktimes5
This is a custom field handler for a Drupal view. Sometimes you have two or more fields in a content type and you want to do a test on them to see if both are empty or both full or exclusive and return that as a field.
There are probably ways to d...
0
803
posted 11 years ago by brownrl
This is a hook_block_info and hook_block_view template that will allow you to quickly create blocks in a Drupal module. When you use this all you have to do is create a directory "blocks" in the module and then create block.block_name.php in the dire...
0
824
posted 11 years ago by brownrl
out put a field with multiple values as a list fro styling purposes useing child selectors
0
867
posted 11 years ago by mktimes5
Insert this into a custom node template to display the metatags inserted in my the metatag module.
<div>nid; ?>" class="<?php> clearfix"<?php>><?php>
0
700
posted 12 years ago by mktimes5
This is a callback example that can be used to conditionally display blocks on specific pages. In this example, I load all nodes with a specific field and return false if the value of that field is equal to the user id of the logged in user. The sni...
0
760
posted 12 years ago by chasecrawford
imagecache preset depending on height and width of the image
0
745
posted 12 years ago by hoogvlieger
For our project, this code had been implemented in the theme template.php
0
960
posted 12 years ago by nicoknaepen
This is the Batch API example shown on http://api.drupal.org/api/drupal/developer--hooks--install.php/function/hook_update_N/6.
1
788
posted 12 years ago by wizonesolutions
It's not immediately clear from the `context_set()` function how to trigger a context to be "active" using code. Do it like this:
0
739
posted 13 years ago by jonathanpglick