News:

Wondering if this will always be free?  See why free is better.

Main Menu

Show who last viewed your profile

Started by GameCube, April 10, 2007, 04:53:49 PM

Previous topic - Next topic

GameCube

Could you guys make a mod for when you click on your profile, it will show who last viewed it? Kind of like IPB.

klumy


Kindred

most definitely a mod request, not a feature request....

--moved to the mod request board--
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

codenaught

It would be rather easy to code, but frankly I don't really see the point to it? Maybe a list of recent people viewing your profile, but what's so special about the most recent person who viewed it? Also, won't it always list yourself or does it not update it being you until you reload the page?
Dev Consultant
Former SMF Doc Coordinator

GameCube

It would not list yourself, and it would be interesting to see who last viewed it, imo.

Zuma

I like it.. a list of like 5 last viewers. But what about the hidden users? Would they be listed too? Maybe an option to list/not list hidden users?

codenaught

Quote from: GameCube on April 14, 2007, 11:46:49 AM
It would not list yourself, and it would be interesting to see who last viewed it, imo.
Okay, so would this be something that only the profile owner would see then? Seeing that as soon as you view the profile as a different user than the profile owner your name will always appear as the last viewer to the profile when you view it.
Dev Consultant
Former SMF Doc Coordinator

GameCube

No, anyone who can see who last visited it. Look at an IPB  board and you will see what I mean. Also hidden users would be shown.

codenaught

Quote from: GameCube on April 15, 2007, 10:55:17 AM
No, anyone who can see who last visited it. Look at an IPB  board and you will see what I mean. Also hidden users would be shown.
Personally I don't see the point to doing that because by the time you visit someone else's profile, you will now be the last member to view the profile (and so your name will always be shown up next to that field when you visit it).

.....Okay I see, I just went to IPB's profile page, and it actually shows the last 3 members that visited the profile. That seems to make a bit of a difference.
Dev Consultant
Former SMF Doc Coordinator

GameCube

So could you make something like that?

Rudolf

It's pretty easy.

1. Add a tinytext field in the members table (comma separated list of id's of the members who viewed the profile).
2. When viewing profile:
    a) get the list of users who viewed the profile into an array.
    b) load the information of these users (hint: use loadMemberData(probably minimal will be enough) && loadMemberContext)
    c) Add the viewer's id on the start of the array and pop one value from the end (if needed).
    d) save the new array in the db (use the updateMemberData function)
3. Show the list of users in the Profile template

You could make the length of the viewers as a setting. 3, 5, 10 or 20 :P

PS: these are just some hints for those who think about doing this mod.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Advertisement: