We received a website design from a client's graphic designer in an Illustrator format. We tried exporting the file to a Photoshop file and the .psd would never maintain layers.
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.
Today I needed to embed a YouTube video within the body of a responsive design. This is usually fairly easy with images, but iFrames need a bit of extra love to make them work. I Googled for a while and came across this link: http://stackoverflow.com/a/12121929.
I didn't want to use an image, so I followed the comments and came up with the following code.
Today I learned a lesson the hard way: never stop networking when your only access to a server is via ssh.
What happened
One of the websites we were hosting stopped responding on its dedicated IP address. As we began to investigate, we found nothing wrong with the server load, nothing wrong with the apache configuration. We were using aegir, and re-verified the site and everything was successful. Next, we typed the dedicated IP into the browser and the browser just spun.
Today I ran into an issue where running the command:
drush status
ended with this error:
Drush command terminated abnormally due to an unrecoverable error..
Not sure what was causing this problem so I turned to Google and came across this post: http://drupal.org/node/1140842.
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:
Below is a list of Drupal functions that I can no longer live without, but for some reason I have trouble remembering them. So, here is a list of functions that I use regularly.