vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Default Avatar + Signature (https://vborg.vbsupport.ru/showthread.php?t=141129)

Draygonia 03-04-2007 05:45 PM

Default Avatar + Signature
 
I seem to be gliding by posters that post something but do not have an avatar or sig. Their post seems meaningless and unimportant.

Perhaps there should be a mod that gives a default avatar and signature to new users who sign up but do not define one.

Gray Matter 03-05-2007 04:52 PM

This could easily be done with only template changes.

Draygonia 03-05-2007 05:11 PM

What template changes would that be?

Gray Matter 03-05-2007 05:51 PM

In template "postbit" or "postbit_legacy,"

Find:

Code:

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

Code:

<td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="<if condition="$show['avatar']">$post[avatarurl]<else />images/avatars/default.gif</if>" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td>
and in template "MEMBERINFO,"

Find:

Code:

<if condition="$show['avatar']">
        <td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
<else />
        <td>&nbsp;</td>
</if>

and replace it with:

Code:

<td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="<if condition="$show['avatar']">$post[avatarurl]<else />images/avatars/default.gif</if>" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td>
Be sure to replace the red text with the location of the default avatar file.


Edited:

For a default signature, do the following.

In template "postbit" or "postbit_legacy,"

Find:

Code:

<if condition="$post['signature']">
<!-- sig -->
        <div>
                __________________<br />
                $post[signature]
        </div>
<!-- / sig -->
</if>

and replace it with:

Code:

<!-- sig -->
        <div>
                __________________<br />
                <if condition="$post['signature']">$post[signature]<else />Default Signature Here</if>
        </div>
<!-- / sig -->
</if>

In template "MEMBERINFO,"

Find:

Code:

<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
        <td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>

and replace it with:

Code:

<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
        <td class="alt1" title="$vbphrase[signature]"><if condition="$show['signature']">$userinfo[signature]<else />Default Signature Here</td>
</tr>
</table>
<!-- / signature row -->
<br />

Remember to replace the red text with the default signature that you want to appear.

Draygonia 03-05-2007 09:32 PM

Thanks! Once I create a default sig and avatar I will do it! Thanks a lot! Saving your post :D

shaunh 03-08-2007 08:57 AM

Quote:

Originally Posted by Gray Matter (Post 1196457)
In template "postbit" or "postbit_legacy,"

Find:

Code:

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

Code:

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

This tore my pages apart something awful.

I had success with this instead:

Code:

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

blind-eddie 03-10-2007 01:15 PM

Very nice, I have been asking this very question for a long time...With the template edits above, is there a way to to have many default avatars & sigs...Then a member without avatars & sigs can pick from the few default ones to use or upload their own?


All times are GMT. The time now is 06:31 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.01555 seconds
  • Memory Usage 1,739KB
  • 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
  • (11)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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