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.
The forum of the forums
3 posters

    trying to fix Display a preview of the user profile on hover

    avatar
    Goppyrules
    Forumember


    Posts : 125
    Reputation : 2
    Language : english

    Solved trying to fix Display a preview of the user profile on hover

    Post by Goppyrules Thu 18 May - 17:11

    i been trying to use this javascript from http://fmdesign.forumotion.com/t404-display-a-preview-of-the-user-profile-on-hover#3246and its not working:
    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) {
                          usersinfo[userid] = html;
                          origin.tooltipster('content', html).data('ajax', 'cached');
                        }
                      });
                    }
                  }
                }
              });
            });


    Last edited by Goppyrules on Fri 19 May - 0:48; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: trying to fix Display a preview of the user profile on hover

    Post by Ange Tuteur Thu 18 May - 19:34

    Hi @Goppyrules,

    Please provide a link to your forum so that I may inspect the issue.
    avatar
    Goppyrules
    Forumember


    Posts : 125
    Reputation : 2
    Language : english

    Solved Re: trying to fix Display a preview of the user profile on hover

    Post by Goppyrules Thu 18 May - 20:04

    Ange Tuteur wrote:Hi @Goppyrules,

    Please provide a link to your forum so that I may inspect the issue.

    http://monarchduelacademy.forumotion.me/forum
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: trying to fix Display a preview of the user profile on hover

    Post by Ange Tuteur Thu 18 May - 20:14

    You have a JavaScript error on your forum that's preventing it from working :
    trying to fix Display a preview of the user profile on hover Captur43

    Look for a script that contains content similar to the code below and remove it:
    Code:
    content="summary"/><meta name="twitter:site"content="@Forumotion"/><meta name="twitter:title"content="Alpha Knights Academy"/><meta property="og:description"content="Here at Alpha Knights Academy, we play Yu-Gi-Oh! Come and join us. Have fun! "/><meta name="title"content="Alpha Knights Academy"/><link rel="stylesheet"href="/0-ltr.css"type="text/css"/><link rel="search" type="application/opensearchdescription+xml" href="/improvedsearch.xml" title="Alpha Knight Forums" /><link rel="search" type="application/opensearchdescription+xml" href="https:$(document).ready(function(){});<script type="text/javascript"src="https://static.criteo.net/js/ld/publishertag.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/mentions/tooltipster.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/mentions/init.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/cookie/jquery.cookie.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/toolbar/FAToolbar.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/json/json2.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/printf/printf.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/dotdotdot/jquery.dotdotdot-1.5.6.js"></script><script type="text/javascript"src="https://illiweb.com/rs3/98/frm/jquery/notif/FA.js"></script><script type="text/javascript">
    You'll most likely have to go through each script one by one until you find it. I recommend looking for a specific portion of the code and not the whole thing, since it'll be easier to find that way.
    avatar
    Goppyrules
    Forumember


    Posts : 125
    Reputation : 2
    Language : english

    Solved Re: trying to fix Display a preview of the user profile on hover

    Post by Goppyrules Fri 19 May - 0:49

    it works now. thank you for your help. problem solved.
    SLGray
    SLGray
    Administrator
    Administrator


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

    Solved Re: trying to fix Display a preview of the user profile on hover

    Post by SLGray Fri 19 May - 3:36

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    trying to fix Display a preview of the user profile on hover Slgray10

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

      Current date/time is Sun 22 Sep - 17:24