السلام عليكم ورحمة الله وبركاتة |
كودjavascriptلعرض صورة الأعضاء الموسمين فى الموضيع |
نقدم لكم اليوك كود أظهار صورة العضو
الموسوم فى الموضبع والردود
وهذا مثال الوسم @عبدالله الوكيل
واليكم صورة توصح ذالك
والان مع الكود
طريقة التركيب
لوحة الأدارة
عناصر أضافية
HTML و JAVASCRIPT
ادارة اكواد JAVASCRIPT
إنشاء كود جديد
واضف الكود واختر عرض على الموضوع
او على جميع الصفحات
وسجل
اليكم الكود: |
الكود:
(function() { 'DEVELOPED BY ANGE TUTEUR'; 'NO DISTRIBUTION WITHOUT CONSENT OF THE AUTHOR'; 'ORIGIN : 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.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(); }); }());
والان انتهى الموضوع والى اللقاء بموضوع جديد |