Jump to content


Avatar in welcomepanel


  • You cannot reply to this topic
36 replies to this topic

#1 filipv

    Newbie

  • Members
  • Pip
  • 2 posts
  • Location:Belgium
  • Interests:Computers, Disney

Posted 12 January 2006 - 06:37 AM

How can I display the users avatar in the welcome panel ?

#2 birramartin

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 14 January 2006 - 03:44 PM

good questions!!
i need this too!

#3 filipv

    Newbie

  • Members
  • Pip
  • 2 posts
  • Location:Belgium
  • Interests:Computers, Disney

Posted 30 January 2006 - 11:49 AM

Any solution for this please ?

#4 Widescreen

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:Leicester, England.

Posted 04 February 2006 - 10:28 AM

yes please ...

#5 Hambil

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 05 April 2006 - 03:13 PM

Okay, if posting this isn't cool, or approved, then yank it.

Here is a fix for the avatar in the welcome panel.

Warning! Backup everything first.

This works on my board and I am happy to share - but I cannot be responsible for changes you make if you don't know what you are doing.

In ./sources/action_public/uportal.php
Find:
				$data['avatar'] = $this->ipsclass->get_avatar( $member['avatar'], 1, 
				$member['avatar_size'] );

Replace with:
				//**** Start Avatar Fix ****//
				$avatar_query = $this->ipsclass->DB->query("SELECT * FROM ibf_member_extra WHERE id = " . $this->ipsclass->member['id']);
				$avatar = $this->ipsclass->DB->fetch_row($avatar_query);
				$data['avatar'] = $this->ipsclass->get_avatar( $avatar['avatar_location'], 1, $avatar['avatar_size'], $avatar['avatar_type']);
				//**** End Avatar Fix ****//

In admin/Look & Feel/Skin Manager/ select your skin and choose skin_uportal and then Replace the contents of WelcomePanel with:
<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="1" cellpadding="4">
		<tr> 
