Adding BCC to contact form

So today's assignment was to add a BCC to all emails that were being sent via the contact form.  As a backgrounder, I have a content type called Contact.  Each contact has an email field.  The email field is of type Email CCK.  In the display settings for the Contact type, I configure the email field to render as a contact form.  This allows me to protect the contact's email address from spam harvesters.

Contact settings Hourly threshold does not work

While trying to test out the contact form, I ran against the threshold, so I decided to bump up the threshold, but I kept getting the following message.

Email Contact Form

You cannot send more than 3 messages per hour. Please try again later.


Where's the worm for your drupal hook?

Been away from Drupal for a few (combination of Java work and vacation).  My task was to implement a BCC for a particular email that was going out.

I found the hook_mail_alter

I fire up my editor, grab the lates svn updates and plunk down the following "hello hook" into my custom theme. 


Menu access control solves 50% of the problem

Well nothing like seeing for yourself is something was possible or not!

I need to protect a page from being accessed by anonymous users.  I see that each menu (in administration) can be tied down by role or if a user is authenticated or not.  I modified the menu that pointed to this page to only be accessible to a logged in user.  The module that provides the menu/role access control is of course named "

I logged out.

Viewing the sql generated from a view

Yes, super simple, but it did take me a good 15 minutes to figure out how.
In my mymodule_views_query_alter(&$view, &$query) function, I had access to the $query variable.  Doing a print and print_r of the query object provided a object view of the query, but NOT the underlying SQL
I dug into the views module and discovered the Query class (in views/include) and it described a "query" function that built up the sql string.
Hence, this worked for me (it output the sql that the view would generate):

Email CCK Field

Drupal has a custom CCK field for email addresses.  Their is a custom Drupal module that provides this field.  One of the ways that I am using it is to associate different Content types that I have (Students and Faculty) with this field.  Once this field is on that content type, I can hit the "Display Settings" for the content field and choose to use a Contact form. This is a far better option than exposing a naked email address for all the email harvesting spambots out there.

TinyMCE inserting from template bug with invalid xhtml output

So when you insert html from a template using the tinymce editor, valid xml goes in, invalid xml goes out....
If I take the same html and insert it into the html input of the editor, it remains valid.
I figured out how to get around this, but building the template inside the wysiwyg is pasting it into the template file

Repeating Date in Calendar

I just got repeating events to display finally on the calendar views.

To summarize:

a pirate walks into a bar...

a pirate walks into a bar with a paper towel sitting on the top of his hat. The bartender, not able to contain his curiosity, asks "OK pal, whats with the paper towel?" To which the pirate replies....... "Yarrr, thar be a bounty on me head"

Syndicate content