Author Topic: [MOD] Profile hits by Lucifix  (Read 44154 times)

0 Members and 1 Guest are viewing this topic.

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
[MOD] Profile hits by Lucifix
« on: May 05, 2005, 12:01:01 AM »
Originally posted by / Author: Lucifix

1.) 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:
Code: [Select]
         <td class="row1">{user_comments}</td>
        </tr>
insert below:
Code: [Select]
<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
« Last Edit: August 08, 2011, 05:09:04 PM by Rembrandt »
MAяTRIX


Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Profile hits by Lucifix
« Reply #1 on: May 06, 2005, 04:10:12 AM »
I have try what u have post and I think that it does not work :S

Some steps that are missing I guess:

in lang/<your language>/main.php

add:

Code: [Select]
$lang['profile_hits'] = "Profile hits:";
in member_profile.html

Code: [Select]
{lang_profile_hits}

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Profile hits by Lucifix
« Reply #2 on: May 06, 2005, 04:11:08 AM »
Any one knows what else is missing?

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Profile hits by Lucifix
« Reply #3 on: May 12, 2005, 10:03:03 PM »
hello?

Offline ryoades

  • Pre-Newbie
  • Posts: 6
    • View Profile
    • Art-Atum
Re: [MOD] Profile hits by Lucifix
« Reply #4 on: May 22, 2005, 09:46:20 PM »
... the Counter from this Mod not works.
(field is empty)
what is the problem?

Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Re: [MOD] Profile hits by Lucifix
« Reply #5 on: May 24, 2005, 09:15:05 AM »
I think that the biggest problem is this :)
Quote
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
Again this addres?!
http://www.funny.lt

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [MOD] Profile hits by Lucifix
« Reply #6 on: May 24, 2005, 09:22:27 AM »
exactly  :wink:
MAяTRIX


Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Profile hits by Lucifix
« Reply #7 on: May 24, 2005, 05:58:01 PM »
so this "mod" should be on Mods & Plugins (Requests & Discussions)

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD] Profile hits by Lucifix
« Reply #8 on: May 25, 2005, 11:16:32 PM »
I don't know if that will work but here we go:

Code: [Select]
// Update Profile Hits
if ($user_info['user_level'] != ADMIN && $user_info['user_id'] != $user_id) {
  $sql = "UPDATE ".USERS_TABLE."
          SET profile_hits = profile_hits + 1
          WHERE user_id = $user_id";
  $site_db->query($sql);
}
//  End Update Profile Hits


Field=profile_hits
Type = smallint
Length/Values = 8
Attributes = Blank
Null = Not Null
Default** = 0
Extra = Blank
Circle Filled on ---.


Let me know if this will work ;)

Offline universal

  • Full Member
  • ***
  • Posts: 213
    • View Profile
    • http://www.funny.lt
Re: [MOD] Profile hits by Lucifix
« Reply #9 on: May 30, 2005, 03:48:22 PM »
Hm why it counts only my profile visits? When i put this [{profile_hits1}] into membrs profile template, it shows on my [8] but if I look into other profile i see []. Can someone explain?
Again this addres?!
http://www.funny.lt

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Profile hits by Lucifix
« Reply #10 on: June 01, 2005, 08:31:22 PM »
not working :(

Offline glitzer

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • over 7000 E-Cards
Re: [MOD] Profile hits by Lucifix
« Reply #11 on: August 31, 2005, 10:54:25 PM »
PLEASE HELP ANYBODY???

It doesnt work for us :(

 :?

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD] Profile hits by Lucifix
« Reply #12 on: August 31, 2005, 11:51:52 PM »
Don't know what could be wrong, but I would suggest you to check if maybe hits are working but they don't show in templates.

Offline glitzer

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • over 7000 E-Cards
Re: [MOD] Profile hits by Lucifix
« Reply #13 on: September 01, 2005, 07:02:52 AM »
Hi Lucifix,

i see only "hits" and next to is a blank field...and no number, its nothing.

it will be so fine, when we can use the script..

can you check this once again??

pleaaaaaaaaaaaaaase :lol: :D  :?

TheOracle

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #14 on: September 01, 2005, 02:07:38 PM »
I have try what u have post and I think that it does not work :S

Some steps that are missing I guess:

in lang/<your language>/main.php

add:

Code: [Select]
$lang['profile_hits'] = "Profile hits:";
in member_profile.html

Code: [Select]
{lang_profile_hits}

In your includes/page_header.php file,

find :

Quote

"lang_site_stats" => $lang['site_stats'],


add below :

Code: [Select]

"lang_profile_hits" => $lang['profile_hits'],


Then, in your member.php file,

replace :

Quote

// Update Profile Hits

if ($user_info['user_level'] != ADMIN) {
  $sql = "UPDATE ".USERS_TABLE."
          SET profile_hits = profile_hits + 1
          WHERE user_id = $user_id";
  $site_db->query($sql);

}


with :

Code: [Select]

// Update Profile Hits

if ($user_info['user_level'] == USER) {

$sql = "

UPDATE ".USERS_TABLE."
SET profile_hits = profile_hits + 1
WHERE user_id = '$user_id' AND user_level = '".USER."'

";

$site_db->query($sql);

}


 

Post your comments here