Coalmarching - Coalmarch Blog http://www.coalmarch.com/coalmarch-blog.php Coalmarching - Coalmarch Blog en-us Thu, 16 Jun 2011 11:56:10 EDT http://www.coalmarch.com/products/coalengine.php 15th Annual NC Triangle Komen Race for the Cure Thu, 16 Jun 2011 11:56:10 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20110616278/15th-annual-nc-triangle-komen-race-for-the-cure.php 15th Annual NC Triangle Komen Race for the Cure Stacey Vernon | 06-16-11

This past Saturday, June 11, 2011, was the Susan G. Komen of the NC Triangle’s 15th annual Race for the Cure, and Coalmarch’s fifth year as a sponsor at the race. We knew there’d be a big crowd as usual, so we started planning several months ago for what we could bring to the table (literally). We decided on Coalmarch mini-frisbees, Komen Running Ribbon stickers, and Coalmarch faux-Wayfarer plastic sunglasses with hot pink sides that read, “End Cancer”. (In HTML, of course.)

But we wanted to do something creative and different to get people excited about stopping by our table besides just the free swag. C’mon, we couldn’t just give stuff away, right? We wanted to engage the race participants and make it a little more interesting, so we came up with a game. We had a pink hula hoop with a target in the middle, tied to the hula hoop with pink ribbon. We spray painted a pink line in front of our table, and had people stand behind it and try to throw the frisbees through the hoop. If they got it through the hoop, they won a frisbee. If they hit the target, they got the sunglasses.…


Permalink ]]>

15th Annual NC Triangle Komen Race for the Cure

Stacey Vernon | 06-16-11

This past Saturday, June 11, 2011, was the Susan G. Komen of the NC Triangle’s 15th annual Race for the Cure, and Coalmarch’s fifth year as a sponsor at the race. We knew there’d be a big crowd as usual, so we started planning several months ago for what we could bring to the table (literally). We decided on Coalmarch mini-frisbees, Komen Running Ribbon stickers, and Coalmarch faux-Wayfarer plastic sunglasses with hot pink sides that read, “End Cancer”. (In HTML, of course.)

But we wanted to do something creative and different to get people excited about stopping by our table besides just the free swag. C’mon, we couldn’t just give stuff away, right? We wanted to engage the race participants and make it a little more interesting, so we came up with a game. We had a pink hula hoop with a target in the middle, tied to the hula hoop with pink ribbon. We spray painted a pink line in front of our table, and had people stand behind it and try to throw the frisbees through the hoop. If they got it through the hoop, they won a frisbee. If they hit the target, they got the sunglasses.

People were really, really excited about the sunglasses. Really excited. To the point that they’d stand in line multiple times to keep trying to win them. Someone even offered us money for them. At the end of the festivities, once the Survivors’ March and ceremony started and the event came to a close, we started giving away the remaining sunglasses that hadn’t been won yet. People swarmed the tent, and the leftover sunglasses were gone in minutes.

It was great to see so many people lining up at our tent to play the game— from little kids who could barely see above the table to an elderly lady using a walker, everyone seemed to want to step up and give it their best shot. And win or lose, it seemed like everyone had fun.

But what was more interesting was to see how many different kinds of people there were at this event. There were around 25,000 race participants, not counting spectators. There were people from all walks of life at this event— families, corporate teams, survivors young and old, men and women, Hispanic, African American, Asian— the list goes on. Runners wore colorful boas, crazy hats, tutus, and gym shorts alike.

The one thing everyone had in common was that they were there to support the same great organization and cause. Everyone was unified in their inspiration to find a cure for breast cancer through research, education, prevention, and awareness. It was rare to see a runner (or walker) who didn’t have an “In Memory of” or “In Celebration of” sign on their backs. Some people had two signs, with several names. You can respond to that one of several ways— you can feel sad for all those lives affected by this disease, or you can feel inspired that so many people are fighting to overcome it. So many people are celebrating life instead of mourning lives lost. Not to say that there isn’t a time and place for mourning, but this event inspires a different sentiment. The Komen NC Triangle Race for the Cure is about a community of strong, dedicated, passionate people who refuse to give up hope and optimism, who refuse to resign to a defeatist attitude.

It reminds me of one of my favorite poems, about cancer and its inability to kill the human spirit. I think it’s a good note to end on.

What Cancer Cannot Do

Cancer is so limited…
It cannot cripple love.
It cannot shatter hope.
It cannot corrode faith.
It cannot eat away peace.
It cannot destroy confidence.
It cannot kill friendship.
It cannot shut out memories.
It cannot silence courage.
It cannot reduce eternal life.
It cannot quench the Spirit.

]]>
http://www.coalmarch.com/coalmarch-blog/20110616278/15th-annual-nc-triangle-komen-race-for-the-cure.php
New Website Design and Launch for Gingersling.net! Tue, 31 May 2011 11:14:03 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20110531277/new-website-design-and-launch-for-gingerslingnet-.php New Website Design and Launch for Gingersling.net! Jason Stanley | 05-31-11

Here at Coalmarch, we love creating websites that truly reflect the client’s personality, while meeting their marketing goals. We recently completed a site redesign for Ginger Pooley, former bassist for the Smashing Pumpkins, and we are really proud of it!

We think the site for Ginger Sling really reflects her personality, style, and music. Her new site has a clean design and a fresh feel. The images really push the design and we structured the sections to avoid information overload.

Although we specialize in Drupal-based websites, we’re versatile — we updated the site design using Ginger’s existing WordPress CMS, since she didn’t need Drupal’s expanded functionality. Our friend, Scott Witter, did the photography and he did a great job.

What are your favorite things about the new Ginger Sling site? Please share — and check out Ginger’s brand new EP!


Permalink ]]>

New Website Design and Launch for Gingersling.net!

Jason Stanley | 05-31-11

New Website Design and Launch for Gingersling.net!

Here at Coalmarch, we love creating websites that truly reflect the client’s personality, while meeting their marketing goals. We recently completed a site redesign for Ginger Pooley, former bassist for the Smashing Pumpkins, and we are really proud of it!

We think the site for Ginger Sling really reflects her personality, style, and music. Her new site has a clean design and a fresh feel. The images really push the design and we structured the sections to avoid information overload.

Although we specialize in Drupal-based websites, we’re versatile — we updated the site design using Ginger’s existing WordPress CMS, since she didn’t need Drupal’s expanded functionality. Our friend, Scott Witter, did the photography and he did a great job.

What are your favorite things about the new Ginger Sling site? Please share — and check out Ginger’s brand new EP!

]]>
http://www.coalmarch.com/coalmarch-blog/20110531277/new-website-design-and-launch-for-gingerslingnet-.php
Making a Really Simple Business Case for Skype Premium Thu, 27 Jan 2011 11:21:36 EST Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/team-blog/thomas-ingham-blog/20110127276/making-a-really-simple-business-case-for-skype-premium.php Making a Really Simple Business Case for Skype Premium Thomas Ingham | 01-27-11

Hey Gang.

I’ve been reading many editorials online lately regarding uproar over Skype charging for their services. I thought it might be helpful to do a quick breakdown so that people will maybe STFU.

Let’s say that a company bills out at a rate of $100 per man hour. If the company is a services business, then they most likely have a production meeting on a weekly basis. For the sake of argument let us assume that the company has 10 employees. The potential bill-rate for the company per hour is $1000. There are 4.2 weeks in the average month, so that equates to a cost of $4,200.00 for weekly production meetings (if they can keep the meeting to sixty minutes.)

Over a year, that equates to $214,200.00

Skype is suggesting that a charge of $9 per-head is reasonable to maintain their quality of service. Times 10 ($90) times 12 ($1,080.00) — um, yeah you pay for the service for your entire company in a single week by not taking folks away from their respective desks (remotely or otherwise) allowing them to continue to respond to emails and…


Permalink ]]>

Making a Really Simple Business Case for Skype Premium

Thomas Ingham | 01-27-11

Hey Gang.

I’ve been reading many editorials online lately regarding uproar over Skype charging for their services. I thought it might be helpful to do a quick breakdown so that people will maybe STFU.

Let’s say that a company bills out at a rate of $100 per man hour. If the company is a services business, then they most likely have a production meeting on a weekly basis. For the sake of argument let us assume that the company has 10 employees. The potential bill-rate for the company per hour is $1000. There are 4.2 weeks in the average month, so that equates to a cost of $4,200.00 for weekly production meetings (if they can keep the meeting to sixty minutes.)

Over a year, that equates to $214,200.00

Skype is suggesting that a charge of $9 per-head is reasonable to maintain their quality of service. Times 10 ($90) times 12 ($1,080.00) — um, yeah you pay for the service for your entire company in a single week by not taking folks away from their respective desks (remotely or otherwise) allowing them to continue to respond to emails and subsequently bill their time.

I really don’t think this is an issue that needs to be discussed further. For some reason we’re now living in a culture that only values a product if the cost seems insignificant at face value. I partly blame Apple’s “AppStore” wherein applications that would have otherwise cost a hundred dollars are selling for $10 (see Korg’s excellent sample board on the iPad.)

Pretending that a business can make a living playing at loss-leader really only produces loss. I wonder what the demographics of the “hater” class looks like on this Skype issue?

]]>
http://www.coalmarch.com/coalmarch-blog/team-blog/thomas-ingham-blog/20110127276/making-a-really-simple-business-case-for-skype-premium.php
Search Engine Optimization (SEO) tips from Coalmarch on NBC17 TV Mon, 13 Sep 2010 17:34:36 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20100913275/search-engine-optimization--seo--tips-from-coalmarch-on-nbc17-tv.php Search Engine Optimization (SEO) tips from Coalmarch on NBC17 TV Karl Sakas | 09-13-10

Wondering how to improve your business website? Coalmarch Productions’ president, Jake St. Peter, shared tips this morning on My Carolina Today, on Raleigh’s NBC 17. He featured two Coalmarch clients, SmileCary.com and ACCSports.com.

Here’s the short video, with Triangle Interactive Marketing Association (TIMA) president Janet Kennedy:


Permalink ]]>

Search Engine Optimization (SEO) tips from Coalmarch on NBC17 TV

Karl Sakas | 09-13-10

Wondering how to improve your business website? Coalmarch Productions’ president, Jake St. Peter, shared tips this morning on My Carolina Today, on Raleigh’s NBC 17. He featured two Coalmarch clients, SmileCary.com and ACCSports.com.

Here’s the short video, with Triangle Interactive Marketing Association (TIMA) president Janet Kennedy:

]]>
http://www.coalmarch.com/coalmarch-blog/20100913275/search-engine-optimization--seo--tips-from-coalmarch-on-nbc17-tv.php
Avatar’s Changing Title Treatment? Thu, 07 Jan 2010 16:17:50 EST Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20100107274/avatars-changing-title-treatment.php Avatar’s Changing Title Treatment? Jason Stanley | 01-07-10

So I, like millions of others, have seen the movie Avatar, and I really enjoyed it. I think it will hold a place in history for its groundbreaking special effects and the story was better than I had anticipated.

I have seen all of the designer hoopla about the use of Papyrus as the subtitle typeface, and yeah, I cringed when it first came on the screen, but I shrugged it off and went with it, no biggie. Admittedly, it has been entertaining reading design blogs about the decision to use Papyrus by Cameron.

It has been pretty well documented that the main title treatment isn’t strictly Papyrus either, but a slight variation. I am sure a designer somewhere fought pretty hard for that. I actually think it works fine for the main title treatment, it is a display font after all, and with the wide kerning and subtle changes I think it works fine. I do think that it falls somewhat short in its application as a subtitle typeface, but like I said, it is definitely not a deal breaker.

What did really bother me however, was at the end of the movie, the last scene takes place and then the screen goes dark for…


Permalink ]]>

Avatar’s Changing Title Treatment?

Jason Stanley | 01-07-10

Avatar’s Changing Title Treatment?

So I, like millions of others, have seen the movie Avatar, and I really enjoyed it. I think it will hold a place in history for its groundbreaking special effects and the story was better than I had anticipated.

I have seen all of the designer hoopla about the use of Papyrus as the subtitle typeface, and yeah, I cringed when it first came on the screen, but I shrugged it off and went with it, no biggie. Admittedly, it has been entertaining reading design blogs about the decision to use Papyrus by Cameron.

It has been pretty well documented that the main title treatment isn’t strictly Papyrus either, but a slight variation. I am sure a designer somewhere fought pretty hard for that. I actually think it works fine for the main title treatment, it is a display font after all, and with the wide kerning and subtle changes I think it works fine. I do think that it falls somewhat short in its application as a subtitle typeface, but like I said, it is definitely not a deal breaker.

Closing Avatar Title Treatment

What did really bother me however, was at the end of the movie, the last scene takes place and then the screen goes dark for an instant, then the audience sees the word Avatar again, only this is a completely different font and color from anything you’ve seen before. It looks more like a bastardization of the original title, which for the life of me, I can’t imagine why they would elect to do that. I know it sounds trite and all, but it really brought everything to a jarring halt for me, my immediate reaction was, whaaaa?

I like the idea of ending on the name of the movie, it was a fun, roller coaster ride of a picture, and the reiteration of the title treatment (done properly) would serve as a nice punctuation mark on the whole experience. But the inconsistency of the title treatment really surprised me and makes me wonder how that decision was ever made in the first place, (see Avatar Art Director, Creative Director, Graphic Designer, Typographer, etc.). Maybe they will fix it for the DVD release?

]]>
http://www.coalmarch.com/coalmarch-blog/20100107274/avatars-changing-title-treatment.php
Coalmarch Productions® took the whole team to the Race for the Cure on Saturday Tue, 16 Jun 2009 16:12:58 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20090616270/coalmarch-productions-took-the-whole-team-to-the-race-for-the-cure-on-saturday.php Coalmarch Productions® took the whole team to the Race for the Cure on Saturday Jim Switzer | 06-16-09

We continued our sponsorship for the Komen NC Triangle affiliate this year, and we had a great time at the Race for the Cure. We had a great turn out and an even better presence at this year’s race with support from the entire team. Next year we’re considering hot dogs for our visitors.

A big pat on the back to Jason, Thomas, and Mike for putting together an unbelievable video production for our tent. Jason created a great new design for our banners, and the Prius, which we weren’t fully able to capitalize on. (We won’t discuss that.)

Most of all thank you to all of the wonderful people who stopped by our tent to talk. We hope that everyone enjoyed the day, at an event that makes us all see just how human we all are.

Here are some of the photos from our photographer, Omar.


Permalink ]]>

Coalmarch Productions® took the whole team to the Race for the Cure on Saturday

Jim Switzer | 06-16-09

We continued our sponsorship for the Komen NC Triangle affiliate this year, and we had a great time at the Race for the Cure. We had a great turn out and an even better presence at this year’s race with support from the entire team. Next year we’re considering hot dogs for our visitors.

A big pat on the back to Jason, Thomas, and Mike for putting together an unbelievable video production for our tent. Jason created a great new design for our banners, and the Prius, which we weren’t fully able to capitalize on. (We won’t discuss that.)

Most of all thank you to all of the wonderful people who stopped by our tent to talk. We hope that everyone enjoyed the day, at an event that makes us all see just how human we all are.

