Drupal 7 Services Example - PHP Curl

I had a need to consume a custom service I created in Drupal services. There's loads of tutorials on how to do that, feel free to google. But my previous code for using the api I created was for D6, a few things have changed. Looking around I found most examples were javascript, or using drupal's http library. I wrote a tiny little object just as a simple way to consume using curl for reference. It's not complete, but it lets you log in and out. You can take it from there to build what you need.


Caching Drupal Renderable Arrays

Love getting to learn something new. Going through some tutorials today, I realized there's an 'easy' hook to enable caching of the renderable arrays I never knew about. What exactly is a renderable array? ... Maybe the easiest way you can think of it is structured data that needs to be transformed into html. Previously I'd been using cache_set and cache_get, but this is quicker, and a bit more flexible.

Bulk Uploading Redirects In Drupal 7

Had a client today with a list of 135ish redirects that needed entered, and a decent enough budget for me to do more than shove them in. I put together an admin page that allows you to upload a csv to be processed containing an internal source, destination, and redirect type (status code).


Loading Drupal Core Include Files (The Right Way)

Maybe it's because I've done more with Drupal that's off the map.. Or maybe I just dug further than others, but I've noticed way too many developers giving poor advice when it comes to loading the core include files. Allow me to correct that issue for you, and more importantly explain why you need to do it the right way.



Subscribe to RSS - Drupal