The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

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

View previous topic View next topic Go down

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

Post by Goppyrules on May 18th 2017, 5:11 pm

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 May 19th 2017, 12:48 am; edited 1 time in total

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

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

Post by Ange Tuteur on May 18th 2017, 7:34 pm

Hi @Goppyrules,

Please provide a link to your forum so that I may inspect the issue.
avatar
Ange Tuteur
Forumaster

Male Posts : 13179
Reputation : 2884
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

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

Post by Goppyrules on May 18th 2017, 8:04 pm

@Ange Tuteur wrote:Hi @Goppyrules,

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

http://monarchduelacademy.forumotion.me/forum

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

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

Post by Ange Tuteur on May 18th 2017, 8:14 pm

You have a JavaScript error on your forum that's preventing it from working :


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/rsc/98/frm/mentions/tooltipster.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/mentions/init.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/jquery/cookie/jquery.cookie.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/jquery/toolbar/FAToolbar.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/json/json2.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/jquery/printf/printf.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/98/frm/jquery/dotdotdot/jquery.dotdotdot-1.5.6.js"></script><script type="text/javascript"src="https://illiweb.com/rsc/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
Ange Tuteur
Forumaster

Male Posts : 13179
Reputation : 2884
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

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

Post by Goppyrules on May 19th 2017, 12:49 am

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

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

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

Post by SLGray on May 19th 2017, 3:36 am

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 41171
Reputation : 2815
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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