Welcome To Snipplr
Everyone's Recent Snippets Tagged drupal
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Shortens a string, and adds a span with a title of the full string.
Function is useful for listings where you don't want wraping; or for places where a long string liek a username can break the layout.
1
923
posted 17 years ago by berkes
This snipped adds columnstriping to cells. It works fine for most cases, but will behave strange when combined with colspan.
Cells get an additional class 'even-col' or 'odd-col'
2
981
posted 17 years ago by berkes
Put classes around your bodyy, to allow different colors for seperate pages and areas on your site.
IT will simply add a css-safe version of the first argument in an url. Say the url is /about_us/our_company the class will be
body.about-us
Require...
2
793
posted 17 years ago by berkes
callback in a form alter to enforce an exposed filter to use only the options set in filter. Works for selectlists only.
2
768
posted 17 years ago by berkes
A form alter implementation to create variables to flag certain features per node type. E.g. Show foo on blogs only: example_blog == 1;
1
623
posted 17 years ago by berkes
This snippet is for use with image module, a small contributed module for image handling. (Yes: in Drupal you need a /contributed/ module for this o_O.
The template snippet links the images to their own node.
2
744
posted 17 years ago by berkes
Counts the total amout of nodeviews between now and a year ago (the last 31536000 seconds).
1
655
posted 17 years ago by berkes
This snippet is for use with image_attach, a small contributed module that uses image module to create nice thumbs in any node type.
The template snippet makes the images show up larger in the body node, and instead of linking to itself, it links t...
2
687
posted 17 years ago by berkes