Profile Viewing ?
4 posters
Page 1 of 1
Re: Profile Viewing ?
Hello @Matrix317,
Give this a try :
Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In all the pages
Paste the code below and submit
Then go to Display > Colors > CSS stylesheet and paste the following code.
This should give you the following result while viewing a profile page :
Give this a try :
Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In all the pages
Paste the code below and submit
- Code:
window.location.pathname.match(/\/u\d+/) && $(function() {
var block = document.createElement('DIV');
block.className = 'module';
block.innerHTML = '<div class="inner"><span class="corners-top"><span></span></span><div class="h3">Activity</div><p class="viewing"><a href="#" onclick="return false;" class="loading">Loading activity..</a></p><span class="corners-bottom"><span></span></span></div>';
$('#profile-advanced-right .module:first').after(block);
$(block.getElementsByTagName('P')[0]).load('/viewonline tr:has(a[href="/u'+window.location.pathname.match(/u(\d+)/)[1]+'"]) td:last a',function() {
(!this.innerHTML.length) && (this.innerHTML = '<a href="#" onclick="return false;" class="inactive">Offline</a>')
});
});
Then go to Display > Colors > CSS stylesheet and paste the following code.
- Code:
.module .viewing a {
color:#696;
text-shadow:1px 1px 0 #FFF;
text-align:center;
font-weight:bold;
background:#EEE;
border:1px solid #CCC;
border-radius:3px;
display:block;
padding:5px 3px;
margin:6px 0;
}
.module .viewing a.loading { color:#996 }
.module .viewing a.inactive { color:#C66 }
This should give you the following result while viewing a profile page :
Re: Profile Viewing ?
Hello, Ange!
I like the style of it, but it bugs for me. It shows either Offline or Viewing online people list (or whatever it is in English boards).
This script works great:
I like the style of it, but it bugs for me. It shows either Offline or Viewing online people list (or whatever it is in English boards).
This script works great:
- Code:
$(function() {
var x = document.getElementById('profile-advanced-right');
if(!x) return; // not a profile, don't do anything
if( $('.h3', x)[0].getElementsByTagName('em')[0] ) { //the <em>(Online</em> element exists, so the user is online.
var div = document.createElement('div');
$(div).load('/viewonline .forumbg', function() { //load the data into a div to look for this users current activity
for(var i = 0, links = div.getElementsByTagName('a'), a; (a = links[i++]); ) {
if(window.location.href.indexOf(a.href) >= 0) { // we've found it.
var data = a.parentNode.parentNode.lastChild.innerHTML;
x.getElementsByTagName('img')[0].parentNode.innerHTML += '<br><span class="forum-location">Forum Location: ' + data + '</span>';
}
}
});
}
else {
x.getElementsByTagName('img')[0].parentNode.innerHTML += '<br><span class="forum-location">User is offline.</span>';
}
});
Tonight- Forumember
- Posts : 312
Reputation : 80
Language : Estonian, English, Russian
Location : Estonia
Re: Profile Viewing ?
@Tonight if the user is not in the online list, it'll display "offline". If you're looking at your profile it'll display what you're doing "viewing who is online". If you use another account that is viewing a specific forum, it'll say that they're viewing that forum like in the example.
Re: Profile Viewing ?
Yeah, I used a friend for testing, he was looking at a topic, but it showed Viewing who is online.
// Tested again and it still isn't working for me. Might there be other script causing the problems (for example Profile Song)?
// Tested again and it still isn't working for me. Might there be other script causing the problems (for example Profile Song)?
Tonight- Forumember
- Posts : 312
Reputation : 80
Language : Estonian, English, Russian
Location : Estonia
Re: Profile Viewing ?
@Tonight not at all. It all comes down to how the /viewonline page logs what the member is viewing. If you directly view a topic it'll display the last place you were in /viewonline. Here's an example :
I'm on the forum index, and I click on a topic in latest topics. => The person viewing my profile or /viewonline would see me viewing the forum index still.
Now if I go to the forum which has the topic, let's call this forum "Important" and then click on a topic in this forum. It'll show that I'm viewing the "Important" forum still.
The /viewonline list doesn't log topics, only specific locations such as forums, searches, etc...
I'm on the forum index, and I click on a topic in latest topics. => The person viewing my profile or /viewonline would see me viewing the forum index still.
Now if I go to the forum which has the topic, let's call this forum "Important" and then click on a topic in this forum. It'll show that I'm viewing the "Important" forum still.
The /viewonline list doesn't log topics, only specific locations such as forums, searches, etc...
Re: Profile Viewing ?
Okay, it somehow.Ange Tuteur wrote:@Tonight not at all. It all comes down to how the /viewonline page logs what the member is viewing. If you directly view a topic it'll display the last place you were in /viewonline. Here's an example :
I'm on the forum index, and I click on a topic in latest topics. => The person viewing my profile or /viewonline would see me viewing the forum index still.
Now if I go to the forum which has the topic, let's call this forum "Important" and then click on a topic in this forum. It'll show that I'm viewing the "Important" forum still.
The /viewonline list doesn't log topics, only specific locations such as forums, searches, etc...
if it did not appear when I went to my view Cpanel or topic.
Re: Profile Viewing ?
I'm sorry, but I could not comprehend what you're trying to say.Matrix317 wrote:Okay, it somehow.
if it did not appear when I went to my view Cpanel or topic.
Re: Profile Viewing ?
ange does this script run on post profiles?
nm i looked at it and it does not ..
but i have idea for this when i get some time ... when you visit a page it post to a profile field .. only prob is if they close the page or logout it will still show the last page they was on
nm i looked at it and it does not ..
but i have idea for this when i get some time ... when you visit a page it post to a profile field .. only prob is if they close the page or logout it will still show the last page they was on
Re: Profile Viewing ?
No, but it can certainly be modified to. I just think that if you have a lot of messages per page it could cause a handful of requests, so caching the results would definitely be something you'd want to do.. The one I posted is only for phpbb3, so if you want to support all versions this is the one you want..
http://fmdesign.forumotion.com/t280-display-user-activity-in-the-profile
http://fmdesign.forumotion.com/t280-display-user-activity-in-the-profile
Similar topics
» Currently Viewing : IN PROFILE
» Viewing profile
» Profile Viewing Settings Issue
» Profile tabs + separated profile fields
» Viewing who has logged on
» Viewing profile
» Profile Viewing Settings Issue
» Profile tabs + separated profile fields
» Viewing who has logged on
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum