السلام علييكم
اقدم لكم كود لوضع صورة صاحب المساهمة بجانب اخر مساهمة
وهو كود جافاسكربت و سي س س
- الكود:
-
/* Avatar in index by giObanii phpbb3*/
$(document).on('ready', function() {
$('.topiclist.forums .row .lastpost').prepend('<div class="avatar-index"><div>');
$('.topiclist.forums .row .lastpost .avatar-index').each(function () {
var profileUserURL = $(this).parent().children('span').children('strong').children('a').attr('href');
$(this).html('<a href="' + profileUserURL + '" class="avatar-index-enlace"><img src="http://cdn1.iconfinder.com/data/icons/basicset/user_64.png" alt="No Avatar" /></a>');
$(this).children('a').load(profileUserURL + ' .module:eq(0) img:eq(0)')
});
});
css
- الكود:
-
.avatar-index { float: left; }
.avatar-index img { width: 40px; height: 40px; padding: 1px; border: 1px solid #DDD; margin: 0 5px; }
في حفظ الرحمن