how can I put user avatar with welcome rightside message?

math_1048 - May 8, 2008 - 14:19
Project:Internet Services (with 2nd Edition)
Version:5.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello my friends
Thank you very much for this fine theme creator
are there away to put the
["Welcome 'user'
View | Edit | Logout"]
message with the user avatar block?
I made the block by the avatar catch code

<div class="login_form" align="left"><p>

<?php  global $user; ?>
<?php if (arg(0) == 'user' && $user->uid != arg(1)) : ?>
<div class="userpic2"><?php print theme('user_picture', $user->uid); ?></div>
<?php elseif ($user->uid) : ?>
<div class="userpic"><?php print theme('user_picture', $user); ?></div>
<?php else : ?>
<div class="userpic2"><img src="files/VIBer.png" /></div>
<?php endif; ?>
</p></div>

best regards

#1

hswong3i - May 8, 2008 - 16:46

Hmm... I have think for this idea a long long time ago too, seem that maybe much flexible if we able to add some custom message next to this hardcode "welcome" message.

Currently, this message is hardcode in search-theme-form.tpl.php. You may add your custom PHP code snippet after the <?php print $message ?> part. BTW, it is not too flexible, and your code may be override during version upgrade.

A better idea is implement this region as block region, so you will able to create custom block and display within this special region. But there is some drawback, too:

  • The region is too small, so the style may need to be very careful.
  • The width of this region is dynamic, depend on the right-hand-side search-theme-form.
  • Right-hand-side search-theme-form is now buggy in IE6, too. Before have a good solution (or we just ignore the complete support of IE6) for that, theming the left region may introduce more complicated problem...

Well... Just feel free to comment and let's brainstorm for a suitable solution :)

 
 

Drupal is a registered trademark of Dries Buytaert.