Putting the avatar in the top of member bar please.

Started by bodyboard_jerez, May 14, 2007, 05:40:15 PM

Previous topic - Next topic

bodyboard_jerez

Hi, I'm using the 1.1.2 with DilberMC theme. I would like to position the avatar in the top of the member bar....

You can view my image example here:



I have try to do it changing the code of index.template.php in this way:

<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '', '</td>

For example, I have add to the style of the td this:

margin-bottom:25px;
margin-top:0px:

But seems that the line of the welcome to users (in my case: 'Hello') affets to the issue and doesn't let to the image for positioned to really the top of the memberbar.

Thank you very much and good week to everbody !!
Thank you to everybody of the SMF forum !!! Great help and free service !!

bodyboard_jerez

 ;) I think it is possible... perhaps you thinks = ?

Thank you very much, I hope somebody can help me.  :)

Thank you to everybody of the SMF forum !!! Great help and free service !!

Kays

When I was trying that code, it was in the default theme and the avatar was properly centered. I also can't see anything off hand which would be causing it.

How does it look with no_avatar.gif?
Chech that one you're using to make sure there's no transperant border at the top.
What does it do with a smaller avatar?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

bodyboard_jerez

It happens with all the avatars  :( including the noavatar.gif and the rest...

Always happend it I thind... remembere I am using the DilberMC and 1.1.2

Thanks a lot. Bye !!
Thank you to everybody of the SMF forum !!! Great help and free service !!

bodyboard_jerez

Hi again !!, I have tried a lot of options... but I don't know why it happends....

What file do you think I have to change or modify please?

Thank you very much and good day !!
Thank you to everybody of the SMF forum !!! Great help and free service !!

bodyboard_jerez

Thank you to everybody of the SMF forum !!! Great help and free service !!

Gurnk

You may have more luck asking in the specific themes topic.

bodyboard_jerez

 ::) Sorry, I had posted in specific themes topic an nobody replies or says nothing about my issue...

In adittion, you could view another example here:

http://custom.simplemachines.org/themes/index.php?action=download;lemma=80;id=372;image

Could you help me with the 'problem' please? Thank you very much.
Thank you to everybody of the SMF forum !!! Great help and free service !!

Kays

That's happening because the "Hello" stuff is in a <tr> above that avatar which is pushing it down. What you have might be slightly different, but try changing.

<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="20">
</td>
<td class="memberbar">';

if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];

echo '
</td>

<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
' , $context['current_time'], '
<br/>
</td>

</tr>

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '', '</td>

<td class="memberbar">';

if($context['user']['is_logged'])


to:

<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '', '</td>

<td class="memberbar">';

if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];

if($context['user']['is_logged'])



The only thing is that this will get rid of the current time display since that's a part of that row.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

bodyboard_jerez

My code ( I don't know how to fix it... I have try it a lot...).

Thank you Kays !!

<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="20">
</td>
<td class="memberbar">';

if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];

echo '
</td>

<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
' , $context['current_time'], '
<br/>
</td>

</tr>

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>';

if($context['user']['is_logged'])
echo '
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '<img src="'. $settings['images_url']. '/Imagen_NO_AVATAR.jpg" alt="" />', '</td>';

else
echo '
<td></td>';

echo '
<td class="memberbar">';

if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />

</span>';
Thank you to everybody of the SMF forum !!! Great help and free service !!

Kays

What you posted, replace it with:

<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>';

if($context['user']['is_logged'])
echo '
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">', !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '<img src="'. $settings['images_url']. '/Imagen_NO_AVATAR.jpg" alt="" />', '</td>';

else
echo '
<td></td>';

echo '
<td class="memberbar">';

if($context['user']['is_logged'])
echo '
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];

if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />

</span>';


Do check to see what it looks like as a guest.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

bodyboard_jerez

 :o Solved perfectly Kays !! Thank's again for your time !! You are the one friend !!

See you !!  ;)
Thank you to everybody of the SMF forum !!! Great help and free service !!

Advertisement: