Last visit Profile on hover Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
2 posters

    Last visit Profile on hover

    HoeGy48
    HoeGy48
    Forumember


    Posts : 71
    Reputation : 1
    Language : Dutch

    Last visit Profile on hover Empty Last visit Profile on hover

    Post by HoeGy48 August 12th 2017, 10:06 am

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


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

    Post by Guest August 12th 2017, 5:23 pm

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


    Posts : 71
    Reputation : 1
    Language : Dutch

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

    Post by HoeGy48 August 12th 2017, 5:54 pm

    sure, could you send me the code?
    avatar
    Guest
    Guest


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

    Post by Guest August 12th 2017, 6:20 pm

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


    Posts : 71
    Reputation : 1
    Language : Dutch

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

    Post by HoeGy48 August 12th 2017, 11:45 pm

    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

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

    Post by HoeGy48 August 13th 2017, 6:28 pm

    bump
    SLGray
    SLGray
    Administrator
    Administrator


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

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

    Post by SLGray August 13th 2017, 9:56 pm

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


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

    Post by Guest August 14th 2017, 4:09 pm

    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');
    });
                        }
                      });
                    }
                  }
                }
              });
            });
    HoeGy48
    HoeGy48
    Forumember


    Posts : 71
    Reputation : 1
    Language : Dutch

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

    Post by HoeGy48 August 14th 2017, 4:28 pm

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


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

    Post by Guest August 14th 2017, 4:46 pm

    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');
            });
                                }
                              });
                            }
                          }
                        }
                      });
                    });
    HoeGy48
    HoeGy48
    Forumember


    Posts : 71
    Reputation : 1
    Language : Dutch

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

    Post by HoeGy48 August 14th 2017, 5:33 pm

    when i hover over it, a blank tab appearce.