SimplePortal

Support => English Support => Topic started by: AlenNS on October 26, 2008, 08:30:49 PM

Title: Top posters block align error
Post by: AlenNS on October 26, 2008, 08:30:49 PM
I have problem with this block...

(http://i37.tinypic.com/cn8zr.jpg)

Can I make better align of avatars and names?
Title: Re: Top posters block align error
Post by: AlenNS on October 27, 2008, 11:43:32 PM
Bump! D:
Title: Re: Top posters block align error
Post by: ???1031 on October 28, 2008, 01:39:09 AM
I have problem with this block...

(http://i37.tinypic.com/cn8zr.jpg)

Can I make better align of avatars and names?
Oha this looks strange :X.
Which SMF and SP Version?

Title: Re: Top posters block align error
Post by: AlenNS on October 28, 2008, 09:07:49 PM
SMF 2.0 Beta 4 and SP 2.0.5
Title: Re: Top posters block align error
Post by: ???1031 on October 29, 2008, 06:58:09 AM
SMF 2.0 Beta 4 and SP 2.0.5
Can i've a page link, i would like to see the output on a live system.

Bye
DIN1031
Title: Re: Top posters block align error
Post by: AlenNS on October 29, 2008, 08:52:28 AM
Of course.  :)

http://www.baklja.com/forum/index.php
Title: Re: Top posters block align error
Post by: ???1031 on October 29, 2008, 11:33:08 AM
There is one way to fix it, but it could be possible that you can not upgrade any more :)

Replace in the $sourcedir/SPortal2.php

Code: [Select]
foreach ($top_posters as $member)
echo '
<li', empty($member['avatar']['href']) ? ' style="padding-left: 40px;"' : '', '>
', empty($member['avatar']['href']) ? '' : '<img src="' . $member['avatar']['href'] . '" alt="" width="35" align="left" style="padding-right: 5px" />', $member['link'], '<br />', $member['posts'], $txt['sp-tposterpost'], '<br /><br />
</li>';

with

Code: [Select]
foreach ($top_posters as $member)
echo '
<li style="display:block; clear:left;">
', empty($member['avatar']['href']) ? '<div style="float:left; height:35px; width:35px; padding: 0px 5px 5px 0px;">&nbsp;</div>' : '<img src="' . $member['avatar']['href'] . '" alt="" width="35" align="left" style="padding: 0px 5px 5px 0px;" />
', $member['link'], '<br />', $member['posts'], $txt['sp-tposterpost'], '
</li>';

Bye
DIN1031

Title: Re: Top posters block align error
Post by: AlenNS on October 29, 2008, 05:08:56 PM
Great! :D
This solved problem.

P.S. There is still one problem, one user doesn't have avatar and now it look like this...
Title: Re: Top posters block align error
Post by: ???1031 on October 30, 2008, 02:01:10 AM
oO i was sure that i tried it without avantar, and it looks normal... i think i must made a second test.

I think it have something to do with the -> ', empty($member['avatar']['href']) ? ' padding-left: 40px;"' : '', '  but i'm not sure.

Bye
DIN1031
Title: Re: Top posters block align error
Post by: AlenNS on October 31, 2008, 07:33:39 PM
I don't know.
This is realy separated.
Title: Re: Top posters block align error
Post by: ???1031 on November 01, 2008, 07:40:56 AM
Code: [Select]
foreach ($top_posters as $member)
echo '
<li style="display:block; clear:left;">
', empty($member['avatar']['href']) ? '<div style="float:left; height:35px; width:35px; padding: 0px 5px 5px 0px;">&nbsp;</div>' : '<img src="' . $member['avatar']['href'] . '" alt="" width="35" align="left" style="padding: 0px 5px 5px 0px;" />
', $member['link'], '<br />', $member['posts'], $txt['sp-tposterpost'], '
</li>';

So i this is the code who work, but i testet it only on FF, i will test it later on some other browsers ;)
Okay work with opera 8.x, 9.6, FF 2,3 and with IE 6,7,8.
Title: Re: Top posters block align error
Post by: AlenNS on November 02, 2008, 09:32:23 AM
Thanks! It's solved my problem. :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal