Hi all,
does anybody has got a mod or something like a hitcounter for the profiles ?
It would be nice to see how often each profile has been visited ?!
Hi all,
does anybody has got a mod or something like a hitcounter for the profiles ?
It would be nice to see how often each profile has been visited ?!
I started working on this (Since I'm a newbie, I figured why not tackle something hard). I got the database tracking done, but then I realized (being a newbie to Dolphin) - Don't we pretty much already have this?
In the PIONEER template at least in the Communicator page it tells me (as the user) who has viewed my profile. Since I've only got this in a test environment, I can't tell how it REALLY works. It's not the same as a hit counter. I was building basically this (more than a hit counter).
But if you just want a hit counter, it's pretty damned easy. Could you clarify what you want? And could someone explain what the "Viewed by" stat is?
Were looking for something on the main profile page saying somthing like "Hits: 2"
The direct mod code would be nice.
SocialEngine 2.81 Nulled
That's exactly what i meant ! But it should work with a ip blocker that every user hit will just be counted once !Originally Posted by CodyT
The way there tracker works is like that, when a person visits the profile page it deletes the row if it exist and then update the row so the tracker only gets that person once, but this task is fairly easy just count the database table track profles i will break it down...,
add in your member.php script in the top part BUT!! not past $_ni = $_page['name_index'];
and below $profileID = (int)$member['ID'];
if you don't have $profileID = (int)$member['ID']; add that above the $count below
i don't really know the exact lines becuz of how many changes i have but to continue...
but add this:
afterwards you can call the count like thisPHP Code:$counter = db_arr("SELECT COUNT(*) FROM `ProfilesTrack` WHERE `Profile` = {$profileID}");
then in your page_6.html you can do something like:PHP Code:$_page_cont[$_ni]['total_count'] = $counter[0];
Hits : __total_count__
Last edited by gvpm; 04-08-2007 at 11:30 AM.
Thanks for this GVPM. This will count views by MEMBERS but not non-members. Although I'm not sure there's a way to do that without a lot more work.Originally Posted by gvpm
To be more efficient, since we're just counting hits and not using the other data, I'd use count('member') instead of count(*) to return less data.
Your suggestions did enlighten me quite a bit as to how the software works though! Thanks.
Hi GVPM, great
I had a look at the .sql install file and it looks like only logged in members are counted when they visit profiles ?!
How can we count all "hits" (from members and non-members) ? I want to show exactly how often a profile was visited, even by visitors !
gvpm, could you mabey attatched member.php and whatever else is required for this to be possible? You lost me after $profileID = (int)$member['ID'];
Thanks .![]()
SocialEngine 2.81 Nulled
no problem guys,
basically codyT add that above the script i provided or you can replace profileID with member['ID'] in the query, and as far as non members the thing with that is you cannot insert a non member becuase there unique id value is always 0 so it would be like inserting that value multiple times which will generate a error because you cannot insert duplicate entries in this fashion. the only thing i can suggest if you can make non members have there own id but thats up to your.
Last edited by gvpm; 04-08-2007 at 09:30 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks