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

0 Members and 1 Guest are viewing this topic.

Offline Egly

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: [MOD] Profile hits by Lucifix
« Reply #30 on: September 03, 2005, 04:11:28 PM »
Quote
Could you please be more specific on that rather than just saying that it doesn't work ??

Sorry if it sounds rude what im saying  :oops:
I dont know what i should tell you more than "it doesnt work". It only shows a 0 and my hits won´t be counted.

this is my code in member.php :

Code: [Select]
// Update Profile Hits


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

$sql = "UPDATE ".USERS_TABLE."
SET profile_hits = profile_hits + 1
WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id'];
$site_db->query($sql);

}
//  End Update Profile Hits

my table settings are as follows:

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

thanks for your endurance with me TheOracle  :lol:
it would be really cool if we could get it working   :mrgreen:


TheOracle

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #31 on: September 03, 2005, 04:14:00 PM »
Quote

It only shows a 0 and my hits won´t be counted.


Now, that's an answer.

Ok, so it would seems that I'd need to test this out myself. In the mean time, I will try to ajust the counts if it fails to update from my end.

TheOracle

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #32 on: September 03, 2005, 06:16:39 PM »
Update:

Gentlement, I have successfully & entirely corrected this MOD as, now, everything works successfully from my end.

The corrections will be posted on a different topic under the Request & Discussions as a new MOD since you will also have the ability to select / un-select that option from the ACP - > Settings page as a screenshot will be posted in the mean time on that new topic.

The reason why I'm setting this as an additional option, from ACP, is for the fact that counting requires a little bit more ressources and trafic on your album. For security reasons, this feature will be activated only under your consent due to weaker web servers.

Hopefully, you'll understand. ;)

That said, an additonal update will be posted here in order to point you out to the new topic.

Important note:. Everything you did here will have to be done again - entirely. Thanks for your understanding. If you have any questions, regarding this subject, you'll be welcomed to do so on the new topic.

TheOracle

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #33 on: September 03, 2005, 08:19:22 PM »

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [MOD] Profile hits by Lucifix
« Reply #34 on: September 09, 2005, 10:47:23 AM »
Thank you TheOracle for posting that - I guess we can lock this topic now, because yours looks like a complete one :D
MAяTRIX


Rembrandt

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #35 on: July 25, 2011, 02:52:05 PM »
Hi!

also works with 1.7.10

mfg Andi

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Profile hits by Lucifix
« Reply #36 on: August 08, 2011, 10:03:30 AM »
Step 4 from first post have a error!

Change:

//############ Start 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); 
}
//############ 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 ##################


With:

      //############ 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 ##################

Rembrandt

  • Guest
Re: [MOD] Profile hits by Lucifix
« Reply #37 on: August 08, 2011, 05:09:49 PM »
you are right, thank you!