Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
730
posted 13 years ago by focal55
this thing works except of course for IE which makes the bold text make a little jump like effect in the end. If anyone has a solution please let me know :)
cheers!
Johanna
0
657
posted 13 years ago by epictree
Simple function that filters out any duplicate items in an array.
7
1610
posted 13 years ago by Nettuts
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
789
posted 13 years ago by Onfire60
Not extensively tested, but seems to work in my sample project.
uses the class I posted here:
http://www.snipplr.com/view/46669/minimist-c-errorlogging-class/
1
1317
posted 13 years ago by kyrathaba
Resize images that are greater than 800x600 and place them in the "small" directory.
0
745
posted 13 years ago by Carolyne
Found on the Ubuntu forum: http://ubuntuforums.org/showthread.php?t=1355021
Renames files to 0001.jpg, 0002,jpg etc
You can insert a prefix here: "prefix-$j.jpg"
0
732
posted 13 years ago by Carolyne