<td rowspan="2" class="row1" width="33%">
{$data['avatar']}</td>
<td class="row2" width="66%">
{ipb.lang['it_is_now']} {$data['time']}.<br/>
{ipb.lang['last_visited']} {$data['lastv']}.<br/>
{ipb.lang['there_has_been']} {$data['posts_since']} {ipb.lang['posts_in']} {$data['topics_since']}<br/>
{ipb.lang['topics_since_last_visit']}<br/>
<a href="{ipb.script_url}act=Search&CODE=getnew">{ipb.lang['view_newposts']}</a></td>
</tr>
<tr>
<td class="row2" width="66%"><hr/>{ipb.lang['forum_stats']}<br/>
{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{ipb.lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}, {ipb.lang['total_posts']} {$data['stats']['TOTAL_POSTS']}<br/>
{ipb.lang['newest_member']} <a href="{ipb.script_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})<br/></td>
		</tr>
	  </table>
					 </td>
			   </tr>


- Hambil

#6 Widescreen

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:Leicester, England.

Posted 05 April 2006 - 03:36 PM

wahayyy thanks Hambil :D

#7 mflintjer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 06 April 2006 - 02:50 AM

View PostHambil, on Apr 5 2006, 04:13 PM, said:

Okay, if posting this isn't cool, or approved, then yank it.

Here is a fix for the avatar in the welcome panel.

Warning! Backup everything first.

This works on my board and I am happy to share - but I cannot be responsible for changes you make if you don't know what you are doing.

In ./sources/action_public/uportal.php
Find:
				$data['avatar'] = $this->ipsclass->get_avatar( $member['avatar'], 1, 
				$member['avatar_size'] );

Replace with:
				//**** Start Avatar Fix ****//
				$avatar_query = $this->ipsclass->DB->query("SELECT * FROM ibf_member_extra WHERE id = " . $this->ipsclass->member['id']);
				$avatar = $this->ipsclass->DB->fetch_row($avatar_query);
				$data['avatar'] = $this->ipsclass->get_avatar( $avatar['avatar_location'], 1, $avatar['avatar_size'], $avatar['avatar_type']);
				//**** End Avatar Fix ****//

In admin/Look & Feel/Skin Manager/ select your skin and choose skin_uportal and then Replace the contents of WelcomePanel with:
<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="1" cellpadding="4">
		<tr> 
<td rowspan="2" class="row1" width="33%">
{$data['avatar']}</td>
<td class="row2" width="66%">
{ipb.lang['it_is_now']} {$data['time']}.<br/>
{ipb.lang['last_visited']} {$data['lastv']}.<br/>
{ipb.lang['there_has_been']} {$data['posts_since']} {ipb.lang['posts_in']} {$data['topics_since']}<br/>
{ipb.lang['topics_since_last_visit']}<br/>
<a href="{ipb.script_url}act=Search&CODE=getnew">{ipb.lang['view_newposts']}</a></td>
</tr>
<tr>
<td class="row2" width="66%"><hr/>{ipb.lang['forum_stats']}<br/>
{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{ipb.lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}, {ipb.lang['total_posts']} {$data['stats']['TOTAL_POSTS']}<br/>
{ipb.lang['newest_member']} <a href="{ipb.script_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})<br/></td>
		</tr>
	  </table>
					 </td>
			   </tr>


- Hambil


@Hambil -- you're the BOMB!! :P :D B)

#8 Fatal@Error

    Member

  • Members
  • PipPip
  • 10 posts

Posted 12 April 2006 - 10:40 PM

<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 
<td class="row1" width="42%">{$this->ipsclass->lang['it_is_now']} {$data['time']}.<br/>
{$this->ipsclass->lang['last_visited']} {$data['lastv']}.<br/>
{$this->ipsclass->lang['there_has_been']} {$data['posts_since']} {$this->ipsclass->lang['posts_in']} {$data['topics_since']}<br/>
<a href="{$this->ipsclass->base_url}act=Search&amp;CODE=getnew">{$this->ipsclass->lang['view_newposts']}</a></td>
<td rowspan="2" class="row1" width="16%"><center>{$data['avatar']}</center></td>
<td class="row1" width="42%">
{$this->ipsclass->lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{$this->ipsclass->lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}<br/>
{$this->ipsclass->lang['newest_member']} <a href="{$this->ipsclass->base_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a>
<br/>
</tr>
</table>
</td>
</tr>


Posted Image ;)

#9 Dog

    Member

  • Members
  • PipPip
  • 20 posts

Posted 14 April 2006 - 08:37 AM

View PostFatal@Error, on Apr 13 2006, 12:40 AM, said:

<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 
<td class="row1" width="42%">{$this->ipsclass->lang['it_is_now']} {$data['time']}.<br/>
{$this->ipsclass->lang['last_visited']} {$data['lastv']}.<br/>
{$this->ipsclass->lang['there_has_been']} {$data['posts_since']} {$this->ipsclass->lang['posts_in']} {$data['topics_since']}<br/>
<a href="{$this->ipsclass->base_url}act=Search&amp;CODE=getnew">{$this->ipsclass->lang['view_newposts']}</a></td>
<td rowspan="2" class="row1" width="16%"><center>{$data['avatar']}</center></td>
<td class="row1" width="42%">
{$this->ipsclass->lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{$this->ipsclass->lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}<br/>
{$this->ipsclass->lang['newest_member']} <a href="{$this->ipsclass->base_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a>
<br/>
</tr>
</table>
</td>
</tr>


Posted Image ;)

Man, That is great it looks alot better than before! Great job! ;)

#10 Widescreen

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:Leicester, England.

Posted 14 April 2006 - 08:50 AM

try this...
<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 
<td align="center" valign="middle" class="row1">{$data['avatar']} </td>
<td rowspan="2" class="row1">{$this->ipsclass->lang['it_is_now']} {$data['time']}.<br/>
{$this->ipsclass->lang['last_visited']} {$data['lastv']}.<br/>
{$this->ipsclass->lang['there_has_been']} {$data['posts_since']} {$this->ipsclass->lang['posts_in']} {$data['topics_since']}<br/>
<a href="{$this->ipsclass->base_url}act=Search&amp;CODE=getnew">{$this->ipsclass->lang['view_newposts']}</a></td>
<td class="row1">
{$this->ipsclass->lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{$this->ipsclass->lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}<br/>
{$this->ipsclass->lang['newest_member']} <a href="{$this->ipsclass->base_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})</tr>
</table>
</td>
</tr>


Posted Image

#11 Master Sulu

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 18 April 2006 - 01:58 PM

What if I wanna show a default avatar for those that don't have one???

#12 Hobbes

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 16 June 2006 - 08:05 PM

View PostMaster Sulu, on Apr 18 2006, 02:58 PM, said:

What if I wanna show a default avatar for those that don't have one???


+1 :) ( otherwise, thxs for this great change ! )

#13 orion000

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 22 June 2006 - 05:58 PM

That's great Hambil

and about the no avatar

This works

;)


I didn't write it but I'm passing it on

Quote

Default avatar
This will allow you to define a default avatar image that will be used for members that have not selected an avatar.

This is a conversion by shyonne2004 from striders 2.0 mod http://forums.invisionize.com/index.php?sh...&hl=default#pen

Tired of just seeing no image everywhere you look when members do not have an avatar. This will take care of it.

1 file to edit sources/ipsclass.php
Ifile to upload noavatar.gif to styles_avatars

sources/ipsclass.php

Find:



if ( ! $member_avatar or $member_view_avatars == 0 or ! $this->vars['avatars_on'] or preg_match ( "/^noavatar/", $member_avatar ) )
{
return "";
}

if ( (preg_match ( "/\.swf/", $member_avatar)) and ($this->vars['allow_flash'] != 1) )
{
return "";
}



Change To:

if ( ! $member_avatar or $member_view_avatars == 0 or ! $this->vars['avatars_on'] or preg_match ( "/^noavatar/", $member_avatar ) )
{
return "<img src='{$this->vars['board_url']}/style_avatars/noavatar.gif'>";
}

