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?

View previous topic View next topic Go down

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

Post by Alkimachos on September 19th 2012, 2: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 September 23rd 2012, 7:17 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 Guest on September 23rd 2012, 10:15 pm

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 September 24th 2012, 1: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 September 24th 2012, 9:47 pm

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.


SLGray
Administrator
Administrator

Male Posts : 36679
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

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

Post by Alkimachos on September 24th 2012, 9:59 pm

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 September 25th 2012, 9:24 am

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 September 27th 2012, 11:09 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 Alkimachos on October 1st 2012, 12: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 October 4th 2012, 12: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 October 4th 2012, 1:24 am

Topic Solved & Locked


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


SLGray
Administrator
Administrator

Male Posts : 36679
Reputation : 2445
Language : English
Location : United States

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