vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Default avatar (https://vborg.vbsupport.ru/showthread.php?t=230203)

Allan 12-13-2009 10:00 PM

Default avatar
 
1 Attachment(s)
This mod add a default avatar, simply ^^
  • In "postbit" template, find:
PHP Code:

<vb:if condition="$show['avatar']">
                    <
class="postuseravatarlink" href="{vb:link member, {vb:raw post}}">
                        <
vb:if condition="$post.avatarurl">
                            <
img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        <
vb:else />
                            <
img src="{vb:stylevar imgdir_misc}/unknown.gif" />
                        </
vb:if>
                    </
a>
                </
vb:if> 

  • Replace to:
PHP Code:

<vb:if condition="$show['avatar']">
                    <
class="postuseravatarlink" href="{vb:link member, {vb:raw post}}">
                        <
vb:if condition="$post.avatarurl">
                            <
img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        
                        </
vb:if>
                    </
a>
<
vb:else />
                            <
img class="postuseravatarlink" align="left" src="{vb:stylevar imgdir_misc}/avatar.png" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                </
vb:if> 

PS: The IB code is no good by default, default avatar is expected but does not

PS2: image (avatar.png) is already included

fourat 12-15-2009 01:34 AM

Thank you Allan

interfx 12-15-2009 08:20 PM

Is there a way to make a default avatar for unregistered users?

Allan 12-15-2009 09:27 PM

Quote:

Originally Posted by interfx (Post 1931363)
Is there a way to make a default avatar for unregistered users?

PS2: image (avatar.png) is already included

http://www.vbulletin.com/forum/images/misc/avatar.png

interfx 12-15-2009 09:38 PM

Sorry, let me more clear... I'm looking for a solution to have unregistered users have a unqiue avatar... The default avatar (PS2) would still be there for registered users, but wanted an unique avatar for unregistered users...

Would your solution work for somehting like that?

taffy056 12-15-2009 10:55 PM

There is a product that does this also, perhaps that could help you interfx

Dr.osamA 12-18-2009 07:41 PM

thanx man !!
________
MONTANA MARIJUANA DISPENSARY

SİMAR 12-21-2009 05:12 PM

thanx

tazattitude 12-24-2009 03:03 PM

Thanks Allan!

GrossKopf 12-28-2009 07:59 PM

How is this different from the option in the Admin CP that lets you set a default avatar?


All times are GMT. The time now is 12:54 AM.

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.01632 seconds
  • Memory Usage 1,745KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete