Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

January 31, 2023, 09:03:07 AM

Login with username, password and session length
Members
  • Total Members: 3856
  • Latest: Bixby
Stats
  • Total Posts: 193910
  • Total Topics: 21127
  • Online today: 49
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 1
Guests: 28
Total: 29

Author Topic: [Block] Avatar of Users Online  (Read 52413 times)

0 Members and 1 Guest are viewing this topic.

NenaGb

  • Guest
Re: [Block] Avatar of Users Online
« Reply #100 on: April 20, 2009, 10:35:11 PM »
how can i center the avatars in the block?

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [Block] Avatar of Users Online
« Reply #101 on: April 21, 2009, 07:58:12 AM »
I suppose you could just add align="center" to the table code.
<table class="avatar_column">

fl4pj4ck

  • Guest
Re: [Block] Avatar of Users Online
« Reply #102 on: March 20, 2010, 02:06:50 PM »
there's a missing </td> in the code, spotted it today when working on w3 validation

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [Block] Avatar of Users Online
« Reply #103 on: March 21, 2010, 06:56:04 PM »
All </td>'s are there that I can see. Maybe if you don't have any users online it may not show any <td>'s.

fl4pj4ck

  • Guest
Re: [Block] Avatar of Users Online
« Reply #104 on: March 21, 2010, 07:12:14 PM »
Quote
         if ($counter < $columns)
         {
            echo '
                <td>',empty($user['avatar']['image']) ? '<a href="'.$user['href'].'"><img class="'.$css.'" src="'.$settings['images_url'].'/default_avatar.gif" width="'.$width.'" height="'.$height.'" alt="" title="'.$user['name'].'" />[/url]<h6>'.$user['name'].'</h6><MISSING /td>' : '<a href="'.$user['href'].'"><img class="'.$css.'" '.$user['avatar']['image'].'[/url]<h6>'.$user['name'].'</h6></td>';
             $counter++;
         }
         else
         {
            echo '
            </tr>
            <tr>
               <td>',empty($user['avatar']['image']) ? '<a href="'.$user['href'].'"><img class="'.$css.'" src="'.$settings['images_url'].'/default_avatar.gif" width="'.$width.'" height="'.$height.'" alt="" />[/url]<h6>'.$user['name'].'</h6><MISSING /td>' : '<a href="'.$user['href'].'"><img class="'.$css.'" '.$user['avatar']['image'].'[/url]<h6>'.$user['name'].'</h6></td>';
            $counter = 1;
         }

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [Block] Avatar of Users Online
« Reply #105 on: March 21, 2010, 07:53:01 PM »
Ah yes, in the middle of the turnary statement.... Didn't see that one. lol I meant to do it like the second snippet where the </td> wasn't included in the statement.

Offline Lord Anubis

  • Hero Member
  • *****
  • Posts: 679
Re: [Block] Avatar of Users Online
« Reply #106 on: June 06, 2011, 06:03:12 PM »
Did some modifying to the block...



Finally got it the way I wanted, great code Ich  O0