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.

How to put the badge under the avatar via Javascript?

Go down

Solved How to put the badge under the avatar via Javascript?

Post by Alkimachos on Wed Sep 19, 2012 8:37 pm

Hi guys!

We have an issue on how to put the member's badges and rank below the avatar but with Javascript.. Do some of you know that?

Thanks in advance...

//phpBB 3.0//


Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Mon Sep 24, 2012 1:17 am

bump?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Guest on Mon Sep 24, 2012 4:15 am

Do you need it in JS? why not just use a postion system with CSS?

Guest
Guest


Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Mon Sep 24, 2012 7:06 pm

Rideem3 wrote:In phpBB3, the rank should already be below the avatar. Are you sure you're using phpBB3?

Yes, through java we putted the name above the avatar (because phpBB3 had it below), from our mistake though, we moved also the badge and the rank too. Now, we need a javascript where we could move the badge and the rank title below the avatar.

Any help please?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by SLGray on Tue Sep 25, 2012 3:47 am

Post the code that you used to move the username.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 42704
Reputation : 3006
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Tue Sep 25, 2012 3:59 am

slg wrote:Post the code that you used to move the username.

Ι think is this:

$(function(){
var post = $('.postprofile');
for(var i = 0, l = post.length; i<l; i++) {
var av = post[i].getElementsByTagName('a')[0];
var dd = document.createElement('dd').appendChild(av);
post[i].getElementsByTagName('dl')[0].insertBefore(dd,post[i].getElementsByTagName('dd')[1]);
}
});

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Tue Sep 25, 2012 3:24 pm

Rideem3 wrote:Are you sure that you have phpBB3, and not phpBB2? phpBB3 has the username under the username by default. phpBB2 doesn't.

Yeah, i know but we changed that with a javascript. But accidentally we putted the badge and the rank above the avatar when we tried to move only the username. We need the javascript to move only the rank and the badge below the avatar.

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Thu Sep 27, 2012 5:09 pm

Bump

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Mon Oct 01, 2012 6:56 am

Any help please?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by Alkimachos on Thu Oct 04, 2012 6:47 am

SOLVED with this:

$(function(){
$('.postprofile dl').each(function(){
var theBox = $(this).children('dt:first');
var uNameX = theBox.children('strong').html()+'<br>';
theBox.children('a').before(uNameX);
theBox.children('strong').hide();
});
});

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: How to put the badge under the avatar via Javascript?

Post by SLGray on Thu Oct 04, 2012 7:24 am

Topic Solved & Locked


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

avatar
SLGray
Administrator
Administrator

Male Posts : 42704
Reputation : 3006
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Back to top


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