if ( (preg_match ( "/\.swf/", $member_avatar)) and ($this->vars['allow_flash'] != 1) )
{
return "<img src='{$this->vars['board_url']}/style_avatars/noavatar.gif'>";
}

Save and upload.

Upload the image of your choice into your forum's style_avatars directory and if it is a different name than noavatar.gif then you will need to change the name in the edit


#14 Azrael

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 23 July 2006 - 11:00 AM

Thanks Widescreen, your's is the best.

I made some changes to make the stats and what not all look like they used too. Most notably, with your default code it says "There has been x posts in x" instead of adding "topics since your last visit" on the end and some stats were missing/formatted wrong. Only minor changes.

Here is the edited code:

<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 
<td align="center" valign="middle" class="row1">{$data['avatar']} </td>
<td rowspan="2" class="row1">{$this->ipsclass->lang['it_is_now']} {$data['time']}.<br/>
{$this->ipsclass->lang['last_visited']} {$data['lastv']}.<br/>
{$this->ipsclass->lang['there_has_been']} {$data['posts_since']} {$this->ipsclass->lang['posts_in']} {$data['topics_since']}<br/>{ipb.lang['topics_since_last_visit']}<br />
<a href="{$this->ipsclass->base_url}act=Search&amp;CODE=getnew">{$this->ipsclass->lang['view_newposts']}</a></td>
<td class="row1" width="50%">{ipb.lang['forum_stats']}<br/>
{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']}
{$this->ipsclass->lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{$this->ipsclass->lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}, {ipb.lang['total_posts']} {$data['stats']['TOTAL_POSTS']}<br/>
{$this->ipsclass->lang['newest_member']} <a href="{$this->ipsclass->base_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})</tr>
</table>
</td>
</tr>
			   </tr>


Which will give you this:

Posted Image

#15 Widescreen

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:Leicester, England.

Posted 23 July 2006 - 11:15 AM

View PostAzrael, on Jul 23 2006, 07:00 PM, said:

Thanks Widescreen, your's is the best.



correction! .. yours is the best hehe thank you for that :D

#16 Azrael

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 23 July 2006 - 12:12 PM

Awww, shucks. Thanks.

And No problemo.

#17 RisingPhoenix

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 249 posts
  • Gender:Male
  • Location:Fort Benning, GA
  • Interests:I am currently in the US Army. I am not a coder. I am really familiar with Unreal Portal and IPB. So if it isn't in reference to something I have on my site ba4life.com then there isn't much I can do to help you.<br /><br />I am a normal user like most of you. Please don't invade my personal life by asking me questions that can already be found on this website.

Posted 23 July 2006 - 12:37 PM

This one looks great I noticed one thing Topics: Is on the welcome panel twice I wasn't sure how to remove it but I did some playing around

{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']}



I removed

{ipb.lang['total_topics']}
and I don't see it anymore.
Posted Image
MultiGaming Clan Playing Games since 1997

#18 Widescreen

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:Leicester, England.

Posted 23 July 2006 - 01:01 PM

well spotted sir :D
that kind of thing happens to us all doh!
you also gave me the nudge to tidy it up a little bit more ;)

<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 
<td align="center" valign="middle" class="row1">{$data['avatar']} </td>
<td rowspan="2" class="row1">{$this->ipsclass->lang['it_is_now']} {$data['time']}.<br/>
{$this->ipsclass->lang['last_visited']}<br/>{$data['lastv']}.<br/>
{$this->ipsclass->lang['there_has_been']} {$data['posts_since']} {$this->ipsclass->lang['posts_in']} {$data['topics_since']} {ipb.lang['topics_since_last_visit']}<br />
<a href="{$this->ipsclass->base_url}act=Search&amp;CODE=getnew">{$this->ipsclass->lang['view_newposts']}</a></td>
<td class="row1" width="50%"><b>{ipb.lang['forum_stats']}</b><br/>
{ipb.lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}
{ipb.lang['total_replies']} {$data['stats']['TOTAL_REPLIES']},<br/> {ipb.lang['total_posts']} {$data['stats']['TOTAL_POSTS']}<br/>
{ipb.lang['newest_member']} <a href="{ipb.script_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})</tr>
</table>
</td>
</tr>
			   </tr>


#19 Azrael

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 23 July 2006 - 03:54 PM

View PostRisingPhoenix, on Jul 23 2006, 08:37 PM, said:

This one looks great I noticed one thing Topics: Is on the welcome panel twice I wasn't sure how to remove it but I did some playing around

{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']}

I removed

{ipb.lang['total_topics']}
and I don't see it anymore.

Good catch. I didn't notice that.

#20 ShootMePls

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 01 September 2006 - 04:28 PM

I'd like the avatar to appear as well, but there is so much responses and code Im confused where to edit and what code to actually use to show avatar in the welcome panel.

Could someone starta gain of what edits are required and where I need to do them so i can use this too pls ?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users