Detaylı Profil Bilgileri

ZeRooCooL

Kıdemli Üye
31 Ocak 2012
2,629
1
ceviriprofil.png



Arkadaşlar bu mod profil bilgilerini biraz daha detaya indirmiş ve güzel bir mod

1.1.7 serisine kadar gördüm, Ama 1.1.x'de olur diye düşünüyorum deneyenler olursa yazsın
Değiştirilecek Dosya :
./Sources/LogInOut.php
Bul :

Kod: [Seç]
updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'memberIP2' => '\'' . $_SERVER['BAN_CHECK_IP'] . '\''));

Değiştirin :

Kod: [Seç]
updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'memberIP2' => '\'' . $_SERVER['BAN_CHECK_IP'] . '\'', 'firstLogin' => time()));


./Sources/Load.php
Bul :

Kod: [Seç]
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,

Değiştirin :

Kod: [Seç]
mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, mem.firstLogin,


./Sources/ManagePermissions.php
Bul :

Kod: [Seç]
'profile_remote_avatar' => false,

Değiştirin :

Kod: [Seç]
'profile_remote_avatar' => false,
'profile_logged_in' => false,


Bul :

Kod: [Seç]
'profile_remote_avatar',
'poll_vote',

Değiştirin :

Kod: [Seç]
'profile_remote_avatar',
'profile_logged_in',
'poll_vote',


Kod: [Seç]
./Sources/Profile.php
Bul :

Kod: [Seç]
mysql_free_result($request);
}
}

Değiştirin :

Kod: [Seç]
mysql_free_result($request);
}

// TimeLoggedIn mod by Bulakbol
if (allowedTo('profile_logged_in'))
{
// Read all theme names
$theme_request = db_query("
SELECT ID_THEME, variable, value
FROM {$db_prefix}themes
WHERE (variable IN ('name'))
AND ID_MEMBER = 0", __FILE__, __LINE__);

$context['theme_names'] = array();
while ($row = mysql_fetch_assoc($theme_request))
$context['theme_names'][$row['ID_THEME']][$row['variable']] = $row['value'];

mysql_free_result($theme_request);

If ((isset($user_profile[$memID]['spy']) && $user_profile[$memID]['spy'] == 1 && $context['user']['id'] != 1) || $user_profile[$memID]['firstLogin'] == 0)
{
$member['post_count'] = 0;
$dayb4['post_count'] = 0;
$context['first_login'] = $txt['tli_not_available'];
$context['online_for'] = $txt['tli_not_available'];
}
else
{
// a day before login date
$day_before = @getdate($user_profile[$memID]['lastLogin'] - (24*60*60));
$midnight_before = mktime(0, 0, 0, $day_before['mon'], $day_before['mday'], $day_before['year']) - ($modSettings['time_offset'] * 3600);
// last active date
$last_login_date = @getdate($user_profile[$memID]['lastLogin']);
$midnight_last_login = mktime(0, 0, 0, $last_login_date['mon'], $last_login_date['mday'], $last_login_date['year']) - ($modSettings['time_offset'] * 3600);
// today's date
$today = @getdate(time());
$midnight = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']) - ($modSettings['time_offset'] * 3600);

if ($midnight_last_login != $midnight)
{
// following day after last active - search only 24 hours messages since last active
$after_last_active = @getdate($user_profile[$memID]['lastLogin'] + (24*60*60));
$midnight_after = mktime(0, 0, 0, $after_last_active['mon'], $after_last_active['mday'], $after_last_active['year']) - ($modSettings['time_offset'] * 3600);

$post_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_last_login . "
AND m.ID_MEMBER = " . $memID . " && m.posterTime < " . $midnight_after . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$member = mysql_fetch_assoc($post_request);
mysql_free_result($post_request);
}
else
{
// last active today
$post_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_last_login . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$member = mysql_fetch_assoc($post_request);
mysql_free_result($post_request);
}
// a day before last active day
$dayb4_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_before . "
AND m.ID_MEMBER = " . $memID . " && m.posterTime < " . $midnight_last_login . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$dayb4 = mysql_fetch_assoc($dayb4_request);
mysql_free_result($dayb4_request);

$context['first_login'] = timeformat($user_profile[$memID]['firstLogin']);
$context['online_for'] = days_hours_minutes(($user_profile[$memID]['lastLogin'] - $user_profile[$memID]['firstLogin']) / 86400);
}
$context['posts_before'] = $dayb4['post_count'] . ($dayb4['post_count'] == 1 ? $txt['tli_post'] : $txt['tli_posts']);
$context['posts_made'] = $member['post_count'] . ($member['post_count'] == 1 ? $txt['tli_post'] : $txt['tli_posts']);
$context['total_logged_in'] = $user_profile[$memID]['totalTimeLoggedIn'] != 0 ? days_hours_minutes($user_profile[$memID]['totalTimeLoggedIn'] / 86400) : $txt['tli_not_available'];
$context['theme_name'] = $context['theme_names'][$user_profile[$memID]['ID_THEME'] == 0 ? $modSettings['theme_guests'] : $user_profile[$memID]['ID_THEME']]['name'];
}
}

function days_hours_minutes($total)
{
global $txt;

$hours = floor(($total - floor($total)) * 24);
$minutes = floor(((($total - floor($total)) * 24) - $hours) * 60);
$logged = (floor($total) == 0 ? '' : (floor($total) . (floor($total) == 1 ? $txt['tli_day'] : $txt['tli_days']))) .
($hours == 0 ? '' : ($hours) . ($hours == 1 ? $txt['tli_hour'] : $txt['tli_hours'])) .
$minutes . ($minutes == 1 ? $txt['tli_minute'] : $txt['tli_minutes']);

return $logged;
}


./Themes/default/Profile.template.php
Bul :

Kod: [Seç]
echo '
<tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>

Değiştirin :

Kod: [Seç]
if (!allowedTo('profile_logged_in'))
echo ' <tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr>';
echo ' <tr>

Bul :

Kod: [Seç]
<td>', $context['member']['registered'], '</td>
</tr><tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>

Değiştirin :

Kod: [Seç]
<td>', $context['member']['registered'], '</td>
</tr>';

if (!allowedTo('profile_logged_in'))
echo ' <tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>

Bul :

Kod: [Seç]
// Is this member requiring activation and/or banned?

Değiştirin :

Kod: [Seç]
if (allowedTo('profile_logged_in'))
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>', $txt['tli_logged_in'], ': </b></td>
<td>', $context['first_login'], '</td>
</tr><tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr><tr>
<td><b>', $txt['tli_online_for'], ': </b></td>
<td>', $context['online_for'], '</td>
</tr><tr>
<td><b>', $txt['tli_posts_made'], ':</b></td>
<td>', $context['posts_made'], '</td>
</tr><tr>
<td><b>', $txt['tli_posts_before'], ':</b></td>
<td>', $context['posts_before'], '</td>
</tr><tr>
<td><b>', $txt['tli_total_posts'], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>
<td><b>', $txt['tli_total_logged_in'], ':</b></td>
<td>', $context['total_logged_in'], '</td>
</tr><tr>
<td><b>', $txt['tli_theme'], ':</b></td>
<td>', $context['theme_name'], '</td>
</tr>';

// Is this member requiring activation and/or banned?



Readme
Author: Bulakbol Mod Name: Time Logged-In Version: 3.3
Tested: Freshly installed SMF 1.1.8 and SMF 2.0 RC1
If you want to see the amount of time a member has been logged-in (session in days, hours and minutes),
count of posts they made the day while/was online, "Total time logged in", and a Theme your member is using,
then this mod is for you. The information can be found in the summary of a member's profile.
After installation, your members should log-in first before "Logged in", "Posts made" and "Online for" info are available.
Support for "Super Admin" mod. No configuration required.

Supported languages
English
English-utf8

December 8, 2008 - Released version 2.0
Rewritten code because of additional feature.
Added the "Total time logged in". Requested by SunKing.

December 10, 2008 - Released version 3.0
Rewritten and optimized code because of additional feature.
Added count of posts made the day a member logged-in ("Posts made").

December 11, 2008
Removed excess code and added missing line of code (SMF 2.0 Beta 4) - fixed. Thanks edi67.
Added Italian language support. Thanks ed67.
Added Swedish language support. Thanks ScarMix.
Added Greek-utf8 language support. Thanks villasg.

December 17, 2008
Added "Current Theme". A Theme a member is using.
Added Spanish language support. Thanks ksawery.
Added German language support. Thanks firehopper.

December 20, 2008
Added "Posts a day before". Number of posts a day before last active date of a member.

