PDA

View Full Version : Default Avatar


MaR?
01-14-2009, 10:27 PM
I would like to know how can I put a default avatar for those whom havenĀ“t selected or upload one.

Thank you very much.

Using 3.8.0

Bellardia
01-14-2009, 11:01 PM
Conditional in the postbit
find

<if condition="$show['avatar']">

</if>

Change to
Conditional in the postbit
find

<if condition="$show['avatar']">

<else />
Default image
</if>

pein87
01-15-2009, 12:14 AM
there already is one shown its the unknown.gif image in the misc folder in the main images folder. All you have to do is change it out with another avatar image named unknown.gif

or like said above look in post bit and find

the if conditional that displays the avatar and replace with this.

<if condition="$show[avatar]">
<if condition="$vbulletin->userinfo[hascustomavatar]">
<img src="image.php?u=$bbuserinfo[userid]&amp;dateline=" alt="$bbuserinfo[username]'s avatar" />
<else />
<!-- add path to your own image -->
<img scr="" alt="" />
<!-- /add path to your own image -->
</if>
</if>

I use somthing similar for my avatar on nav bar mod. Hope this helps you.

MaR?
01-15-2009, 11:42 AM
Hi Bellardia and Pein, thanks!!!!.

Well... Im doing something wrong... look the finaly code:


<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td>

<else />
<!-- add path to your own image -->
<img scr="http://www.altoforo.com/archivos/defaultavatar.jpg" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" />
<!-- /add path to your own image -->

</if>


But show no avatar.... look the attach...

The url is ok, chek it out:http://www.altoforo.com/archivos/defaultavatar.jpg



Im sorry I have no idea on coding nothing.

THANKS

Dismounted
01-15-2009, 12:25 PM
Please post a link to an example.

MaR?
01-15-2009, 12:32 PM
<a href="http://www.altoforo.com/la-radio-de-alto-foro/7300-4-programa-de-la-radio-af-en-vivo-15-01-09-a-new-post.html" target="_blank">http://www.altoforo.com/la-radio-de-...-new-post.html</a>

Here you are

Lynne
01-15-2009, 02:09 PM
hehe. It's src, not scr

<!-- add path to your own image -->
<img src="http://www.altoforo.com/archivos/defaultavatar.jpg" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" />
<!-- /add path to your own image -->

MaR?
01-15-2009, 03:05 PM
hehe. It's src, not scr

<!-- add path to your own image -->
<img src="http://www.altoforo.com/archivos/defaultavatar.jpg" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" />
<!-- /add path to your own image -->


THANKS! Now is working just PERFECT!

But The avatar shows down the nick... How can I put this next to the nick?









https://vborg.vbsupport.ru/external/2009/01/36.gif

Lynne
01-15-2009, 03:09 PM
I would suggest putting the <td> tags around the default (it should fix your issue):

<!-- add path to your own image -->
<td class="alt2"><img src="http://www.altoforo.com/archivos/defaultavatar.jpg" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" /></td>
<!-- /add path to your own image -->

MaR?
01-15-2009, 03:14 PM
DONE!!

Lynne Thank you so so so so much!!!!!!!! :cool: