How to put the badge under the avatar via Javascript? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    How to put the badge under the avatar via Javascript?

    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos 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//

    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos September 23rd 2012, 7:17 pm

    bump?
    avatar
    Guest
    Guest


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

    Post by Guest September 23rd 2012, 10:15 pm

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


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos 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?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

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

    Post by SLGray September 24th 2012, 9:47 pm

    Post the code that you used to move the username.



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

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


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos 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]);
    }
    });
    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos 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.
    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos September 27th 2012, 11:09 am

    Bump
    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos October 1st 2012, 12:56 am

    Any help please?
    avatar
    Alkimachos
    Forumember


    Posts : 35
    Reputation : 1
    Language : Greek

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

    Post by Alkimachos 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();
    });
    });
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

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

    Post by SLGray October 4th 2012, 1:24 am

    Topic Solved & Locked



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

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