Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2009, 10:27 PM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 01-14-2009, 11:01 PM
Bellardia Bellardia is offline
 
Join Date: Jul 2007
Location: Hamilton, Ontario
Posts: 378
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 01-15-2009, 12:14 AM
pein87's Avatar
pein87 pein87 is offline
 
Join Date: Sep 2008
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-15-2009, 11:42 AM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:



Im sorry I have no idea on coding nothing.

THANKS
Attached Images
File Type: jpg Dibujo.jpg (42.9 KB, 0 views)
Reply With Quote
  #5  
Old 01-15-2009, 12:25 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post a link to an example.
Reply With Quote
  #6  
Old 01-15-2009, 12:32 PM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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
Reply With Quote
  #7  
Old 01-15-2009, 02:09 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 --> 
Reply With Quote
  #8  
Old 01-15-2009, 03:05 PM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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?









Reply With Quote
  #9  
Old 01-15-2009, 03:09 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
  #10  
Old 01-15-2009, 03:14 PM
MaR? MaR? is offline
 
Join Date: Aug 2008
Location: Argentina
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DONE!!

Lynne Thank you so so so so much!!!!!!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:33 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.04255 seconds
  • Memory Usage 2,282KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete