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)

Brother Malachi 01-01-2010 08:30 AM

Hey Allan, I'm a bit confused.
Doesn't $show[avatar] check to see whether the user has chosen to display or hide avatars through his/her userCP?
Meaning, if I were to go to my userCP and uncheck the "Show Avatars" then your code kicks in showing the default blank one.

Is that the purpose of your code?
Or are you trying to make it so that if a user does not have an avatar, the default one is shown?

Quote:

Originally Posted by interfx (Post 1931391)
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?

Use this:
Code:

<vb:if condition="$show['guest']"></vb:if>

shahz 11-03-2010 06:25 PM

Thanks for the bit bro, but I would like to fix the code just a little bit more to make it perfect. Currently, the default avatars are not linking to the profile. Use this one instead:

Code:

<vb:if condition="$show['avatar']">
                    <a 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>


LordMike 11-13-2010 05:11 AM

^^ that's the difference between amateur tweaking and the real pro's.

Thanks for the insight, I've only changed the .gif to .png so I'm not sure, but I think everything will stay the same as it was? Doesn't vB takes care of this ? (I mean to check if the avatars is on/off in usercp)


All times are GMT. The time now is 01:56 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.01027 seconds
  • Memory Usage 1,726KB
  • 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_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
  • (3)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