Originally posted by / Author: Lucifix1.) copy the file "install_profile_hits.php" from the attachment in your root and call it to. (
www.yourDomain.xx/install_profile_hits.php)
2.) search in includes/db_field_definitions.php "?>" and insert above:
//############ Mod Profile Hits #################
$additional_user_fields['user_profile_hits'] = array($lang['user_profile_hits'], "text", 0);
3.) search in lang/yourLanguage/main.php:
//--- Users -------------------------------------------
//-----------------------------------------------------
insert below:
(english)
$lang['user_profile_hits'] = "Profile hits:";
(deutsch)
$lang['user_profile_hits'] = "Profil hits:";
4.) search in member.php section ($action == "showprofile"):
$site_template->register_vars(array(
"user_id" => $user_row['user_id'],
replace:
//############ Start Profile Hits #################
if ($user_info['user_level'] != ADMIN) {
$sql = "UPDATE ".USERS_TABLE."
SET user_profile_hits = user_profile_hits + 1
WHERE user_id = $user_id";
$site_db->query($sql);
}
//############ End Profile Hits ##################
$site_template->register_vars(array(
"user_id" => $user_row['user_id'],
"user_profile_hits" => ($user_row['user_profile_hits']),//############ Mod Profile Hits ##################
5.) search in templates/yourTemplates/member_profile.html:
<td class="row1">{user_comments}</td>
</tr>
insert below:
<tr>
<td class="row2"><b>{lang_user_profile_hits}</b></td>
<td class="row2">{user_profile_hits}</td>
</tr>
I did just re-publish that mod.
You should know, that there were some "unsolved" things around it for some users, but I don't have the "second" page of that mod saved anymore, so I do not know if somebody did find the solution
So tell me, if it works...
have fun