PDA

View Full Version : Can I just have the Avatar show?


RaceMediaGroup
01-07-2011, 05:21 PM
Can I just have the Avatar show?

Can I just have the Avatar show instead of a username?
I'm looking to have my new forum with avatars for each member shown instead of a username where no other member can know who that person is....

Please help and thank you.

Lynne
01-07-2011, 06:41 PM
That is not a default option, no. You would need to edit all the templates to remove the username from showing.

RaceMediaGroup
01-07-2011, 07:20 PM
What is all templates?

when I find the show username in each template the avatar will still show? correct?

Lynne
01-07-2011, 09:52 PM
Which templates? I don't know - I don't want to go through all the pages to find them. You can find the template by doing this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

RaceMediaGroup
01-10-2011, 04:32 PM
So everytime I see 'postusername'
Is that were I need to delete so the username doesn't show up on certain templates?
is there such thing as "postavatar"?

Lynne
01-10-2011, 05:35 PM
postusername is only going to be used in posts. It will have a different name on profile pages. I think you will want to go to the pages you want to remove the avatar from and then find the template and edit it. I would not just randomly start removing code from any template that has "postusername" (or similar) in it.

RaceMediaGroup
01-26-2011, 03:18 PM
I don't want to remove the avatar. I only want the avatar to show where any username is exposed. then I want to entirely remove the username from the public. So basically the Avatar is their username.

Lynne
01-26-2011, 03:43 PM
Advice still stands. You will want to go to any template that has the username and remove it.

RaceMediaGroup
01-26-2011, 03:45 PM
What is the code to display the avatar?

Lynne
01-26-2011, 04:11 PM
What do you mean "what is the code to display the avatar"? The actual code? You can look up the function fetch_avatar_from_userinfo in the API (http://members.vbulletin.com/api/). Or do you mean the html in the templates? In the postbit, it is this:
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />

RaceMediaGroup
01-26-2011, 04:15 PM
What I mean is when I go to edit the templates where I want to place the code avatar to make the avatar show....

so will that code you just gave me help?
thank you for all of your assistance!

Lynne
01-26-2011, 10:03 PM
If you are going to be adding an avatar where none currently exists, you are going to need to look at the API like I said. In fact, once you find the functions in there regarding getting the avatar, you should then do a search through the php files and look to see how it has been used before. You will then need that code if you try to use an avatar and the avatar isn't already available for use - probably several plugins are in your future.