vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Default Avatar (https://vborg.vbsupport.ru/showthread.php?t=201798)

MaR? 01-14-2009 10:27 PM

Default Avatar
 
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
Code:

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

</if>

Change to
Conditional in the postbit
find
Code:

<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

1 Attachment(s)
Hi Bellardia and Pein, thanks!!!!.

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

PHP Code:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<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

PHP Code:

<!-- 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

Quote:

Originally Posted by Lynne (Post 1713408)
hehe. It's src, not scr

PHP Code:

<!-- 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):

HTML Code:

<!-- 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:


All times are GMT. The time now is 05:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00990 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete