Kod: Tümünü seç
##############################################################
# Title: Add Last User Visit Date to User Profiles
# Author: Thoul thoul-phpbb@earthlink.net http://www.phpbbsmith.com
# Description: Display the last time the user visited in their profile.
# Version: 1.1.0
#
# Installation Level: Easy
# Installation Time: 5 Minutes
# Files To Edit: includes/usercp_viewprofile.php,
# language/lang_english/lang_main.php,
# templates/subSilver/profile_view_body.tpl
# Included Files: n/a
##############################################################
# Author's Notes:
#
# Before proceeding, please read the file README.txt and consult the
# install.txt, upgrade.txt, or uninstall.txt for the actual installation,
# upgrade, or uninstallation instructions.
#
##############################################################
# BEFORE FOLLOWING THESE INSTRUCTIONS, YOU SHOULD BACK UP ALL RELATED FILES.
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
// This file modified for Add Last User Visit Date to User Profiles 1.1.0
#
#-----[ FIND ]------------------------------------------
#
$posts_per_day = $profiledata['user_posts'] / $memberdays;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//------------------------------------------------------------------------------
// Add Last User Visit Date to User Profiles - Begin Code Addition
//
$last_visit_time = (!empty($profiledata['user_lastvisit'])) ? create_date($board_config['default_dateformat'], $profiledata['user_lastvisit'], $board_config['board_timezone']) : $lang['Never'];
//
// Add Last User Visit Date to User Profiles - End Code Addition
//------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
'L_AVATAR' => $lang['Avatar'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
//------------------------------------------------------------------------------
// Add Last User Visit Date to User Profiles - Begin Code Addition
//
'L_LAST_VISITED' => $lang['Last_Visited'],
'LAST_VISIT_TIME' => $last_visit_time,
//
// Add Last User Visit Date to User Profiles - End Code Addition
//------------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
// This file modified for Add Last User Visit Date to User Profiles 1.1.0
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//------------------------------------------------------------------------------
// Add Last User Visit Date to User Profiles - Begin Code Addition
//
$lang['Last_Visited'] = 'Last Visited';
$lang['Never'] = 'Never';
//
// Add Last User Visit Date to User Profiles - End Code Addition
//------------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- This file modified for Add Last User Visit Date to User Profiles 1.1.0 -->
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:</span></td>
<td> <b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#End