Today I needed to add a custom textfield to the 'customer information' pane in Ubercart. After much searching, I wasn't able to find any modules that would allow this to happen, so I wrote my own.
I found this article, which gave me the starting block (as it was written for Drupal 6 I believe).
1.
Today I was working on a feature on a site that was using Ubercart's uc_roles module. By default, whenever a customer would buy a product with a role attached to it, an email would be generated stating what role that customer bought. However, in my use case, we did not want these emails generated and we needed to keep our settings in code.
Recently I needed to modify a Drupal 7 node form to have two drop down select elements populate based upon a third select element's choice. I have altered select elements in the past to have a single dependency, but never have I made one element control the content of two different elements.
I had to accomplish the task of migrating the content from a Drupal 5 site with 10,000+ nodes to a new Drupal 7 version. The caveat was that all of the node information needed to remain intact due to various links that were entered into the body of posts. My initial thought was to use a .csv file and import directly into the database. After some more research I discovered the migrate and migrate_d2d modules.
Today we needed to override the menu links of one menu on our Drupal 7 site. We started with theme_menu_links(), but quickly decided that we didn't want to figure out what menu every menu link belonged to. After some searching we discovered this comment (https://api.drupal.org/comment/26939#comment-26939) which suggested using this naming structure:
THEMENAME_menu_link__MENU_NAME()
Sure enough, once this function was placed in our theme, the exact menu was targeted and we didn't have to wade through every menu item.
Recently I needed to have a dynamically changing background image for a Drupal 7 theme I was working on. Allowing the user to change this background image directly from theme's settings page.
How to add a dynamic background image to a Drupal theme
The first step is to add a file named 'theme-settings.php' to your theme.
Today I needed to redirect a node form submission to a separate URL. First, I tried the standard form api #redirect option in the form array like this:
I ran into an issue today where I needed to get a themed views title from within a views row style template file (tpl). I tried using drupal_get_title() and menu_get_item() but the title elements were all blank for these. Next I inspected the $views object looking for the themed title but it was not listed. Finally, I discovered within $views->build_info the title and substitutions variables.