Page 1 of 1

Avatars in Who is Online

PostPosted: Tue Jul 24, 2007 10:45 pm
by lefty
Modification name: Avatars in Who is Online
Author: lefty74
Modification description: Shows the Avatar of users in the Who is online page.
Modification version: 1.0.0
Tested on phpBB version: 3.0
Download file: Avatar_in_Who_is_online_1_0_0.zip
File size: 30833 Bytes

Modification overview page at phpbb.com: View

Demo Board: Demoboard
Demo Username: test
Demo Password: testtest
Image

Re: [BETA] Avatars in Who is Online 0.0.2

PostPosted: Mon Jan 14, 2008 10:46 pm
by lefty
updated to version 0.0.2
Code: Select all
## 2008-01-14 - Version 0.0.2
##      -resizes avatar to a max width/height

Re: [MODDB] Avatars in Who is Online

PostPosted: Tue Mar 11, 2008 9:01 pm
by lefty

Re: Avatars in Who is Online

PostPosted: Sun Oct 05, 2008 3:38 pm
by sK*sl!ce
Hi Lefty - I'm stuck on this last step in subsilver2:

Code: Select all
Find
Tip: This may be a partial find and not the whole line.

Code: Select All
      <td class="row1" colspan="{%:1}"><b class="gensmall">{L_LEGEND} :: {LEGEND}</b></td>

Increment
Tip: This allows you to alter integers. For help on what each operator means, click here.

Code: Select All
%:1


In that line, I had colspan="3"

I'm not sure if that's the only problem, but the avatars are not posting by who's online. I have purged my cache and refreshed my template and still nothing. One funny thing tho, the birthday announcement in acp skipped the first birthday since install, altogether. Now, the second one is displaying properly so maybe some processes are slow on the server? Just thinking out loud :happysmerk:

Re: Avatars in Who is Online

PostPosted: Sun Oct 05, 2008 3:44 pm
by lefty
sK*sl!ce wrote:In that line, I had colspan="3"

hi,
it should be increased to colspan="4" in your case

the avatars should show once you click on the who is online link, they will not show on the index.

for the birthday, i am using the same code as for the index so i have no idea why it did not show on the announcement, it should assuming that they are set to show.

Re: Avatars in Who is Online

PostPosted: Sun Oct 05, 2008 3:48 pm
by sK*sl!ce
Ahh, I see. I thought they would be on the index page. And the birthday does display on the announcement now. Just strange that it skipped the first birthday all together ;) Seems to be working now! :thumbsup:

Re: Avatars in Who is Online

PostPosted: Mon Oct 06, 2008 11:09 am
by lefty
sK*sl!ce wrote:Ahh, I see. I thought they would be on the index page. And the birthday does display on the announcement now. Just strange that it skipped the first birthday all together ;) Seems to be working now! :thumbsup:

:thumbsup: :happysmerk:

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 2:50 pm
by Odiii
Hello!
Sorry, iam german, so i dont can speak english very god ^^

My Problem:
I install the mod but nothing happens.
I use this Style: http://demo.phpbb3styles.net/Blue+Moon

I have no Idea what problem i have...
I clear my cache (under Styles->Template and normaly) but no results, no error and no changes.

Do u can help me pls?
I only must edit the files or?

Greetz.
Odiii

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 6:59 pm
by lefty
sprich doch einfach deutsch :P

sollte eigentlich kein problem sein, die avatare siehst du allerdings nicht auf der index page, musst schon auf den Who is Online klicken (root/viewonline.php) :wink:

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 8:08 pm
by Odiii
sehr komisch. Da bekomm ich folgende Fehlermeldung:
Fatal error: Call to a member function session_begin() on a non-object in /home/toico/public_html/phpbb3/viewonline.php on line 20


Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id: viewonline.php 8677 2008-07-03 12:43:49Z acydburn $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('memberlist');

// Get and set some variables
$mode      = request_var('mode', '');
$session_id   = request_var('s', '');
$start      = request_var('start', 0);
$sort_key   = request_var('sk', 'b');
$sort_dir   = request_var('sd', 'd');
$show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0;

// Can this user view profiles/memberlist?
if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
{
   if ($user->data['user_id'] != ANONYMOUS)
   {
      trigger_error('NO_VIEW_USERS');
   }

   login_box('', $user->lang['LOGIN_EXPLAIN_VIEWONLINE']);
}

$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page');

// Sorting and order
if (!isset($sort_key_text[$sort_key]))
{
   $sort_key = 'b';
}

$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');

// Whois requested
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
{
   include($phpbb_root_path . 'includes/functions_user.' . $phpEx);

   $sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip
      FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s
      WHERE s.session_id = '" . $db->sql_escape($session_id) . "'
         AND   u.user_id = s.session_user_id";
   $result = $db->sql_query($sql);

   if ($row = $db->sql_fetchrow($result))
   {
      $template->assign_var('WHOIS', user_ipwhois($row['session_ip']));
   }
   $db->sql_freeresult($result);

   // Output the page
   page_header($user->lang['WHO_IS_ONLINE']);

   $template->set_filenames(array(
      'body' => 'viewonline_whois.html')
   );
   make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

   page_footer();
}

// Forum info
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
   FROM ' . FORUMS_TABLE . '
   ORDER BY left_id ASC';
$result = $db->sql_query($sql, 600);

$forum_data = array();
while ($row = $db->sql_fetchrow($result))
{
   $forum_data[$row['forum_id']] = $row;
}
$db->sql_freeresult($result);

$guest_counter = 0;

// Get number of online guests (if we do not display them)
if (!$show_guests)
{
   switch ($db->sql_layer)
   {
      case 'sqlite':
         $sql = 'SELECT COUNT(session_ip) as num_guests
            FROM (
               SELECT DISTINCT session_ip
                  FROM ' . SESSIONS_TABLE . '
                  WHERE session_user_id = ' . ANONYMOUS . '
                     AND session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
            ')';
      break;

      default:
         $sql = 'SELECT COUNT(DISTINCT session_ip) as num_guests
            FROM ' . SESSIONS_TABLE . '
            WHERE session_user_id = ' . ANONYMOUS . '
               AND session_time >= ' . (time() - ($config['load_online_time'] * 60));
      break;
   }
   $result = $db->sql_query($sql);
   $guest_counter = (int) $db->sql_fetchfield('num_guests');
   $db->sql_freeresult($result);
}

// Get user list
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline, s.session_forum_id, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height
   FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s
   WHERE u.user_id = s.session_user_id
      AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
      ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . '
   ORDER BY ' . $order_by;
$result = $db->sql_query($sql);

$prev_id = $prev_ip = $user_list = array();
$logged_visible_online = $logged_hidden_online = $counter = 0;

while ($row = $db->sql_fetchrow($result))
{
   if ($row['user_id'] != ANONYMOUS && !isset($prev_id[$row['user_id']]))
   {
      $view_online = $s_user_hidden = false;
      $user_colour = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] . '" class="username-coloured"' : '';

      $username_full = ($row['user_type'] != USER_IGNORE) ? get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) : '<span' . $user_colour . '>' . $row['username'] . '</span>';

      if (!$row['session_viewonline'])
      {
         $view_online = ($auth->acl_get('u_viewonline')) ? true : false;
         $logged_hidden_online++;

         $username_full = '<em>' . $username_full . '</em>';
         $s_user_hidden = true;
      }
      else
      {
         $view_online = true;
         $logged_visible_online++;
      }

      $prev_id[$row['user_id']] = 1;

      if ($view_online)
      {
         $counter++;
      }

      if (!$view_online || $counter > $start + $config['topics_per_page'] || $counter <= $start)
      {
         continue;
      }
   }
   else if ($show_guests && $row['user_id'] == ANONYMOUS && !isset($prev_ip[$row['session_ip']]))
   {
      $prev_ip[$row['session_ip']] = 1;
      $guest_counter++;
      $counter++;

      if ($counter > $start + $config['topics_per_page'] || $counter <= $start)
      {
         continue;
      }

      $s_user_hidden = false;
      $username_full = get_username_string('full', $row['user_id'], $user->lang['GUEST']);
   }
   else
   {
      continue;
   }

   preg_match('#^([a-z/]+)#i', $row['session_page'], $on_page);
   if (!sizeof($on_page))
   {
      $on_page[1] = '';
   }

   switch ($on_page[1])
   {
      case 'index':
         $location = $user->lang['INDEX'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;

      case 'adm/index':
         $location = $user->lang['ACP'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;

      case 'posting':
      case 'viewforum':
      case 'viewtopic':
         $forum_id = $row['session_forum_id'];

         if ($forum_id && $auth->acl_get('f_list', $forum_id))
         {
            $location = '';
            $location_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);

            if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK)
            {
               $location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
               break;
            }

            switch ($on_page[1])
            {
               case 'posting':
                  preg_match('#mode=([a-z]+)#', $row['session_page'], $on_page);
                  $posting_mode = (!empty($on_page[1])) ? $on_page[1] : '';

                  switch ($posting_mode)
                  {
                     case 'reply':
                     case 'quote':
                        $location = sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                     break;

                     default:
                        $location = sprintf($user->lang['POSTING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
                     break;
                  }
               break;

               case 'viewtopic':
                  $location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);
               break;

               case 'viewforum':
                  $location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']);
               break;
            }
         }
         else
         {
            $location = $user->lang['INDEX'];
            $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
         }
      break;

      case 'search':
         $location = $user->lang['SEARCHING_FORUMS'];
         $location_url = append_sid("{$phpbb_root_path}search.$phpEx");
      break;

      case 'faq':
         $location = $user->lang['VIEWING_FAQ'];
         $location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
      break;

      case 'viewonline':
         $location = $user->lang['VIEWING_ONLINE'];
         $location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
      break;

      case 'memberlist':
         $location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
         $location_url = append_sid("{$phpbb_root_path}memberlist.$phpEx");
      break;

      case 'mcp':
         $location = $user->lang['VIEWING_MCP'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;

      case 'ucp':
         $location = $user->lang['VIEWING_UCP'];

         // Grab some common modules
         $url_params = array(
            'mode=register'      => 'VIEWING_REGISTER',
            'i=pm&mode=compose'   => 'POSTING_PRIVATE_MESSAGE',
            'i=pm&'            => 'VIEWING_PRIVATE_MESSAGES',
            'i=profile&'      => 'CHANGING_PROFILE',
            'i=prefs&'         => 'CHANGING_PREFERENCES',
         );

         foreach ($url_params as $param => $lang)
         {
            if (strpos($row['session_page'], $param) !== false)
            {
               $location = $user->lang[$lang];
               break;
            }
         }

         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;

      case 'arcade':
         if (!isset($arcade))
         {
            include($phpbb_root_path . 'includes/arcade/arcade_common.' . $phpEx);
            include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
            // Initialize arcade auth
            $auth_arcade->acl($user->data);
            // Initialize arcade class
            $arcade = new arcade(false);
         }

         // Grab some common modules
         $url_params = array(
            'mode=play'         => 'PLAYING_GAME',
            'mode=cat'         => 'VIEWING_ARCADE_CAT',
            'mode=download'      => 'DOWNLOADING_GAME',
            'mode=stats'      => 'VIEWING_ARCADE_STATS',
            'mode=popup'      => 'PLAYING_GAME',
            'mode=search'      => 'VIEWING_ARCADE_SEARCH',
            'mode=fav'         => 'VIEWING_ARCADE_FAVS',
         );

         $found_arcade = false;
         foreach ($url_params as $param => $lang)
         {
            if (strpos($row['session_page'], $param) !== false)
            {
               $found_arcade = true;
               if ($param == 'mode=cat')
               {
                  preg_match('#c=([0-9]+)#', $row['session_page'], $cat_id);
                  $cat_id = (sizeof($cat_id)) ? (int) $cat_id[1] : 0;

                  if (!$auth_arcade->acl_get('c_view', $cat_id))
                  {
                     $found_arcade = false;
                     break;
                  }

                  $cat_name = $arcade->get_cat_name($cat_id);

                  $location = sprintf($user->lang[$lang], $cat_name);
                  $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=cat&amp;c=' . $cat_id);
               }
               else if ($param == 'mode=download')
               {
                  preg_match('#g=([0-9]+)#', $row['session_page'], $game_id);
                  $game_id = (sizeof($game_id)) ? (int) $game_id[1] : 0;

                  $game_name = $arcade->get_game_field($game_id, 'game_name');
                  if (!$game_name)
                  {
                     $found_arcade = false;
                     break;
                  }

                  $location = sprintf($user->lang[$lang], $game_name);
                  $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=download&amp;g=' . $game_id);
               }
               else if ($param == 'mode=play' || $param == 'mode=popup')
               {
                  preg_match('#g=([0-9]+)#', $row['session_page'], $game_id);
                  $game_id = (sizeof($game_id)) ? (int) $game_id[1] : 0;

                  $game_name = $arcade->get_game_field($game_id, 'game_name');
                  if (!$game_name)
                  {
                     $found_arcade = false;
                     break;
                  }

                  $location = sprintf($user->lang[$lang], $game_name);
                  $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=play&amp;g=' . $game_id);

               }
               else if ($param == 'mode=stats')
               {
                  preg_match('#g=([0-9]+)#', $row['session_page'], $game_id);
                  $game_id = (sizeof($game_id)) ? (int) $game_id[1] : 0;

                  preg_match('#u=([0-9]+)#', $row['session_page'], $user_id);
                  $user_id = (sizeof($user_id)) ? (int) $user_id[1] : 0;

                  if ($game_id && $user_id)
                  {
                     $game_name = $arcade->get_game_field($game_id, 'game_name');
                     if (!$game_name)
                     {
                        $found_arcade = false;
                        break;
                     }

                     $user_id_ary[] = $user_id;
                     $arcade_usernames = array();
                     user_get_id_name($user_id_ary, $arcade_usernames);
                     $arcade_username = $arcade_usernames[$user_id];

                     $location = sprintf($user->lang[$lang . '_GAME_USER'], $game_name, $arcade_username);
                     $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", "mode=stats&amp;g=$game_id&amp;u=$user_id");
                  }
                  else if ($game_id)
                  {
                     $game_name = $arcade->get_game_field($game_id, 'game_name');
                     if (!$game_name)
                     {
                        $found_arcade = false;
                        break;
                     }

                     $location = sprintf($user->lang[$lang . '_GAME'], $game_name);
                     $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", "mode=stats&amp;g=$game_id");
                  }
                  else if ($user_id)
                  {
                     $user_id_ary[] = $user_id;
                     $arcade_usernames = array();
                     user_get_id_name($user_id_ary, $arcade_usernames);
                     $arcade_username = $arcade_usernames[$user_id];

                     $location = sprintf($user->lang[$lang . '_USER'], $arcade_username);
                     $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx", "mode=stats&amp;u=$user_id");
                  }

               }
               else
               {
                  $location = $user->lang[$lang];
                  $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx");
               }
               break;
            }
         }

         if (!$found_arcade)
         {
            $location = $user->lang['VIEWING_ARCADE'];
            $location_url = append_sid("{$phpbb_root_path}arcade.$phpEx");
         }
      break;

      case 'download':
         $location = $user->lang['DOWNLOADING_FILE'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;

      case 'report':
         $location = $user->lang['REPORTING_POST'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;
      
      case 'portal':
         $user->add_lang('mods/lang_portal');
         $location = $user->lang['VIEWING_PORTAL'];
         $location_url = append_sid("{$phpbb_root_path}portal.$phpEx");
      break;

      default:
         $location = $user->lang['INDEX'];
         $location_url = append_sid("{$phpbb_root_path}index.$phpEx");
      break;
   }

   $avatar_max_dimensions = $avatar_width = $avatar_height   = '';
   if ( !empty($row['user_avatar']) )
   {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed, change to 0 to use default
   
      if ( $avatar_max_dimensions )
      {   
         if ( $row['user_avatar_width'] >= $row['user_avatar_height'] )
         {
            $avatar_width = ( $row['user_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['user_avatar_width'] ;
            $avatar_height = ( $avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['user_avatar_width'] * $row['user_avatar_height']) : $row['user_avatar_height'] ;
         }
         else
         {
            $avatar_height = ( $row['user_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['user_avatar_height'] ;
            $avatar_width = ( $avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['user_avatar_height'] * $row['user_avatar_width']) : $row['user_avatar_width'] ;
         }
      }
      else
      {
         $avatar_height    = $row['user_avatar_height'];
         $avatar_width    = $row['user_avatar_width'];
      }
   }
   $template->assign_block_vars('user_row', array(
      'USERNAME'          => $row['username'],
      'ONLINE_AVATAR'    => ( $row['user_avatar'] ) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $avatar_width, $avatar_height) : '',
      'USERNAME_COLOUR'   => $row['user_colour'],
      'USERNAME_FULL'      => $username_full,
      'LASTUPDATE'      => $user->format_date($row['session_time']),
      'FORUM_LOCATION'   => $location,
      'USER_IP'         => ($auth->acl_get('a_')) ? (($mode == 'lookup' && $session_id == $row['session_id']) ? gethostbyaddr($row['session_ip']) : $row['session_ip']) : '',
      'USER_BROWSER'      => ($auth->acl_get('a_user')) ? $row['session_browser'] : '',

      'U_USER_PROFILE'   => ($row['user_type'] != USER_IGNORE) ? get_username_string('profile', $row['user_id'], '') : '',
      'U_USER_IP'         => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'mode=lookup' . (($mode != 'lookup' || $row['session_id'] != $session_id) ? '&amp;s=' . $row['session_id'] : '') . "&amp;sg=$show_guests&amp;start=$start&amp;sk=$sort_key&amp;sd=$sort_dir"),
      'U_WHOIS'         => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'mode=whois&amp;s=' . $row['session_id']),
      'U_FORUM_LOCATION'   => $location_url,

      'S_USER_HIDDEN'      => $s_user_hidden,
      'S_GUEST'         => ($row['user_id'] == ANONYMOUS) ? true : false,
      'S_USER_TYPE'      => $row['user_type'],
   ));
}
$db->sql_freeresult($result);
unset($prev_id, $prev_ip);

// Generate reg/hidden/guest online text
$vars_online = array(
   'REG'   => array('logged_visible_online', 'l_r_user_s'),
   'HIDDEN'=> array('logged_hidden_online', 'l_h_user_s'),
   'GUEST'   => array('guest_counter', 'l_g_user_s')
);

foreach ($vars_online as $l_prefix => $var_ary)
{
   switch ($$var_ary[0])
   {
      case 0:
         $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ZERO_ONLINE'];
      break;

      case 1:
         $$var_ary[1] = $user->lang[$l_prefix . '_USER_ONLINE'];
      break;

      default:
         $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ONLINE'];
      break;
   }
}
unset($vars_online);

$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir"), $counter, $config['topics_per_page'], $start);

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
   $sql = 'SELECT group_id, group_name, group_colour, group_type
      FROM ' . GROUPS_TABLE . '
      WHERE group_legend = 1
      ORDER BY group_name ASC';
}
else
{
   $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
      FROM ' . GROUPS_TABLE . ' g
      LEFT JOIN ' . USER_GROUP_TABLE . ' ug
         ON (
            g.group_id = ug.group_id
            AND ug.user_id = ' . $user->data['user_id'] . '
            AND ug.user_pending = 0
         )
      WHERE g.group_legend = 1
         AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
      ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);

$legend = '';
while ($row = $db->sql_fetchrow($result))
{
   if ($row['group_name'] == 'BOTS')
   {
      $legend .= (($legend != '') ? ', ' : '') . '<span style="color:#' . $row['group_colour'] . '">' . $user->lang['G_BOTS'] . '</span>';
   }
   else
   {
      $legend .= (($legend != '') ? ', ' : '') . '<a style="color:#' . $row['group_colour'] . '" href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
   }
}
$db->sql_freeresult($result);

// Refreshing the page every 60 seconds...
meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir&amp;start=$start"));

// Send data to template
$template->assign_vars(array(
   'TOTAL_REGISTERED_USERS_ONLINE'   => sprintf($l_r_user_s, $logged_visible_online) . sprintf($l_h_user_s, $logged_hidden_online),
   'TOTAL_GUEST_USERS_ONLINE'      => sprintf($l_g_user_s, $guest_counter),
   'LEGEND'                  => $legend,
   'PAGINATION'               => $pagination,
   'PAGE_NUMBER'               => on_page($counter, $config['topics_per_page'], $start),

   'U_SORT_USERNAME'      => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
   'U_SORT_UPDATED'      => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
   'U_SORT_LOCATION'      => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=c&amp;sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),

   'U_SWITCH_GUEST_DISPLAY'   => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sg=' . ((int) !$show_guests)),
   'L_SWITCH_GUEST_DISPLAY'   => ($show_guests) ? $user->lang['HIDE_GUESTS'] : $user->lang['DISPLAY_GUESTS'],
   'S_SWITCH_GUEST_DISPLAY'   => ($config['load_online_guests']) ? true : false)
);

// We do not need to load the who is online box here. ;)
$config['load_online'] = false;

// Output the page
page_header($user->lang['WHO_IS_ONLINE']);

$template->set_filenames(array(
   'body' => 'viewonline_body.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

page_footer();

?>


Hab auch das Problem, dass ich die Subsilver2-Anleitung nicht öffnen kann....
Habe das mit Notepad geöffnet, nicht dass sich da ein Fehler eingeschlichen hat....
Schön auf Deutsch zu schreiben.

Kannst du mir evtl. helfen?

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 8:42 pm
by lefty
sieht so aus als haettest du ueber das
Code: Select all
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

rueberkopiert.

das muss vor dem
Code: Select all
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);


so dass das so aussieht:
Code: Select all
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);


Odiii wrote:Hab auch das Problem, dass ich die Subsilver2-Anleitung nicht öffnen kann....
Habe das mit Notepad geöffnet, nicht dass sich da ein Fehler eingeschlichen hat....
versuchs mal mit IE, das sollte gehen

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 8:52 pm
by Odiii
nein geht leider weder mit FF noch mit IE....

/Edit
nun hauts soweit hin.
Dachte allerdings, dass allgemein in der Online-Liste die Avas mit angezeigt werden nur halt als icon ^^

Re: Avatars in Who is Online

PostPosted: Sat Nov 29, 2008 8:58 pm
by lefty
Odiii wrote:nun hauts soweit hin.
Dachte allerdings, dass allgemein in der Online-Liste die Avas mit angezeigt werden nur halt als icon ^^

nee, vielleicht beim naechsten mal wenn ich mir das nochmal anschau;)

Re: Avatars in Who is Online

PostPosted: Sun Nov 30, 2008 4:12 pm
by Odiii
das wäre klasse ^^
Danke dir dennoch für die tolle Hilfe :happysmerk:

Re: Avatars in Who is Online

PostPosted: Sun Nov 30, 2008 4:51 pm
by lefty
Odiii wrote:Danke dir dennoch für die tolle Hilfe :happysmerk:

gerne :happysmerk:

Re: Avatars in Who is Online

PostPosted: Sun Apr 26, 2009 8:37 pm
by dirkjbf
Hallo
Ist es Möglich die Bilder der "zur zeit Online" Mitglieder auf der index Page anzuzeigen ?
LG Dirk

Re: Avatars in Who is Online

PostPosted: Sun Apr 26, 2009 10:42 pm
by lefty
dirkjbf wrote:Hallo
Ist es Möglich die Bilder der "zur zeit Online" Mitglieder auf der index Page anzuzeigen ?
LG Dirk

hallo, moeglich ja. allerdings waere das ein anderer/neuer mod ;)

Ich meine ich hatte so einen mod schonmal auf phpbb.com gesehen, bin mir aber nicht 100% sicher.