
Category: Uncategorized
“Il Capo” by Yuri Ancarani
“ll Capo” (Excerpt) by Yuri Ancarani. Visit the website I wonder where I could see or buy this movie
Drupal’s t() variable sanitization
- !variable: Inserted as is. Use this for text that has already been sanitized.
- @variable: Escaped to HTML using check_plain(). Use this for anything displayed on a page on the site.
- %variable: Escaped as a placeholder for user-submitted content using drupal_placeholder(), which shows up as emphasized text.
Ice Cream Hypothermia: Embedding gists to Tumblr
Ice Cream Hypothermia: Embedding gists to Tumblr
I searched for a while for an easy way to embed gists to Tumblr. This is going to be a coding blog, after all. I found some promising solutions and decided to extend one of them to my taste.
Since I use markdown, I wanted to be able to simply paste the link to my gist in the post and everything…
A convenient way to post code snippets to your Tumblr blog.
Drupal 7 Webforms To Salesforce
When you are using your website to support sales (or conversions otherwise) on a daily basis, Salesforce is one of the better CRM options available.
With it’s extensive support for custom integrations and connectors (Wufoo, CampaignMonitor,…), it’s relatively easy to build solutions right into your existing online marketing ecosystem.
We had in our case, using Drupal 7 as the basis for our website, a wide range of modules available that (claim to) provide integration out of the box.
This is how we got the right solution for our setup:
Summary:
- use the Salesforce Suite module with this patch
- use the Sforce.com PHP toolkit
- generate an Enterprise.wsdl.xml for your setup
- configure and test the Salesforce Suite module
- install the Webform module
- install our custom Salesforce Webform integration
- configure your webforms
Salesforce suite
Salesforce Suite provides a robust integration with the Salesforce API, at least after patching it. It uses the Sforce.com PHP toolkit to connect to the Enterprise version of the API.
It then provides mapping between Drupal objects (nodes, users) and Salesforce objects. You could setup a Drupal event content type, map this to Salesforce Campaigns, setup a user as lead or contactperson and create a form that maps registrations to the event to campaignmembers in Salesforce. Read more in this presentation from slide 86 onward
If you are attracting a significant amount of prospects and they don’t engage on a regular basis, then you don’t want to create user accounts for every person that converts. Drupal Webforms are better suited for that.
Salesforce webform
Submitting the values of a Webform to Salesforce is a prblem many tried to solve. The salesforce webform module is a decent solution for Drupal 6, but for Drupal 7 it is in alpha and still lacking. I couldn’t get it to work without patching it.
The unofficial Drupal module Salesforce Webform integration worked like a charm on our Drupal 7.14 setup. It depends on the module mentioned above: Salesforce Suite, to integrate the API and provides the tools to map Webform 7.x-3.18 fields to your Salesforce objects.
We decided to extend this module until it fully met our needs by adding the following functionality:
- enables the module on all webforms, not only webform nodes
- lets you choose a field to “upsert” on, typically the email adres (the upsert field behaves as if it were a unique key)
- lets you choose a campaign per webform to subscribe to, and create a Salesforce CampaignMember accordingly when submitting the form (campaigns need to be created in the Salesforce interface)
- lets you set the status of the CampaignMember per webform
This updated version of the module is available here.
I’d love to here your feedback on Twitter!
station dak (Taken with Instagram at Station Brussel-Noord / Gare De Bruxelles-Nord)
sun (Taken with Instagram at Vrije Universiteit Brussel (VUB))
Convert php Arrays to Objects
Sometimes you need a php Array in an Object or the other way around:
class Utils{ static function array2object($data) { if(!is_array($data)) return $data; $object = new stdClass(); if (is_array($data) && count($data) > 0) { foreach ($data as $name=>$value) { $name = strtolower(trim($name)); $object->$name = Utils::array2object($value); } } return $object; } static function object2array($data){ if(!is_object($data) && !is_array($data)) return $data; if(is_object($data)) $data = get_object_vars($data); return array_map('object2array', $data); } }