vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Default Avatar For Members Without (https://vborg.vbsupport.ru/showthread.php?t=88835)

.LuTioN. 04-02-2004 09:00 PM

Default Avatar For Members Without
 
This mod will add a default avatar for members who have not selected an avatar. I haven't seen it released for vB3 Gold yet, so here it is ;)

Some styles code in the postbit and postbit_legacy templates are different. If you are having trouble, just attach your postbit code to a post and I'll sort it out for you.

The only bug I could see is if a member chooses not to view avatars, he will see the default avatar for everyone.

Live demo at pCn Forums

Please click install :)

Diva 04-03-2004 12:21 AM

Hi .LuTioN.! I've been looking for this hack. :)

I tried it and the only problem is that if there is no avatar the username goes below the noavatar.gif.

Here is the code I used (the postbit is different from the p-legacy:

Code:

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

PS: I'm using VB3G

Zachery 04-03-2004 12:25 AM

Add a div around his code for the second one.

Diva 04-03-2004 12:28 AM

Hmmm... I dont think I understand where to put the <div>. I tried this and nothing happened:

Code:

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


.LuTioN. 04-03-2004 12:42 AM

Sorry, fixing code now. Will update in a few minutes.

.LuTioN. 04-03-2004 01:15 AM

@Diva

Attachment updated, but it's working on my forum and I'm using the same code. Try this if you can't get the code to work:

Find:
Code:

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

<if condition="!$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="images/avatars/noavatar.gif" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
This code worked on my forum also.

And make sure your option to view avatars is checked in your userCP.

If anymore problems, please attach your postbit code to a post.

Diva 04-03-2004 01:24 AM

Yay! It works. :D Thank you two so much. *clicks install*

.LuTioN. 04-03-2004 01:25 AM

Your welcome :)

Which option did you choose to fix it?

Diva 04-03-2004 01:04 PM

The one that you posted that you said also worked in your forum. This is a big help. Thanks again. :D

.LuTioN. 04-03-2004 02:54 PM

Your welcome.


All times are GMT. The time now is 10:19 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.02198 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_code_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