أرشيف انكور
(نسخة قابلة للطباعة من الموضوع)
https://archive.iinkor.com/t28
أنقر هنا لمشاهدة الموضوع بهيئته الأصلية

اظهار صورة العضو وبياناته في خاصية الاشارة (TAG)
Admin 19-01-2020 05:42 مساءً
4254219950
47010
لمشاهدة الروابط يلزمك التسجيل




تظهر البيانات عند وضع المؤشر على صورة العضو فقط


3434259910قبل ان تقوم بتركيب الكود تأكد بأنك قد ركبت هذا الكود لانه يعتمد عليه[/b]

لمشاهدة الروابط يلزمك التسجيل



والان اضف الكود التالي الى الـ javascript وعينه على جميع الصفحات
والعنوان كما يحلو لك
CODE
  
        (function() {
          'DEVELOPED BY ANGE TUTEUR';
          'NO DISTRIBUTION WITHOUT CONSENT OF THE AUTHOR';
          'ORIGIN : http://fmdesign.forumotion.com/t399-display-the-user-avatar-before-mentions#3207';
         
          window.faMentionAvatar = {
            // position modifies the position of the avatar
            // 0 = before mention
            // 1 = after mention
            position : 0,
            cacheTime : 1*60*60*1000, // amount of time the avatar is cached ( 1 hour )
           
            mentions : null, // mention node list
            index : -1, // current index in the mentions array
           
            // checks if the mention is valid and then gets the avatar
            getter : function() {
              var mention = faMentionAvatar.mentions[++faMentionAvatar.index],
                  storage = window.localStorage,
                  id;
                 
              if (mention) {
                id = mention.href.replace(/.*?\/u/, '');
               
                if (storage && storage['mentionAvatar_' + id] && storage['mentionAvatar_' + id + '_exp'] > +new Date - faMentionAvatar.cacheTime) {
                  var avatar = document.createElement('IMG');
                  avatar.className += ' mention-ava';
                  avatar.src = storage['mentionAvatar_' + id];
                  faMentionAvatar.position ? mention.appendChild(avatar) : mention.insertBefore(avatar, mention.firstChild);
                  faMentionAvatar.getter();
                } else {
                  $.get('/ajax/index.php?f=m&user_id=' + id, function(d) {
                    var avatar = $('.tooltip-content > img', d)[0];
                       
                    if (avatar) {
                      faMentionAvatar.position ? mention.appendChild(avatar) : mention.insertBefore(avatar, mention.firstChild);
                     
                      if (storage) {
                        storage['mentionAvatar_' + id] = avatar.src;
                        storage['mentionAvatar_' + id + '_exp'] = +new Date;
                      }
                    }
                    faMentionAvatar.getter();
                  });
                }
              }
            }
          };
         
          // write the stylesheet into the HEAD section
          document.write('<style type="text/css">.mentiontag img { height:20px; width:20px; vertical-align:middle; border-radius:100px; background:#FFF; box-shadow:0px 1px 1px rgba(0, 0, 0, 0.3), 0px -0px 1px rgba(0, 0, 0, 0.3); margin:1px 3px; padding:1px; }</style>');
         
          // statements that need execution when the document is ready
          $(function() {
            faMentionAvatar.mentions = $('.mentiontag');
            faMentionAvatar.getter();
          });
        }());


بالتوفيق للجميع
يمنع النقل دون ذكر المصدر
شركة انكور التطويريةوالسلام ختام
أرشيف انكور

Copyright © 2009-2025 PBBoard® Solutions. All Rights Reserved