Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

NinthJake

NinthJake Avatar
The Ninth

**
Official Member

78


November 2009
I need some help with displaying some information in Smangii's side tables.

I want to have the user's own profile displaying in one of the side tables but I am kinda new to javascript so I need some help with that :P

I want to have the information display in this order.
Display Name.
Avatar.
Rank.
*Gap*
Posts.
Karma.
User is Online/Offline.

I know the "document.GetElementsByTagName" but I don't really know how to display them ???

So if anyone could help me with the code then it would be greatly appreciated :)

Thanks.


Last Edit: Dec 17, 2009 10:54:57 GMT by NinthJake

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Well,, the first issue is getting that information. There's only a few things available from the main page... those being Display Name and user's online/offline status (which is online, unless they're a guest.)

There's a snippet written by me (with a contribution by Ben) that helps with that. You can find it in our Open Source board. I think it's like "Rank/Karma/Posts Holder" or something. :P It should be on the front page either way. The next thing to do is to just write the info into the side table.

This, as far as JS goes, is basic. We'll just do stuff like this:

<script type="text/Javascript">
document.write(__get("rank"));
</script>


That assumes the __get function is used to look up the items. But that'll literally put the user's rank wherever you put that script. So, basically, you just need to know HTML after that point.

NinthJake

NinthJake Avatar
The Ninth

**
Official Member

78


November 2009
Alright :D

Thank you Chris!

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Yep. :) Just post back if you come across any issues.

newBookmarkLockedFalling