December 23, 2008
Added number of posts a member made a day before last active.
Rearranged the display of profile summary for admin eyes only. Normal profile display for others.
Added Swedish language translation (Thanks Scarmix)

Happy New Year Everyone!!

December 30, 2009
Added group permission under "Member Profiles" category. Admin => Permissions => Permissions By Membergroup.
"Allow this group to access the logged-in info" checkbox.

Please support mod authors and SMF by becoming a charter member.
File Edits
./Sources/LogInOut.php
Find: [Select]

updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'memberIP2' => '\'' . $_SERVER['BAN_CHECK_IP'] . '\''));

Replace With: [Select]

updateMemberData($ID_MEMBER, array('lastLogin' => time(), 'memberIP' => '\'' . $user_info['ip'] . '\'', 'memberIP2' => '\'' . $_SERVER['BAN_CHECK_IP'] . '\'', 'firstLogin' => time()));


./Sources/Load.php
Find: [Select]

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood,

Replace With: [Select]

mem.birthdate, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin, mem.karmaGood, mem.firstLogin,


./Sources/ManagePermissions.php
Find: [Select]

'profile_remote_avatar' => false,

Replace With: [Select]

'profile_remote_avatar' => false,
'profile_logged_in' => false,


Find: [Select]

'profile_remote_avatar',
'poll_vote',

Replace With: [Select]

'profile_remote_avatar',
'profile_logged_in',
'poll_vote',


./Sources/Profile.php
Find: [Select]

mysql_free_result($request);
}
}

Replace With: [Select]

mysql_free_result($request);
}

// TimeLoggedIn mod by Bulakbol
if (allowedTo('profile_logged_in'))
{
// Read all theme names
$theme_request = db_query("
SELECT ID_THEME, variable, value
FROM {$db_prefix}themes
WHERE (variable IN ('name'))
AND ID_MEMBER = 0", __FILE__, __LINE__);

$context['theme_names'] = array();
while ($row = mysql_fetch_assoc($theme_request))
$context['theme_names'][$row['ID_THEME']][$row['variable']] = $row['value'];

mysql_free_result($theme_request);

If ((isset($user_profile[$memID]['spy']) && $user_profile[$memID]['spy'] == 1 && $context['user']['id'] != 1) || $user_profile[$memID]['firstLogin'] == 0)
{
$member['post_count'] = 0;
$dayb4['post_count'] = 0;
$context['first_login'] = $txt['tli_not_available'];
$context['online_for'] = $txt['tli_not_available'];
}
else
{
// a day before login date
$day_before = @getdate($user_profile[$memID]['lastLogin'] - (24*60*60));
$midnight_before = mktime(0, 0, 0, $day_before['mon'], $day_before['mday'], $day_before['year']) - ($modSettings['time_offset'] * 3600);
// last active date
$last_login_date = @getdate($user_profile[$memID]['lastLogin']);
$midnight_last_login = mktime(0, 0, 0, $last_login_date['mon'], $last_login_date['mday'], $last_login_date['year']) - ($modSettings['time_offset'] * 3600);
// today's date
$today = @getdate(time());
$midnight = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']) - ($modSettings['time_offset'] * 3600);

if ($midnight_last_login != $midnight)
{
// following day after last active - search only 24 hours messages since last active
$after_last_active = @getdate($user_profile[$memID]['lastLogin'] + (24*60*60));
$midnight_after = mktime(0, 0, 0, $after_last_active['mon'], $after_last_active['mday'], $after_last_active['year']) - ($modSettings['time_offset'] * 3600);

$post_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_last_login . "
AND m.ID_MEMBER = " . $memID . " && m.posterTime < " . $midnight_after . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$member = mysql_fetch_assoc($post_request);
mysql_free_result($post_request);
}
else
{
// last active today
$post_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_last_login . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$member = mysql_fetch_assoc($post_request);
mysql_free_result($post_request);
}
// a day before last active day
$dayb4_request = db_query("
SELECT COUNT(*) as post_count
FROM {$db_prefix}messages AS m
WHERE m.ID_MEMBER = " . $memID . " && m.posterTime > " . $midnight_before . "
AND m.ID_MEMBER = " . $memID . " && m.posterTime < " . $midnight_last_login . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
LIMIT 1", __FILE__, __LINE__
);
$dayb4 = mysql_fetch_assoc($dayb4_request);
mysql_free_result($dayb4_request);

$context['first_login'] = timeformat($user_profile[$memID]['firstLogin']);
$context['online_for'] = days_hours_minutes(($user_profile[$memID]['lastLogin'] - $user_profile[$memID]['firstLogin']) / 86400);
}
$context['posts_before'] = $dayb4['post_count'] . ($dayb4['post_count'] == 1 ? $txt['tli_post'] : $txt['tli_posts']);
$context['posts_made'] = $member['post_count'] . ($member['post_count'] == 1 ? $txt['tli_post'] : $txt['tli_posts']);
$context['total_logged_in'] = $user_profile[$memID]['totalTimeLoggedIn'] != 0 ? days_hours_minutes($user_profile[$memID]['totalTimeLoggedIn'] / 86400) : $txt['tli_not_available'];
$context['theme_name'] = $context['theme_names'][$user_profile[$memID]['ID_THEME'] == 0 ? $modSettings['theme_guests'] : $user_profile[$memID]['ID_THEME']]['name'];
}
}

function days_hours_minutes($total)
{
global $txt;

$hours = floor(($total - floor($total)) * 24);
$minutes = floor(((($total - floor($total)) * 24) - $hours) * 60);
$logged = (floor($total) == 0 ? '' : (floor($total) . (floor($total) == 1 ? $txt['tli_day'] : $txt['tli_days']))) .
($hours == 0 ? '' : ($hours) . ($hours == 1 ? $txt['tli_hour'] : $txt['tli_hours'])) .
$minutes . ($minutes == 1 ? $txt['tli_minute'] : $txt['tli_minutes']);

return $logged;
}


./Themes/default/Profile.template.php
Find: [Select]

echo '
<tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>

Replace With: [Select]

if (!allowedTo('profile_logged_in'))
echo ' <tr>
<td><b>', $txt[86], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr>';
echo ' <tr>


Find: [Select]

<td>', $context['member']['registered'], '</td>
</tr><tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>

Replace With: [Select]

<td>', $context['member']['registered'], '</td>
</tr>';

if (!allowedTo('profile_logged_in'))
echo ' <tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>


Find: [Select]

// Is this member requiring activation and/or banned?

Replace With: [Select]

if (allowedTo('profile_logged_in'))
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr>
<td><b>', $txt['tli_logged_in'], ': </b></td>
<td>', $context['first_login'], '</td>
</tr><tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr><tr>
<td><b>', $txt['tli_online_for'], ': </b></td>
<td>', $context['online_for'], '</td>
</tr><tr>
<td><b>', $txt['tli_posts_made'], ':</b></td>
<td>', $context['posts_made'], '</td>
</tr><tr>
<td><b>', $txt['tli_posts_before'], ':</b></td>
<td>', $context['posts_before'], '</td>
</tr><tr>
<td><b>', $txt['tli_total_posts'], ': </b></td>
<td>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr><tr>
<td><b>', $txt['tli_total_logged_in'], ':</b></td>
<td>', $context['total_logged_in'], '</td>
</tr><tr>
<td><b>', $txt['tli_theme'], ':</b></td>
<td>', $context['theme_name'], '</td>
</tr>';

// Is this member requiring activation and/or banned?


./Themes/default/languages/Modifications.turkish.php
Bul :
Kod: [Seç]
?>
Üzerine Ekle :
Kod: [Seç]
$txt['tli_logged_in'] = 'İçinde girdi';
$txt['tli_online_for'] = 'Online';
$txt['tli_not_available'] = 'Ofline';
$txt['tli_day'] = ' gün, ';
$txt['tli_days'] = ' gün, ';
$txt['tli_hour'] = ' saat ve ';
$txt['tli_hours'] = ' saatler ve ';
$txt['tli_minute'] = ' dakika.';
$txt['tli_minutes'] = ' dakikalar.';
$txt['tli_post'] = ' mesaj.';
$txt['tli_posts'] = ' mesajlar.';
$txt['tli_posts_made'] = 'Gün içerisindeki Mesajlar';
$txt['tli_total_logged_in'] = 'Toplam Online Olduğu Süre';
$txt['tli_theme'] = 'Kullandığı Tema';
$txt['tli_posts_before'] = 'Posts a day before';
$txt['tli_total_posts'] = 'Toplam Mesaj';
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.