Add Online-Status to Team for B3P2.0.0

Hier gibt es kleinere Snippets für das Board3 Portal Version 2.0.x.
Benutzeravatar
reyno41
Administrator
Administrator
Offline
Beiträge: 265
Registriert: Sa 19. Jun 2010, 20:12
Quad/ATV: Can Am
Skype: canam800er
Wohnort: Bayern
Kontaktdaten:

Add Online-Status to Team for B3P2.0.0

Beitragvon reyno41 » Fr 21. Sep 2012, 17:34


This will add the online status to the team block.
Durch diese Anleitung wird der Online Status im Team-Block angezeigt.


Version: 1.0.1

Screenshot:
Prosilver
Bild

Subsilver2
Bild

Tested with Board3 Portal 2.0.0
Getestet mit Board3 Portal 2.0.0


Normal Team block / Normaler Team Block

Instructions for normal team block:
[+] Install Instructions
Open: root/portal/modules/portal_leaders.php

Find:

Code: Alles auswählen

    if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
    {
        $group_name = $user->lang['GROUP_UNDISCLOSED'];
        $u_group = '';
    }
    else
    {
        $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
        $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']);
    }


After add:

Code: Alles auswählen

    // Generate online information for user
    $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
        FROM ' . SESSIONS_TABLE . '
        WHERE ' . $db->sql_in_set('session_user_id', $row['user_id']) . '
        GROUP BY session_user_id';
    $result2 = $db->sql_query($sql);

    $update_time = $config['load_online_time'] * 60;
    $user_online = false;
    while ($row2 = $db->sql_fetchrow($result2))
    {
        $user_online = (time() - $update_time < $row2['online_time'] && (($row2['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
    }
    $db->sql_freeresult($result2);


Find:

Code: Alles auswählen

        'USER_ID'            => $row['user_id'],


After add:

Code: Alles auswählen

        'USER_ONLINE'        => $user_online,


For prosilver based styles

Open: root/styles/[stylename]/template/portal/modules/leaders_side.html

Find:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />


Replace with:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


Find:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />


Replace with:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


For subsilver2 based styles

Open: root/styles/[stylename]/template/portal/modules/leaders_side.html

Find on Line 11:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ENDIF -->


Replace with:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" title="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" title="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ENDIF -->


Find on Line 33:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ENDIF -->


Replace with:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ENDIF -->



Upload the following 2 files to root/styles/[stylename]/theme/images/portal
green_on_16.png
green_on_16.png (919 Bytes) 278 mal betrachtet

red_on_16.png
red_on_16.png (869 Bytes) 278 mal betrachtet


Anleitung für normalen Team Block:
[+] Installations Anleitung
Öffne: root/portal/modules/portal_leaders.php

Finde:

Code: Alles auswählen

    if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
    {
        $group_name = $user->lang['GROUP_UNDISCLOSED'];
        $u_group = '';
    }
    else
    {
        $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
        $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']);
    }


Danach einfügen:

Code: Alles auswählen

    // Generate online information for user
    $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
        FROM ' . SESSIONS_TABLE . '
        WHERE ' . $db->sql_in_set('session_user_id', $row['user_id']) . '
        GROUP BY session_user_id';
    $result2 = $db->sql_query($sql);

    $update_time = $config['load_online_time'] * 60;
    $user_online = false;
    while ($row2 = $db->sql_fetchrow($result2))
    {
        $user_online = (time() - $update_time < $row2['online_time'] && (($row2['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
    }
    $db->sql_freeresult($result2);


Finde:

Code: Alles auswählen

        'USER_ID'            => $row['user_id'],


Danach einfügen:

Code: Alles auswählen

        'USER_ONLINE'        => $user_online,


Für prosilver basierende Styles

Öffne: root/styles/[stylename]/template/portal/modules/leaders_side.html

Finde:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />


Ersetzen mit:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


Finde:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />


Ersetzen mit:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


Für subsilver2 basierende Styles

Öffne: root/styles/[stylename]/template/portal/modules/leaders_side.html

Finde ca. Zeile 11:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ENDIF -->


Ersetzen mit:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" title="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><!-- IF admin.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" title="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ENDIF -->


Finde ca. Zeile 33:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
         <!-- ENDIF -->


Ersetzen mit:

Code: Alles auswählen

         <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
         <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ELSE -->
         <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><!-- IF mod.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
         <!-- ENDIF -->


Lade diese 2 Bilder in root/styles/[stylename]/theme/images/portal hoch.
green_on_16.png
green_on_16.png (919 Bytes) 278 mal betrachtet

red_on_16.png
red_on_16.png (869 Bytes) 278 mal betrachtet



Extended Team block / Erweiterter Team Block

Instructions for extended team block:
[+] Install Instructions
Open: root/portal/modules/leaders.php

Find:

Code: Alles auswählen

        $groups[$row['group_id']]['group_users'][] = array(
            'user_id'        => $row['user_id'],
            'username'        => $row['username'],
            'user_colour'    => $row['user_colour'],
        );


Before add:

Code: Alles auswählen

        // Generate online information for user
        $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
            FROM ' . SESSIONS_TABLE . '
            WHERE ' . $db->sql_in_set('session_user_id', $row['user_id']) . '
            GROUP BY session_user_id';
        $result2 = $db->sql_query($sql);

        $update_time = $config['load_online_time'] * 60;
        $user_online = false;
        while ($row2 = $db->sql_fetchrow($result2))
        {
            $user_online = (time() - $update_time < $row2['online_time'] && (($row2['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
        }
        $db->sql_freeresult($result2);


Find:

Code: Alles auswählen

'user_id'        => $row['user_id'],


After add:

Code: Alles auswählen

            'user_online'    => $user_online,


Find:

Code: Alles auswählen

                    'USER_ID'            => $group_user['user_id'],


After add:

Code: Alles auswählen

                    'USER_ONLINE'        => $group_user['user_online'],



Open: root/styles/[stylename]/template/portal/modules/leaders_ext_side.html

Find:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />


Replace with:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


For subsilver2 based styles

Open: root/styles/[stylename]/template/portal/modules/leaders_side.html

Find:

Code: Alles auswählen

               <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
               <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />
               <!-- ELSE -->
               <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />
               <!-- ENDIF -->


Replace with:

Code: Alles auswählen

               <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
               <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
               <!-- ELSE -->
               <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
               <!-- ENDIF -->


Upload the following 2 files to root/styles/[stylename]/theme/images/portal (if the do not already exist)
green_on_16.png
green_on_16.png (919 Bytes) 278 mal betrachtet

red_on_16.png
red_on_16.png (869 Bytes) 278 mal betrachtet


Anleitung für Erweiterten Team-Block:
[+] Installations Anleitung
Öffne: root/portal/modules/portal_leaders.php

Finde:

Code: Alles auswählen

        $groups[$row['group_id']]['group_users'][] = array(
            'user_id'        => $row['user_id'],
            'username'        => $row['username'],
            'user_colour'    => $row['user_colour'],
        );


Davor einfügen:

Code: Alles auswählen

        // Generate online information for user
        $sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
            FROM ' . SESSIONS_TABLE . '
            WHERE ' . $db->sql_in_set('session_user_id', $row['user_id']) . '
            GROUP BY session_user_id';
        $result2 = $db->sql_query($sql);

        $update_time = $config['load_online_time'] * 60;
        $user_online = false;
        while ($row2 = $db->sql_fetchrow($result2))
        {
            $user_online = (time() - $update_time < $row2['online_time'] && (($row2['viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
        }
        $db->sql_freeresult($result2);


Finde:

Code: Alles auswählen

'user_id'        => $row['user_id'],


Danach einfügen:

Code: Alles auswählen

            'user_online'    => $user_online,


Finde:

Code: Alles auswählen

                    'USER_ID'            => $group_user['user_id'],


Danach einfügen:

Code: Alles auswählen

                    'USER_ONLINE'        => $group_user['user_online'],


Für prosilver basierende Styles

Öffne: root/styles/[stylename]/template/portal/modules/leaders_ext_side.html

Finde:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />


Ersetzen mit:

Code: Alles auswählen

      <span style="float:<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->right<!-- ELSE -->left<!-- ENDIF -->;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->float:right; padding-right:5px;<!-- ELSE -->float:left; padding-left:5px;<!-- ENDIF --> padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />


Für subsilver2 basierende Styles

Öffne: root/styles/[stylename]/template/portal/modules/leaders_ext_side.html

Finde:

Code: Alles auswählen

               <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
               <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />
               <!-- ELSE -->
               <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><br style="clear:both" />
               <!-- ENDIF -->


Ersetzen mit:

Code: Alles auswählen

               <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
               <span style="float:right;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:right; padding-right:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
               <!-- ELSE -->
               <span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{group.member.USERNAME_FULL}</strong></span><!-- IF group.member.USER_ONLINE eq 'true' --><img src="{T_THEME_PATH}/images/portal/green_on_16.png " width="16" height="16" alt="{L_ONLINE}" style="float: right;" /><!-- ELSE --><img src="{T_THEME_PATH}/images/portal/red_on_16.png " width="16" height="16" alt="{L_OFFLINE}" style="float: right;" /><!-- ENDIF --><br style="clear:both" />
               <!-- ENDIF -->


Lade diese 2 Bilder in root/styles/[stylename]/theme/images/portal hoch.(falls nicht schon vorhanden)
green_on_16.png
green_on_16.png (919 Bytes) 278 mal betrachtet

red_on_16.png
red_on_16.png (869 Bytes) 278 mal betrachtet


Anmerkung:

Solltest du über online und offline Grafiken verfügen, so musst du den Pfad zu den Grafiken
in den oben beschriebenen Dateien ändern, wobei green_on_16.png für die online Grafik und
red_on_16.png für die offline Grafik ist.

Beispiel:
Du hast eine online sowie eine offline Grafik in root/styles/(stylename)/imageset/de
dann ändere den Pfad von <img src="{T_THEME_PATH}/images/portal/green_on_16.png
in <img src="{T_IMAGESET_PATH}/de/[Name der Grafik] um.
Sollte die Grafiken eine andere Größe haben so musst du das bei width= und height= ändern.
Schön ist es auf der Welt zu sein