Skip to Content

Theming User Profiles

Dans cette vidéo, Bob nous montre une astuce de "theming" : comment personnaliser la page de profil des utilisateurs (core module Profile) => récupération du template user-profile.tpl.php dans le module Profile + affichage des éléments de la variable $account => essayez le print_r($account) !!

Attention ! Cet article/vidéo est en Anglais.

FAIL (the browser should render some flash content, not this).

On this week's Mustardseed Media Video Podcast, Bob gives you the basics on how to theme user profiles using Drupal's core Profile Module. He talks about print_r, the $account variable, and puzzles over why the user-profile.tpl.php doesn't mention a crucial element. All this week!

3.75
Average: 3.8 (4 votes)
Your rating: Aucun
Auteur: 
Bob Christenson

Commentaires :

warning about $account scope

Portrait de Anonyme

I don't know if you've note that the account array is specific to the LOGGED USER. if you use that array for viewing users profiles, the logged person will allways see its profile and not the person he wanted.

administrator is logged and wants to see someone's profile using the template with $account values will see its own informations. am i wrong?

so that's why i think they didn't put this variable in the available ones due to its potential conflict.

sorry for my english, but hope it could help, i've been trapped

administrator is logged and

Portrait de robin

administrator is logged and wants to see someone's profile using the template with $account values will see its own informations. am i wrong?
=> this is a good question, I have doubts about ... have to be tested (no time to do it now).

Ne fonctionne pas avec Drupal 7.0-alpha3

Portrait de Anonyme

Quelqu'un pourrait-il me dire comment faire une chose similaire avec Drupal 7.0-alpha3 ?
J'ai essayé la méthode décrite dans la vidéo mais print_r($account) ne fonctionne apparemment plus sur la nouvelle mouture.
Et moi je suis bien bloqué dans mon avancement... :-(
Merci d'avance biboo si tu m'entends ou les autres...

Pour Drupal 7 / for Drupal 7

Portrait de Anonyme

<?php print_r($elements['#account']); ?>

Poster un nouveau commentaire

Le contenu de ce champ ne sera pas montré publiquement. Si vous avez un compte gravatar, l'utilisez pour afficher votre avatar.
  • Tags HTML autorisés : <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Les lignes et les paragraphes vont à la ligne automatiquement.
  • Les adresses de pages web et de messagerie électronique sont transformées en liens automatiquement.

Plus d'informations sur les options de formatage

By submitting this form, you accept the Mollom privacy policy.