Here are some of the photos from our photographer, Omar.

]]>
http://www.coalmarch.com/coalmarch-blog/20090616270/coalmarch-productions-took-the-whole-team-to-the-race-for-the-cure-on-saturday.php
Programmer Hiring Practices and Standardized Testing Wed, 10 Jun 2009 12:50:44 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20090610269/programmer-hiring-practices-and-standardized-testing.php Programmer Hiring Practices and Standardized Testing Ken Winters | 06-10-09

Hiring a competent programmer is an immense challenge, and hiring a great one is much more difficult on top of that. Here are some strategies I’ve learned along the way.

Zend offers PHP and Zend Framework Certification but I don’t put any stock into that kind of test. Since PHP has good API documentation, the memorization that multiple choice standardized tests can evaluate is minimally useful.

Even if I thought the tests were a good indication of language competence, it still wouldn’t be a useful metric because language competence is not a good indicator of new hire success. Some careers like DBA or server administration seem to benefit from the standardized tests, but what I value in a programmer doesn’t boil down in the same way.

We do, however, subject new hires to short-answer technical tests. Some things that we look for:

Did you take / pay attention in a basic algorithms class Can you write a reasonably accurate SELECT statement off the top of your head Can you identify poor programming practices and sources of bugs when looking at code Do you understand…


Permalink ]]>

Programmer Hiring Practices and Standardized Testing

Ken Winters | 06-10-09

Programmer Hiring Practices and Standardized Testing

Hiring a competent programmer is an immense challenge, and hiring a great one is much more difficult on top of that. Here are some strategies I’ve learned along the way.

Zend offers PHP and Zend Framework Certification but I don’t put any stock into that kind of test. Since PHP has good API documentation, the memorization that multiple choice standardized tests can evaluate is minimally useful.

Even if I thought the tests were a good indication of language competence, it still wouldn’t be a useful metric because language competence is not a good indicator of new hire success. Some careers like DBA or server administration seem to benefit from the standardized tests, but what I value in a programmer doesn’t boil down in the same way.

We do, however, subject new hires to short-answer technical tests. Some things that we look for:

909ae8e6e4dc5459fc1e9d728191ba54

I would consider someone who knew nothing about PHP but was skilled in a different language and fully understood the concepts to be more valuable than someone with 10 years of full-time PHP experience but didn’t have any wider knowledge (on most projects). Once you know what you are looking for, you can figure out the PHP syntax quickly and achieve competence in a few weeks, but getting a real Computer Science education takes years.

I’ve found that there are only three good indicators of success for a new hire:

ac2fdcb701fe60fed5bf2426b7b20e3a

Any time that the new hire will be working on architecture or designs rather than just implementing what is handed to them, I think education is more valuable than experience. However, if all you need for them to do is follow your plan then the only real requirement is language competence and basic knowledge of security. That’s not a situation that we normally run into, but for very large corporate programming teams it can make sense.

If you are a programmer and are trying to increase your chances of being hired, learn about common security issues, source control, and the higher-level capabilities of your chosen language. If you don’t know much about algorithms and basic things like linked lists, take a class or buy a book.

]]>
http://www.coalmarch.com/coalmarch-blog/20090610269/programmer-hiring-practices-and-standardized-testing.php
Building a Lunar Calendar with Drupal's CCK Computed Field Sun, 07 Jun 2009 13:56:37 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20090607268/building-a-lunar-calendar-with-drupals-cck-computed-field.php Building a Lunar Calendar with Drupal’s CCK Computed Field Jess Walls | 06-07-09

You can get a lot of mileage out of a Drupal site with the knockout combination of Views and CCK. Both of these mainstay projects have many contributed modules to extend their power. In this post we are going to look at CCK’s Computed Field module, and how it can be used to automatically add contextual information to a content type on a per node basis.

To get started here’s what we’ll need:

CCK Computed Field Views Calendar Date

