vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Defualt Profile Picture in Profile (https://vborg.vbsupport.ru/showthread.php?t=97928)

PennylessZ28 10-08-2005 10:00 PM

Defualt Profile Picture in Profile
 
Just like the defualt avatar for users who don't have one, I wanted to fill the void for users who didn't have a profile picture.

Here is an example of someone with no profile information

http://www.hr3rdgen.org/member.php?u=273

And someone with all the information filled out

http://www.hr3rdgen.org/member.php?u=1

This is very simple, just follow the directions.

ACP > Styles & Templates > Style Manager

Edit your MEMBERINFO template

Find:
HTML Code:

                        <if condition="$show['profilepic']">
                        <td valign="top" align="$stylevar[right]" rowspan="2">
                            <img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
                        </td>
                        </if>

Replace with

HTML Code:

                        <if condition="$show['profilepic']">
                        <td valign="top" align="$stylevar[right]" rowspan="2">
                                <img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
                        </td>
<else />
                        <td valign="top" align="$stylevar[right]" rowspan="2">
                            <img src="$stylevar[imgdir_misc]/no_pic.jpg"  alt="$userinfo[username]" border="0" style="border:1px solid $stylevar[tborder_bgcolor];" />
                        </td>
                        </if>




Now all you need to do is create a defualt profile picture image to use.
I made one in photoshop real quick and named it no_pic.jpg and uploaded to the images/misc directory.

Blindchild02 10-09-2005 03:44 AM

how come the register link (>> Registration is free!) on your forum leads to a different forum? lol

PennylessZ28 10-09-2005 03:54 AM

HAHA, thanks for point that out, cuase I made that style for a friend's site, I ended up liking it so much I used it on mine.

Blindchild02 10-09-2005 04:05 AM

haha alright, nice mod indeed ;)

PennylessZ28 11-09-2005 02:15 AM

thanx

Snake 12-08-2005 04:46 PM

Works on 3.5.2?

AWI 12-09-2005 05:14 AM

Thanks for this....installed on 3.5.2 and all is well!

Snake 12-09-2005 08:42 AM

Oh thanks!

ConKien 12-23-2005 02:41 AM

This only show for the logged in users only? When I'm not logged in, it showed the nopix.gif even though this user (me) had a picture!

Thanks
CK

Bass Nutz 01-15-2006 06:34 PM

Strange, I did everything you said to do. I made a no_pic.jpg, uploaded it to my images/misc folder, did the template edits, but all I get is this...

http://www.bassnutz.com/member.php?u=7

This is what I made for my board. Does it need to be a certain size in order for it to work? And will it work with Opera browser?
https://vborg.vbsupport.ru/external/2006/01/6.jpg

Sorry, I'm confused. :confused:

Thanks,

Joe

Lpspider 01-15-2006 07:40 PM

anyone have any free, generic profile picture I could use?

quanvo81 01-18-2006 04:44 AM

Quote:

Originally Posted by Lpspider
anyone have any free, generic profile picture I could use?

just make one, it's simple...

ChuckH 02-05-2006 02:03 PM

if you have a custom profile field for Gender, how do you make it pick a different picture for male and female?

quanvo81 02-10-2006 01:28 AM

Quote:

Originally Posted by ChuckH
if you have a custom profile field for Gender, how do you make it pick a different picture for male and female?

<if condition> is always the best way to do it, I will look into that and reply to you. But I think you have to have the Gender Hack first.

bada_bing 03-21-2006 02:29 AM

installed

user02934123123 04-12-2006 12:31 PM

Worked like a charm, and easy to customise. Many thanks.

Kihon Kata 10-26-2008 03:06 PM

Can someone update this for 3.7.3?

Kihon Kata 12-13-2008 12:49 PM

Bump

Kihon Kata 01-30-2009 11:54 AM

No replies...uninstalls

Infopro 01-30-2009 12:29 PM

Not sure if this is the best way to do it, but try this. Worked for me.

Find in MEMBERINFO:

Code:

<td id="profilepic_cell" class="tborder alt2">$blocks[profile_picture]</td>
Replace with:

Code:

                                        <td id="profilepic_cell" class="tborder alt2">$blocks[profile_picture]</td>
<else />
                    <td id="profilepic_cell" class="tborder alt2"><img src="$stylevar[imgdir_misc]/unknown.gif">
</td>

Rename the part in red to an image in your misc dir if you have one already.

Not thoughly tested in a public forum, but on my test forum my profile has a picture and it shows. Checking a users that does not, my unknown.gif shows fine.

Infopro 01-30-2009 12:58 PM

Edited the copy/pasted code I used from above to make it valid.

Infopro 01-30-2009 01:07 PM

Or even this might work.

Code:

                    <td id="profilepic_cell" class="tborder alt2">$blocks[profile_picture]</td>
<else />
                    <td id="profilepic_cell" class="tborder alt2"><img src="$stylevar[imgdir_misc]/unknown.gif"  $prepared[profilepicsize] alt="<phrase 1="$prepared[username]">  $vbphrase[xs_picture] has not been added yet</phrase>" />
</td>

:)

Infopro 01-30-2009 01:14 PM

And if you really wanted to get carried away and add an avatar in the mini block memberinfo_block_ministats:

Find:

Code:

                <if condition="$prepared['avatarurl']">
                <td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
                </if>

Replace with:

Code:

                <if condition="$prepared['avatarurl']">
                <td><img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
<else />
                <td><img src="$stylevar[imgdir_misc]/unknown.gif" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar] has not been added yet</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
                </if>



All times are GMT. The time now is 09:29 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.01091 seconds
  • Memory Usage 1,769KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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