Need an array of user roles in your Drupal 8 site? Say goodbye to
user_roles(), say hello to
This function will return an associative array with the role id as the key and the role name as the value.
Continue reading “Drupal 8: Get an Array of User Roles”
Looking for how to create new module permissions in Drupal 8? Look no further,
$module.permissions.yml to the rescue!
In Drupal 8 permissions are now defined in
$module.permissions.yml file instead of using
Continue reading “Drupal 8: Create Module Permissions”
Boost the performance of your Drupal 7 website, improve usability and help with SEO by making content load via AJAX in just a few steps.
Drupal AJAX is a cinch to implement—as it should be since core is loaded with it. In just a few of steps I’ll show you how to use jQuery and Drupal’s
hook_menu() function to quickly build a AJAX function to return anything from HTML to a JSON array.
Continue reading “Simple Drupal 7 AJAX Implementation”
Build awesome apps with Google Analytics API for PHP. Learn how to use the Google Analytics API and PHP to bring data directly to your site or app.
Build some awesome apps and site functionality with Google Analytics API for PHP.
Recently I needed to build a simple web app that uses the Google Analytics API. Google’s documentation on the subject is a little lackluster and with constant updates to their interface, the documentation often times lags behind. Other times steps are completely left out because they don’t need to hold the hands of dummies like me. Well other dummies, I’m here to hold your hand and walk you through how to use the GA API with PHP. Continue reading “Google Analytics API Tutorial with PHP for Dummies”
The MailChimp Campaign CSV Parser is a PHP library to take a downloaded MailChimp Campaign CSV export and parse it in a easy-to-use array. Includes industry rates to compare statistics with.
I’ve worked with MailChimp a lot in past and current projects. My biggest compliant is they’re lack of detailed reports and overly restrictive API usage limits. A common problem I’ve had is extrapolating data from they’re campaign CSV reports — I do this because you can pull more data from the downloaded CSV at one time than the API. A long list of campaign details is useless to marketers if they can’t easy consume, comprehend and make quick decisions off the data. That’s where the MailChimp Campaign CSV Parser PHP library comes in.
Continue reading “PHP MailChimp Campaign CSV Parser”