Submitted by madmatter23 on Mon, 10/08/2012 - 07:25
Just another quick snippet to add to the Grasmash Services archive.
This will allow you to POST an email address to /your_endpoint/user/password_reset and trigger a 'Forgot Password' email to be sent to the appropriate user.
Submitted by madmatter23 on Thu, 09/27/2012 - 07:58
I've decided to make a new home for the small snippets that I post periodically: Snippet Snacks. This will be small repository for useful Drupal snippets.
Here's the first one—a snippet that forms a bridge between Display Suite and Flag.
When added to a custom module, this snippet will provide Display Suite 'Flag this' and 'Flag Count' fields for each applicable Flag type.
Submitted by madmatter23 on Mon, 09/17/2012 - 15:37
Just a quick snippet!
Dropping this in a custom module will allow you to easily index values from the Flag module's {flag_count} table in a Search API Solr index.
Submitted by madmatter23 on Mon, 09/10/2012 - 14:16
Everyone loves the Services module. It allows you to easily create API endpoints for Drupal's core features, permitting you to interact with Drupal from external applications. It also very easily extended.
Among its many default resources, Services offers a user.login method that allows external applications to authenticate via Drupal. I'm going to share a quick snippet that will permit you to extend Services so that it allows your users to login via Facebook (leveraging the FBOauth module).
Start by downloading and enabling Services and Fboauth. Then, create a custom module to house your code. Your module's info file should specify services and fboauth as requirements.
Submitted by madmatter23 on Mon, 08/20/2012 - 13:16
Embedding a view programmatically is not too difficult, but what about passing it a value for an exposed filter? This snippet gives a simple example of how to modify the View object in a more meaningful way before rendering it.
Submitted by madmatter23 on Fri, 04/22/2011 - 10:41
Here's a little jQuery snippet that I use often. It lets you easily specify a 'hover-state' image for any html element with class 'rollover.' Just set the rel attribute to equal the rollover image, and the src attribute to equal the original.
Recent comments