The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Last visit Profile on hover

2 posters

Go down

Last visit Profile on hover Empty Last visit Profile on hover

Post by HoeGy48 Sat 12 Aug - 10:06

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
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by Guest Sat 12 Aug - 17:23

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.
avatar
Guest
Guest


Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by HoeGy48 Sat 12 Aug - 17:54

sure, could you send me the code?
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by Guest Sat 12 Aug - 18:20

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.
avatar
Guest
Guest


Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by HoeGy48 Sat 12 Aug - 23:45

aah sorry i indeed misunderstood, i'll remove the code now. my link, www.orion-gaming.com
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by HoeGy48 Sun 13 Aug - 18:28

bump
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by SLGray Sun 13 Aug - 21:56

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!

Please read our forum rules:  ESF General Rules


Last visit Profile on hover Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by Guest Mon 14 Aug - 16:09

Hi again,

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');
});
                    }
                  });
                }
              }
            }
          });
        });
avatar
Guest
Guest


Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by HoeGy48 Mon 14 Aug - 16:28

This si what i get now.
Last visit Profile on hover Untitl15

But i would like it to display beneath "friends" in the same style.
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by Guest Mon 14 Aug - 16:46

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');
        });
                            }
                          });
                        }
                      }
                    }
                  });
                });
avatar
Guest
Guest


Back to top Go down

Last visit Profile on hover Empty Re: Last visit Profile on hover

Post by HoeGy48 Mon 14 Aug - 17:33

when i hover over it, a blank tab appearce.
HoeGy48
HoeGy48
Forumember

Posts : 71
Reputation : 1
Language : Dutch

http://www.oriongaming.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum