development

Add Block Regions to your User Profile page in Drupal 5 and 6

18
Aug
2008

Here's a small snippet to allow the output of blocks in your user profiles. This is assuming that you are currently over-riding the user page with the following code:

Update!

I've added code for both Drupal 5 and 6, take a look.

Drupal 5

<?php
/**
* Catch the theme_user_profile function, and redirect through the template api
*/
function phptemplate_user_profile($user, $fields = array()) {
 
// Pass to phptemplate, including translating the parameters to an associative array. The element names are the names that the variables
  // will be assigned within your template.
  /* potential need for other code to extract field info */
return _phptemplate_callback('user_profile', array('user' => $user, 'fields' => $fields));
  }
?>

(Code from: http://drupal.org/node/35728 )

and have your user_profile.tpl.php named as so.

Settings up your block regions:

First we'll slip into our theme's template.php file and make sure we create a new region.

Drupalcamp Vancouver: jQuery for Designers and Drupal Theming

6
May
2008

So Drupalcamp Vancouver is right around the corner and I'm sitting here preparing for 2 of my sessions: Designers Guide to jQuery and Drupal Theming. Both sessions are focused towards beginners as well as designers, but as always, all are welcome to attend and participate in discussion.

The jQuery session will be back-to-back with the Developers Guide to jQuery lead by a collegue of mine, Katherine Bailey. I will be covering the very basics of jQuery for web designers who are interested in utilizing the potential of jQuery but are over-come by the learning curve of having to learn a programming language. Believe me, it's easy! I'll also be doing a live tutorial as well as some simple implementations of jQuery animations within Drupal.

Our Drupal Theming session, lead by Mark Yuasa and myself (and maybe Hubert), will be an overview of taking a design to a functioning drupal theme. If you happened to miss our theming session in January and wanted to attend, this will be the one to be at.

Hope to see some new faces and meet new people! See you then.

Update:

Here's my post on the slides from this presentation. Please leave comments and questions in that post and not this one.
http://stevekrueger.com/braingarden/2008/05/10/designers-guide-jquery-drupalcamp-vancouver-presentation