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.

Moving User Avatars with JavaScript

View previous topic View next topic Go down

Solved Moving User Avatars with JavaScript

Post by Yous000 on May 5th 2012, 10:21 pm

For people using phpBB3 like myself you are unable to move the Users name and rank title above the avatar unless you use a javascript code. Many people have had this problem and I would highly appreciate if somebody who is good with JavaScript can write in the code for all user names and rank titles to appear above the avatar, it would help me out and other phpBB3 users a lot.



All replies are highly appreciated.

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Sir Chivas™ on May 5th 2012, 10:23 pm

Hi, Hello

You can simply change the Version of your forum mate. Wink



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Yous000 on May 5th 2012, 10:46 pm

Sir Chivas™ wrote:Hi, Hello

You can simply change the Version of your forum mate. Wink

Somebody said if I did that I would have to start everything over.

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Sir Chivas™ on May 5th 2012, 10:48 pm

No, you got that mistaken. That's for the Theme (skin) Wink



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Yous000 on May 5th 2012, 11:13 pm

Sir Chivas™ wrote:No, you got that mistaken. That's for the Theme (skin) Wink

So how would I do it then without losing my themes and stuff? Smile

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Sir Chivas™ on May 5th 2012, 11:20 pm

Well, alright.

ACP >> Display >> Choose a theme >> Version.

Please note: If you only have codes in the CSS, that only work for Phpbb3, will not work for phpbb2

Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by LGforum on May 5th 2012, 11:48 pm

Changing your forum version is a big step to take just for this small thing... it will DRASTICALLY change your forum. Not to mention your moving away from the most powerful board type.

I'll give you some Javascript for this in a minute. Just wanted to press send before you make this silly mistake.


LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Yous000 on May 5th 2012, 11:50 pm

@LGforum wrote:Changing your forum version is a big step to take just for this small thing... it will DRASTICALLY change your forum. Not to mention your moving away from the most powerful board type.

I'll give you some Javascript for this in a minute. Just wanted to press send before you make this silly mistake.


Thanks so much. I have not done it yet, waiting for the JavaScript Razz

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by LGforum on May 5th 2012, 11:58 pm

Code:

$(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]);
  }
});

Put that in a JS file, and have it running 'only in topics'. You can add it to an existing one if you have one.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Yous000 on May 6th 2012, 12:04 am

@LGforum wrote:
Code:

$(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]);
  }
});

Put that in a JS file, and have it running 'only in topics'. You can add it to an existing one if you have one.

Works like a CHARM! I now forever love you. This should be made into an official forumotion tutorial. :wouhou:

Yous000
Forumember

Posts : 240
Reputation : 4
Language : English

Back to top Go down

Solved Re: Moving User Avatars with JavaScript

Post by Jophy on May 6th 2012, 7:27 am

Topic Solved & Locked

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

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