Golden Falcon
Active Member
[TUT] Switch Photos to Avatars (IPB 3.x)
Description: This will make it so all global photo variables show as avatar pictures instead. Meaning, all your members will have only one picture choice for their profiles.
Results
1. http://i49.tinypic.com/4pvwp5.png
2. http://i49.tinypic.com/14jukg8.png
3. http://i45.tinypic.com/15z2lp3.png
Edit Time: ~ 5 Minutes
Step 0: Please make sure you backup your files.
Step 1: Open admin/sources/base/core.php
Step 2: Find (Line 7071):
Step 3: Replace with:
Step 4: Find (Line 7093 - 7102):
Step 5: Add after:
Step 6: Save, Upload & Replace
Extras: If you want a default avatar to show for every user, just follow In Flame's instructions.
Description: This will make it so all global photo variables show as avatar pictures instead. Meaning, all your members will have only one picture choice for their profiles.
Results
1. http://i49.tinypic.com/4pvwp5.png
2. http://i49.tinypic.com/14jukg8.png
3. http://i45.tinypic.com/15z2lp3.png
Edit Time: ~ 5 Minutes
Step 0: Please make sure you backup your files.
Step 1: Open admin/sources/base/core.php
Step 2: Find (Line 7071):
Code:
$member['pp_thumb_photo'] = ipsRegistry::$settings['upload_url'] . '/' . $member['pp_thumb_photo'];
Step 3: Replace with:
Code:
$member['pp_thumb_photo'] = $member['avatar_location']; // all popup javascript arrows will show avatar pictures
Step 4: Find (Line 7093 - 7102):
Code:
//-----------------------------------------
// Mini
//-----------------------------------------
$_data = IPSLib::scaleImage( array( 'max_height' => 25, 'max_width' => 25, 'cur_width' => $member['pp_thumb_width'], 'cur_height' => $member['pp_thumb_height'] ) );
$member['pp_mini_photo'] = $member['pp_thumb_photo'];
$member['pp_mini_width'] = $_data['img_width'];
$member['pp_mini_height'] = $_data['img_height'];
}
Step 5: Add after:
Code:
//Force ALL photos to be avatars.
if(!empty($member['avatar_location']) && basename($member['pp_main_photo']) === 'default_large.png'){
$member['pp_main_photo'] = $member['avatar_location'];
$member['pp_thumb_photo'] = $member['avatar_location'];
$member['pp_mini_photo'] = $member['avatar_location'];
$member['fb_photo'] = $member['avatar_location'];
$member['fb_photo_thumb'] = $member['avatar_location'];
}
Step 6: Save, Upload & Replace
Extras: If you want a default avatar to show for every user, just follow In Flame's instructions.
try this:
1. Go to your FTP server: /public/style_avatars
2. Delete: blank_avatar.gif
3. Upload your default avatar to: /public/style_avatars
4. Rename it to: blank_avatar.gif
5. Go to your Admin CP: Look & Feel -> IP.Board (or your skin set) -> Templates -> Global Templates -> userInfoPane
6. Find:
Code:<else /> <li class='avatar'>{$author['avatar']}</li> </if>
7. Replace with:
Code:<else /> <li class='avatar'><a href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}"><img src="{$this->settings['public_dir']}/style_avatars/blank_avatar.gif" alt=""></a></li> </if>