Avatar in welcomepanel
#5
Posted 05 April 2006 - 03:13 PM
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
#7
Posted 06 April 2006 - 02:50 AM
Hambil, on Apr 5 2006, 04:13 PM, said:
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!!
#8
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&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>
#9
Posted 14 April 2006 - 08:37 AM
Fatal@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&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>
Man, That is great it looks alot better than before! Great job!
#10
Posted 14 April 2006 - 08:50 AM
<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&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>
#13
Posted 22 June 2006 - 05:58 PM
and about the no avatar
This works
I didn't write it but I'm passing it on
Quote
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
Posted 23 July 2006 - 11:00 AM
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&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:
#17
Posted 23 July 2006 - 12:37 PM
{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.
#18
Posted 23 July 2006 - 01:01 PM
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&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
Posted 23 July 2006 - 03:54 PM
RisingPhoenix, on Jul 23 2006, 08:37 PM, said:
{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
Posted 01 September 2006 - 04:28 PM
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












