Frontend

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… Read more Drupal 7: How To Create a Views View from Within a Module (default view)

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… Read more Drupal 7: How to Make a Drupal Theme Function in a Module

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… Read more HTML5: How to Make a datalist for a Form Field Input Element

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… Read more How to Get All the Selected Values from a Multi-Select with jQuery