Certain aspects of Drupal will break if you update jQuery beyond a certain version. So, to use a higher version for your custom code and still use the old version for Drupal stuff (overlays, tabledrag, etc), you can take advantage of jquery noConflict() http://api.jquery.com/jQuery.noConflict/. It can be a little confusing if you
A friend was working on image handling with the media module and found that it was next to impossible to remove a <p> tag wrapper. Here's some quick code which creates a text filter to remove that wrapper.
Sometimes you need to get the path to the current theme. You could use path_to_theme() but if you call it from inside a module, you will get the path to the module. Here's how I do it: