Drupal Role Specific Development Feedback

On rare occasions you may have to work on a production site and need some development feedback. If you want to control which role sees your output, this snippet can help. With this logic in place, only appropriate roles will see your working on the site.

Drupal Display PHP Errors on One Domain of Multi Site

When using a multi-site setup, You may want errors only to appear for one site. In that case, use $_SERVER[‘HTTP_HOST’] in an if statement to only display PHP error messages for the domain of your choice:

Drupal 7: How To Create a Views View from Within a Module (default view)

The whole idea in making a module is to make it, well ‘modular’, right? The person who is going to install the module should not have to create and configure a view. Chances are they would not get it just right anyway (you know, with all the exact settings the module depends upon). This is […]

Drupal 7: How to Make a Drupal Theme Function in a Module

This is intended as a simple reminder for all of those out there who find making a drupal theme a bit confusing at times. There are three main steps that all work together. 1) hook_theme which adds an array of callbacks and their arguments to the theme registry. You need to put this in your […]

DRUPAL 7: How to Expose a Field in Views

The other day when trying to expose a Filter criteria in a view of the Views module 7.x-3.1, I was frustrated by the fact that it would not function despite my best efforts. After triple checking my set up and reading a lot of documentation, there was no fix. Finally, after digging deep into some […]

Drupal 7 Calendar New Interface Set Up (in Views)

I found this very helpful video by Arlin Sandbulte on the Drupal Calendar version 7.3 configuration (Calendar 7.x-3.x-dev). The interface on this Calendar is quite different than what is shown in other slightly older videos. The new video for Drupal 7 Calendar New Interface Set Up.

HTML5: How to Make a datalist for a Form Field Input Element

Isn’t it nice when web developers make it easy for end users to fill out a form? One way to make for a pleasant user experience is to offer suggestions on a form’s input field. HTML5 now has a cool feature that makes this easier for the developers too! The HTML5 datalist element provides an […]

Get The Calling Function

Knowing which PHP function call the code we are working on can give us the clues we need for de-bugging a script. Getting the calling function is easy in PHP, thanks to the debug_backtrace() function. Just put the following code wherever in your script you need to know what function is calling the part you […]

How to Get All the Selected Values from a Multi-Select with jQuery

Need to know how to get all the selected values or text values from a multi select element (drop down)? Its simple with jQuery! Start by declaring an array. One for the values of the multi select element and one for the text values. Well, if you even need the text values from the multi […]