[development] Improving theme('username') with inspiration from Facebook

Bèr Kessels ber at webschuur.com
Wed Aug 22 13:21:40 UTC 2007


Op dinsdag 21 augustus 2007, schreef beerfan:
> It would already be possible to do this in a
> theme and your module with
>
> function phptemplate_username($object, $args = array())
>
> So the question is if or how this flexibility could be needed in core.
> You provide no examples.

What is not passed along is information such as $user->myself (flag to say: I 
am passing you the same user that the page is served to) things like that. 

I usuually create all such flags and variables (including $user->nicename, 
compiled from certain profile fields) in the phptemplate variable.

But the thing is, that most of these flags, and namespaces require a lot of 
business logic. Therefore having more $user->thingies is IMO a good thing.

Bèr
-- 
Drupal, Ruby on Rails and Joomla! development: webschuur.com | Drupal hosting: 
www.sympal.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20070822/59c886bb/attachment.pgp 


More information about the development mailing list