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.

Image in Box Latest Topics - INVISION

View previous topic View next topic Go down

Solved Image in Box Latest Topics - INVISION

Post by la valle dell'eco on February 7th 2014, 2:40 pm

I'm trying to put the avatar in the Box Latest Topics.

( As in this image)




I put this Java code ( before i try on Index, then on Index and Portal and
finally on All Pages)

Code:
var CopyrightNotice = 'Copyright D World © 2012 - 2013. All right reserved. Addons to add avatar user in last topics widget for forumotion by InFeRn0. Only works on phpBB2';
$(function() {
var x = $('#left')[0]; // Left widget;
var y = $('#right')[0]; // Right widget;
$(x).find('.borderwrap .box-content a[href^="/t"]').each(function() {
var link = $(this).next().next().attr('href');
var title = $(this).next().next().text();
$(this).prepend('<a href="'+link+'" title="'+title+'"></a>');
$(this).children('a').load(link +'#profile-advanced-right .box-content.profile.center img:eq(0)', function() {
$(this).children('img').attr('class','tlistAv');
});
$(this).find('a[href^="/u"]').insertBefore($(this));
});
});


and then i insert this code in CSS

Code:
.tlistAv {
float: left;
margin-right: 5px;
width: 35px;
height: 35px;
border: 1px solid #CCC;
padding: 1px;
}



Unfortunately it does not work. I think it will not work because I put the Box Latest Topic on a duplicate page of the portal.
Here's the link.
http://www.lavalledelleco.net/portal?pid=3


You help me to make the right changes to the code to make it work?

la valle dell'eco
Forumember

Female Posts : 103
Reputation : 2
Language : Italian/English

http://www.lavalledelleco.net/

Back to top Go down

Solved Re: Image in Box Latest Topics - INVISION

Post by Ange Tuteur on February 7th 2014, 4:47 pm

Hello la valle dell'eco,

Try this script :
Code:
   var CopyrightNotice = 'Copyright D World © 2012 - 2013. All right reserved. Addons to add avatar user in last topics widget for forumotion by InFeRn0. Only works on phpBB2';
    $(function() {
    var x = $('#left')[0]; // Left widget;
    var y = $('#right')[0]; // Right widget;
    var z = $('td[width="100%"]')[0];
    $(z).find('.borderwrap .box-content a[href^="/t"]').each(function() {
    var link = $(this).next().next().attr('href');
    var title = $(this).next().next().text();
    $(this).prepend('<a href="'+link+'" title="'+title+'"></a>');
    $(this).children('a').load(link +'#profile-advanced-right .box-content.profile.center img:eq(0)', function() {
    $(this).children('img').attr('class','tlistAv');
    });
    $(this).find('a[href^="/u"]').insertBefore($(this));
    });
    });

I added a new variable (z) which should select the topics box on the portal.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Image in Box Latest Topics - INVISION

Post by la valle dell'eco on February 7th 2014, 5:10 pm

Great! cheers 
Everything works fine now.
Thank you! Wink

la valle dell'eco
Forumember

Female Posts : 103
Reputation : 2
Language : Italian/English

http://www.lavalledelleco.net/

Back to top Go down

Solved Re: Image in Box Latest Topics - INVISION

Post by Ange Tuteur on February 7th 2014, 5:14 pm

You're welcome I love you

Topic solved and archived

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.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