I have PhpBB3 Version.
Is this possible to get my forum?
I want Current Activity.
Is this possible to get my forum?
I want Current Activity.
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>')
});
});
.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 }
$(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>';
}
});
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...
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.