Profile Visits (View) Counter

Here's a lovely little addition you can add to profiles. It's quick, simple and a very nice feature I'm sure your members will appreciate.

It's not all my own work, but it was originally written in the days before PHP Blocks and was it complicated!

Please enjoy

 

Profile Visits.pdf · 103.5K · 110 downloads
Quote · 5 Mar 2018

Really good one. appreciated 

Always remember that the future comes one day at a time.
Quote · 10 Mar 2018

Hi i am not seeing the block. i followed the information in the pdf. and cleared site cache im using 7.3.5. thanks

Quote · 8 May 2018

@puppyshad Somehow the code I used and the code I published were different. Let's just say I'm doing too much and my head is spinning.

I just tried this on 7.3.5 and it works fine:

--------------------------------

// —- Code Begin

global $site;

global $aPreValues;

global $p_arr;

$Memb = (int)$p_arr['ID'];

$arr = db_arr("SELECT `DateLastLogin` FROM `Profiles` WHERE `ID` = '$Memb'");

$DbDate = $arr['DateLastLogin'];

$LastLogDate = date("d m Y", strtotime($DbDate));

{echo "<br>   My Last Visit Was On The: $LastLogDate<br><br>";}

$arr = db_arr("SELECT `Views` FROM `Profiles` WHERE `ID` = '$Memb'");

$MemViews = $arr['Views'];

if ( $MemViews > 0 )

{echo "   $MemViews Members Have Viewed My Profile<br><br>";}

// — Code End

-----------------------------

I'll replace the PDF as soon as I can and thanks for pointing out the problem.

Regards and good luck.

Quote · 8 May 2018

There is also a module in the market; I think Modzzz has it, that will show you who visited as well.  It will display the member's avatar/icon and name.

Geeks, making the world a better place
Quote · 8 May 2018

Thats true geek girl. thank you for your comment. However, i dont feel that a paid mod is necessary for me. I think that this works just the way I need.

Also, I have know about the market lol. I've already bought quite a few items.

@Thanks for the help it worked and even has the "last visit" date on it which is a nice touch :P now that is the last login of the profile owner am i correct? or is that the last log from the visitor? as in "last visitor log"?

Quote · 8 May 2018

@puppyshad, it's the last visit by the profile owner. We went down this path because it allows visitors to see that they're looking at an active profile or one the owner hasn't been near for three years. Sorry about the first problem.

Quote · 9 May 2018

Thanks, John.

Nice touch. Added.

Although last visit shows last log on, which is incorrect if profile owner is always 'logged in'.

Is there a way to show real 'last visit' from profile owner, if they don't 'log out'?

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 26 Sep 2018

Hi Michel, It's beyond me to make a change like that. As far as I know, Dolphin only stores last login dates.

I read somewhere that constant log-ins eat up bandwidth and CPU energy even when dormant. Thus I run Modzzz'  Auto Logout module which logs out an inactive account after a specified time.

Quote · 26 Sep 2018

We learn something every day, I never knew that.

It's not as if we're connected to other sites around the web; like being logged in to Facebook might drain resources by making free calls across cyberspace.

I'll take a look at the auto logout.

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 26 Sep 2018
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.