Last visit Profile on hover
2 posters
Page 1 of 1
Last visit Profile on hover
Hello,
I've recently edded the profile on hover feature. explained here: http://fmdesign.forumotion.com/t404p50-display-a-preview-of-the-user-profile-on-hover
But i would like to add the last visit time in it as well.
Does anyone know which chanbge i've to make to do so?
kind regards
I've recently edded the profile on hover feature. explained here: http://fmdesign.forumotion.com/t404p50-display-a-preview-of-the-user-profile-on-hover
But i would like to add the last visit time in it as well.
Does anyone know which chanbge i've to make to do so?
kind regards
Re: Last visit Profile on hover
Hello,
Remove the code from that tutorial from your forum. I made a code that should do what you want but I need to test it on your forum.
Remove the code from that tutorial from your forum. I made a code that should do what you want but I need to test it on your forum.
Guest- Guest
Re: Last visit Profile on hover
You didn't understood what I said. I have a code that is almost complete but I have to test it on your forum. I'll test it myself through the browser's console(the console is a place that allows one to run javascript on aony page). The code by Ange and the one by me are messing up with each other and I can't see for sure if my code is ok or not. That's way I asked you to remove Ange's code.
Guest- Guest
Re: Last visit Profile on hover
aah sorry i indeed misunderstood, i'll remove the code now. my link, www.orion-gaming.com
Re: Last visit Profile on hover
HoeGy48 wrote:aah sorry i indeed misunderstood, i'll remove the code now. my link, www.orion-gaming.com
HoeGy48 wrote:bump
Second Reminder: Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Last visit Profile on hover
Hi again,
See if this code works:
See if this code works:
- Code:
$(function() {
var links = $('a[href^="/u"]').filter(function() {
if (this.firstChild && this.firstChild.tagName) {
if (this.firstChild.tagName != 'IMG') {
return this;
}
} else {
return this;
}
}),
usersinfo = {};
links.tooltipster && links.not('.mentiontag, .tooltipstered').filter(function() {
if (!$(this).closest('#tabs')[0]) {
return this;
}
}).tooltipster({
animation : 'fade',
interactive : true,
contentAsHTML : true,
minWidth : 300,
maxWidth : 300,
delay : 500,
arrowColor : "#EEE",
autoClose : true,
content : 'Loading...',
functionBefore: function(origin, continueTooltip) {
continueTooltip();
var userid = $(this).attr('href').replace(/.*?\/u(\d+).*/, '$1');
if (origin.data('ajax') !== 'cached') {
if (usersinfo[userid] != undefined) {
origin.tooltipster('content', usersinfo[userid]).data('ajax', 'cached');
} else {
$.ajax({
type: 'GET',
url: "/ajax/index.php",
dataType: "html",
data: {
f: "m",
user_id: userid
},
success: function(html) {
$.get("/u"+userid+"stats", function(data){
data=$("li>label:contains('Last visit :')", data).first().parent().html();
html+=data;
usersinfo[userid] = html;
origin.tooltipster('content', html).data('ajax', 'cached');
});
}
});
}
}
}
});
});
Guest- Guest
Re: Last visit Profile on hover
This si what i get now.
But i would like it to display beneath "friends" in the same style.
But i would like it to display beneath "friends" in the same style.
Re: Last visit Profile on hover
Replace the code with:
- Code:
$(function() {
var links = $('a[href^="/u"]').filter(function() {
if (this.firstChild && this.firstChild.tagName) {
if (this.firstChild.tagName != 'IMG') {
return this;
}
} else {
return this;
}
}),
usersinfo = {};
links.tooltipster && links.not('.mentiontag, .tooltipstered').filter(function() {
if (!$(this).closest('#tabs')[0]) {
return this;
}
}).tooltipster({
animation : 'fade',
interactive : true,
contentAsHTML : true,
minWidth : 300,
maxWidth : 300,
delay : 500,
arrowColor : "#EEE",
autoClose : true,
content : 'Loading...',
functionBefore: function(origin, continueTooltip) {
continueTooltip();
var userid = $(this).attr('href').replace(/.*?\/u(\d+).*/, '$1');
if (origin.data('ajax') !== 'cached') {
if (usersinfo[userid] != undefined) {
origin.tooltipster('content', usersinfo[userid]).data('ajax', 'cached');
} else {
$.ajax({
type: 'GET',
url: "/ajax/index.php",
dataType: "html",
data: {
f: "m",
user_id: userid
},
success: function(html) {
$.get("/u"+userid+"stats", function(data){
data=data.split("</ul></div><div").join($("li>label:contains('Last visit :')", data).first().parent().html()+"</ul></div><div");
html+=data;
usersinfo[userid] = html;
origin.tooltipster('content', html).data('ajax', 'cached');
});
}
});
}
}
}
});
});
Guest- Guest
Similar topics
» Show Profile Fields on hover
» Profile Field On Hover
» how i add a field to hover mini profile?
» Not able to hover over profile fields and edit them
» Profile/Banner Hover Image
» Profile Field On Hover
» how i add a field to hover mini profile?
» Not able to hover over profile fields and edit them
» Profile/Banner Hover Image
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum