PROFUILAUFRUFE ZÄHLEN
Verfasst: 10.05.2003 09:27
Hallo leute, wo finde ich das mod zum zählen der einzelnen profilaufrufe?! 

phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
#
#-----[ QUERY IN PHPMYADMIN AUSFÜHREN ]------------------------------------------
# eventuell prefix_ anpassen
ALTER TABLE phpbb_users ADD user_profile_visits MEDIUMINT( 8 ) UNSIGNED DEFAULT '0' NOT NULL ;
#
#-----[ DATEI ÖFFNEN ]------------------------------------------
# profile_view_body.tpl
#
#-----[ FINDE ]------------------------------------------
#
<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>
#
#-----[ DANACH EINFÜGEN ]------------------------------------------
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_VISITS}:</span></td>
<td> <b><span class="gen">{VISITS}</span></b></td>
</tr>
#
#-----[ DATEI ÖFFNEN ]------------------------------------------
# usercp_viewprofile.php
#
#-----[ FINDE ]------------------------------------------
#
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));
#
#-----[ DANACH EINFÜGEN ]------------------------------------------
#
//
// Update the profile view counter
//
$user = $profiledata['user_id'];
$sql = "UPDATE " . USERS_TABLE . "
SET user_profile_visits = user_profile_visits + 1
WHERE user_id = $user";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update profile views.", '', __LINE__, __FILE__, $sql);
}
#
#-----[ FINDE ]------------------------------------------
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ DANACH EINFÜGEN ]------------------------------------------
#
'L_VISITS' => $lang['Views'],
'VISITS' => $profiledata['user_profile_visits'],