Assuming all the above modules have been installed and configured, we can focus on the details of setting up our computed fields. For this example, we’re going to add 3 new fields to Drupal’s blog content type. Navigating through the admin section to admin/content/node-type/blog/fields, we’ll add the fields shown below:

We’ll add a date field to our blog content type with a pop-up widget, plus two computed fields: one to display the phase of the moon associated with date as a string, and another to display the phase of the moon as an image.

On the configuration screen for our first computed field…


Permalink ]]>

Building a Lunar Calendar with Drupal’s CCK Computed Field

Jess Walls | 06-07-09

Building a Lunar Calendar with Drupal's CCK Computed Field

You can get a lot of mileage out of a Drupal site with the knockout combination of Views and CCK. Both of these mainstay projects have many contributed modules to extend their power. In this post we are going to look at CCK’s Computed Field module, and how it can be used to automatically add contextual information to a content type on a per node basis.

To get started here’s what we’ll need:

8166474cdc8914378ab3c1d069e2dcb8

Assuming all the above modules have been installed and configured, we can focus on the details of setting up our computed fields. For this example, we’re going to add 3 new fields to Drupal’s blog content type. Navigating through the admin section to admin/content/node-type/blog/fields, we’ll add the fields shown below:

fields

We’ll add a date field to our blog content type with a pop-up widget, plus two computed fields: one to display the phase of the moon associated with date as a string, and another to display the phase of the moon as an image.

On the configuration screen for our first computed field field_moon_phase, we’ll see, in addition to the standard cck widget options, 3 additional configuration options—a text area for computed code, a text area for display format, and a group of options for database settings.

The text area for computed code is where the majority of the magic is going to happen. This is where we will enter our our custom php to parse the node’s CCK date field to compute the phase of the moon for the date selected by the user, and then display that information on the node both as a string (e.g. whether it is Full Moon, or a Crescent Moon) along with a graphical representation of the moon phase.

So, what are we allowed access to in the computed code text area? Well here’s the description from the Computed Field project page:

096ea3d4cfccf35d12113515f995d527

Below the text area for the computed code there is also a helpful description of the variables that are immediately available to us:

&$node, $field, &$field_node
While the easy thing to do is to enter our php code directly into the text area provided for us, it will be easier to maintain in the long run if we place our custom code into a module. For this example I’ve added two functions to a custom module,
moonphases_phase_string()
and
moonphase_image()
, which I will reference from the text areas provided. To get started, we will access the date field value we added earlier field_moon_date, and pass the value to
moonphases_phase_string()
. This function will parse the date value to determine what the phase of the moon is on the given date, and then return a string, which we will assign to our computed field variable
$node_field[0]['value']

computed code

Now that we have assigned our computed value to the node, we need to configure how it will be displayed and stored. Since we will just be using a string value in this field, we will leave the default display settings as they are, but we are going to select the option to store the value in the database as a varchar so we can reference it from our View’s Calendar later.

display format database

We will configure the

field_blog_moon
computed field in a similar manner, with the same display and database settings, this time calling our custom code with the value from our previously configured
field_blog_moon_phase
field. This function will return an html img tag string with the graphical display of the moon phase. (It is worth noting at this point the order of the fields is important, if we want to use a field previously defined in this node, then that field should be set with a ‘lighter’ weight.)

computed code

To recap, we now have three additional fields defined for our blog content type—a date field and two computed fields.

At this point, we can test out our moon display by creating a new blog entry, choosing a date, and publishing the node.

blog view

Since we elected to store our computed fields in the database, we have access to our fields through the Views’ UI. To pull our blog posts into the calendar view (with the accompanying moon data), we will edit the Calendar view to add a new Page display.
We set this view to use the calendar style, choose the field

field_moon_date
as our argument, and select three fields to display on the calendar: the node title and the two computed fields.

view

Navigating to the path configured for this page view we have the finished result:

calendar view

]]>
http://www.coalmarch.com/coalmarch-blog/20090607268/building-a-lunar-calendar-with-drupals-cck-computed-field.php
Making Node-Based Drupal Forms Play Nice with Admin Theme Settings Thu, 21 May 2009 11:56:37 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/20090521267/making-node-based-drupal-forms-play-nice-with-admin-theme-settings.php Making Node-Based Drupal Forms Play Nice with Admin Theme Settings Ken Winters | 05-21-09

We use Garland as an admin theme because it really does a great job with the many admin forms that Drupal provides. This saves us a lot of work re-skinning the admin for every new site.

Although you can get Node Edit and Node Add skinned in the same way, all other menu paths that start with /node/ will use the front-end theme by default. The reason for this is simple and understandable, but unfortunate; the path /node/id/clone, for example, doesn’t start with /admin and for all Drupal knows it could just be an alternate front-end view for the node. So, it’s not at all safe to just default to using the admin theme for these paths.

One way to avoid the issue is to use a menu path that starts with /admin/ but that causes a number of other issues: you can’t leverage the sub-menu system on the node view and it makes the workflow for using it unpleasant, it doesn’t naturally inherit permissions and other settings, etc. So, that’s not a good plan either.

So, instead we will do exactly what the system module does — use hook_init to change the theme…


Permalink ]]>

Making Node-Based Drupal Forms Play Nice with Admin Theme Settings

Ken Winters | 05-21-09

Making Node-Based Drupal Forms Play Nice with Admin Theme Settings

We use Garland as an admin theme because it really does a great job with the many admin forms that Drupal provides. This saves us a lot of work re-skinning the admin for every new site.

Although you can get Node Edit and Node Add skinned in the same way, all other menu paths that start with /node/ will use the front-end theme by default. The reason for this is simple and understandable, but unfortunate; the path /node/id/clone, for example, doesn’t start with /admin and for all Drupal knows it could just be an alternate front-end view for the node. So, it’s not at all safe to just default to using the admin theme for these paths.

One way to avoid the issue is to use a menu path that starts with /admin/ but that causes a number of other issues: you can’t leverage the sub-menu system on the node view and it makes the workflow for using it unpleasant, it doesn’t naturally inherit permissions and other settings, etc. So, that’s not a good plan either.

So, instead we will do exactly what the system module does — use hook_init to change the theme based on the current path for node-based functionality.

a154bfa35bf8d75965b76832f6f68768

It may be even better to do that logic only when you’re already processing that menu item (like in the menu callback function) so that you avoid the tiny bit of overhead, but doing it globally and based on path means it doesn’t matter what state your form is in.

]]>
http://www.coalmarch.com/coalmarch-blog/20090521267/making-node-based-drupal-forms-play-nice-with-admin-theme-settings.php
Sending Comment Posted Emails to Drupal Blog Authors Tue, 12 May 2009 17:27:47 EDT Coalmarch Blog http://www.coalmarch.com/coalmarch-blog/team-blog/thomas-ingham-blog/20090512266/sending-comment-posted-emails-to-drupal-blog-authors.php Sending Comment Posted Emails to Drupal Blog Authors Thomas Ingham | 05-12-09

How do you go about sending emails out to blog post authors on a per-post basis using Drupal?

The answer is pretty simple if you know where to look. Scouring around the net you’ll find a lot of advice but let’s have this post be your one-stop shop to setting it up in Drupal 6x. Here’s what you’ll need to get started:

Drupal 6 Installation Triggers Enabled Tokens Module Actions Enabled

The respective module pages have pretty self-explanatory setup procedures and if you need any further help just hit me up on IRC (irc://irc.freenode.net/#drupal-support) or via the contact form to the right.

Step 1. Laying the foundation.

Set up your Action by browsing to the Administer>Site Configuration>Actions tab. This whole process can be a bit confusing because the “Add New” stuff feels like it should work like Blocks does, but it must be older functionality; it’s inverted. Scroll down to the select box and select “Send e-mail.”

Because you’ve got tokens enabled, you can use the handy bracket-syntax in fields all over Drupal including on…


Permalink ]]>

Sending Comment Posted Emails to Drupal Blog Authors

Thomas Ingham | 05-12-09

Sending Comment Posted Emails to Drupal Blog Authors

How do you go about sending emails out to blog post authors on a per-post basis using Drupal?

The answer is pretty simple if you know where to look. Scouring around the net you’ll find a lot of advice but let’s have this post be your one-stop shop to setting it up in Drupal 6x. Here’s what you’ll need to get started:

9f9df99d7ce36ad4aa05286d6b799259

The respective module pages have pretty self-explanatory setup procedures and if you need any further help just hit me up on IRC (irc://irc.freenode.net/#drupal-support) or via the contact form to the right.

Step 1. Laying the foundation.

Set up your Action by browsing to the Administer>Site Configuration>Actions tab. This whole process can be a bit confusing because the “Add New” stuff feels like it should work like Blocks does, but it must be older functionality; it’s inverted. Scroll down to the select box and select “Send e-mail.”

Because you’ve got tokens enabled, you can use the handy bracket-syntax in fields all over Drupal including on the Actions forms. In this case we’re going to use the tag [author_mail] which comes in from the Node object. This tag isn’t immediately available to the segregated Triggers (supply side) of tokens but we’re going to fix that in a later step.

Enter [author_mail] in the recipient field and fill out the other fields to suit your desired Drupal aesthetic.

Step 2. Get Things Moving

Next up you need to tell Drupal that something needs to be done, when a certain event occurs. This is done using a Trigger. Browse to Administer>Site Building>Triggers and then select the “Comments” object-type tab at the top of the form. This will show you a list of the available events that you can fire Actions off of. For this we want to say that when a “Comment is Saved” we’re going to initiate the Action we created in Step 1. Click the submit button to finalize.

Step 3. We’re Almost There

If you were to flip around to the front of your website right now, select a blog post and submit a comment you’d get an error that looks like:

5d25146ec7602d1ae97cae2dbd97c7c0

Then looking at the error logs you’d see something akin to:

6398af33c0edea28c7d2f38043c0a2c1

The reason for this is because Tokens isn’t providing “Node” information to Comment objects inside of Triggers. This is easily remedied however with a really quick snippet of php code. If you’ve already got a custom module set up for your site; you can skip ahead to the code snippet.

Step 4. Customizing the Crap out of It

In order to get some code into your site to override the default behavior supplied by Drupal you’ll want to create a custom module. The reasons for this are many, but primarily it’s because if an update for Drupal or a module you’re using comes out, you will want to be able to install it without replacing your customizations (thereby breaking your site.)

To create a new module, just make a new directory inside of “[yourproject]/sites/all/modules/[custom module name]” and then create two files inside of that directory.

1. [custommodule].info

This file stores metadata about your module. The relevant bits of info that you should put here should look like:

432551a4583d1eacf2ad9304e2ed9bd8

2. [custommodule].module

This is the actual source code for the override:

a9fb27b83ed20d368d19c454472d6464

This selects the “comments” case of the token values stack, and injects some information about the node inline. The handy bit we’re looking for is just author_mail but we’re including the other keys in case we want to make emails feel a bit more personal.

Add this directory to your development site (because we all keep two copies of our site up right, one for development and the other the live environment?) And browse to Administration>Site Building>Modules>Other and enable the module you just added.

Once you’ve done that, you should find that re-submitting a comment on a blog post appropriately sends an email to the original blog post author. Score 1 for Drupal. Hit me up on Twitter if you have any questions via @coalmarch

]]>
http://www.coalmarch.com/coalmarch-blog/team-blog/thomas-ingham-blog/20090512266/sending-comment-posted-emails-to-drupal-blog-authors.php