Codekarate Content

By shane
Sun, 2011-04-03 00:24

I planned on just giving a high level overview of how I typically go about setting up a subscription based Drupal 6 website. I planned on just creating a primer for someone to look over, but I decided to give myself a challenge and see if I can create the entire site in 15 minutes.

Another thing to note is that I will start from nothing and build a simple subscription site in Drupal in 15 minutes with just the default Garland theme. I will also be writing this blog post at the same time with all the commands or actions I perform on the site. I am not sure if I will get it finished in 15 minutes, but I guess we will see.

By shane
Thu, 2011-03-24 15:22

When I first began working with forms in Drupal 6 I dove right in without reading all the documentation available on Drupal.org. However, I soon realized using drupal_goto() inside my form's submit handler was not the correct way to do things. This is just a little bit of information on how to set form redirects correctly from in the main form function, the submit function, and even a form alter function.

From the main form function:

If you are a Drupal developer and are not using the Drupal features module to help with your workflow, you are missing out on a huge opportunity. What kind of opportunity you may ask? How about an opportunity to make your life easier, allow you to develop Drupal websites faster, and provide you with simple ways to version control your exportables (views, cck, panels, variable settings, etc). I am going to give a brief recipe of how I use features in my workflow in hopes that maybe you will get some new ideas (and perhaps send ideas my way as I am always looking to improve the development process).

If you want a complete walk through and introduction to the Features module as well as more information on crafting a Drupal development process. You can check out my 5 Secrets to Becoming a Drupal 7 Ninja Ebook.

If you are interested in a video on the Drupal 7 features module, check out my Drupal 7 Features module introduction.

By shane
Wed, 2011-03-16 22:00

So one day I wake up to a phone call from a client saying their website was broken. After looking into it, I was able to determine that the website itself was working fine, however there were now red error messages showing up on almost every page. After further looking, they were not really errors, they were PHP notices. The notices sprung up during server upgrades that migrated from PHP 5.2 to PHP 5.3. At the time, we ended up just changing the PHP error setting to no longer display notices, and the crises was averted. however looking back now we could have done it this way.

By shane
Wed, 2011-03-16 00:03

I recently had a small issue where my Drupal 6 node object did not have all the current and correct data because the node that was stored in the Drupal node cache was out of date. This is not something I have run into very often (I think only one other time before tonight), however if you run into the same problem then here is the solution:

Rather than just using:

By shane
Tue, 2011-03-15 08:26

As mentioned in a previous post, here is a quick shortened and simplified example that is similar to the code I used on a past Drupal site to create a message template. This example uses the messaging modules hook_messaging, it also declares a few token values that are passed through to the template.

By shane
Mon, 2011-03-14 20:39

So I recently ran into the situation where I was theming an Ubercart product node page and had the need to display a mini panel in the .tpl.php file. Here is the code I used to get it to display. The first code snippets went in the template.php file of the theme, while the second code snippet went in the node-product.tpl.php file.

You will need to replace "MYTHEME" with the name of your theme and "my_mini_panel" with the name of your mini panel. This can be found on the mini panels admin page (admin/build/mini-panels) under the Name column.

By shane
Fri, 2011-03-11 23:40

Recently I created the website that gives users an automated way to periodically check their websites to make sure they are still up and running. If the website is down or returns any type of error code, then it will send either an email or SMS notification to the user.

Up until this point I had never set up SMS notifications or SMS messaging on Drupal so here is some information on how I got it to work.

Pages