Advertisement:

Navigation

SMF Mod Site

Mod Name:
Default Avatar
Created By:
Joker™
Type:
New Feature
First Created:
July 27, 2010, 03:09:03 PM
Last Modified:
July 28, 2013, 09:33:31 AM
Latest Version:
2.3
Compatible With:
1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.18, 2.0, 2.0.1, 2.0.4
Total Downloads:
13370

Download this mod

DefaultAvatarForSMF1x.zip (19kB) [357]
DefaultAvatarForSMF2x.zip (22kB) [4071]
Manual Install Instructions for SMF

Description:

Link to Mod


If a user's has not selected or uploaded any avatar, then this mod shows a standard avatar on post pages.


Which mod package to download?
People using SMF 1.x download package named - Default Avatar For SMF 1x.zip
People using SMF 2.x download package named - Default Avatar For SMF 2x.zip


Settings to enable and disable it can be found at

For smf 1.x
Features and Options » Layout and Options

For SMF 2.x
Modification Settings » Miscellaneous.


The default_avatar.png images is located in
Theme><YourTheme>/images/default_avatar.png

you can simply change it with the image you like to be as default avatar for your forum members.(Do remember to give that image file also same name "default_avatar.png"


Change Log

Version 2.3
- Extended support for other mods.
- Change in license
- Mod added on GitHub
- Big fixes


Version 2.2
- Removed the w3c validation error
- Add option to make avatars transparent after a user having default avatar logs out.
Credit for transparent avatars idea goes to Project Evolution


Version 2.1 (SMF 2.0) and Version 1.4 (SMF 1.1.14)
- Mod updated for SMF 2.0 final and SMF 1.1.14
- License added to the mod
- Added 2 more features in mod
- Admin can add separate Default avatar images for users based on there genders (available for SMF 2.0 version only)


Version 2.0 * (SMF 2 RC4)
- Mod edits only source files, hence mod is compatible to all themes
- Now with the new version you can simply change the image path through settings panel only. You just have to place the image url and click save, the url image will become default image automatically.


Version 1.3 * (SMF 1.1.12) and  Version 1.4 * (SMF 2 RC4)
- Mod updated for SMF 1.1.12 and SMF 2.0 RC4


Version 1.2 * (SMF 1.1.11) and  version 1.3 * (SMF 2 RC3)
After uninstalling the mod image was not removed from images directory. This issue has been resolved now. Anyone facing the issue, simply install this version and uninstall it. Image from you images directory will be removed.


Version 1.1 * (SMF 1.1.11)
Added default avatar in Profile Header, Personal Messages and Profile Summary . Options are provided to enable and disable them also.


Version 1.2 * (SMF 2.0 RC3)
Added default avatar in Profile Header, Personal Messages and Profile Summary . Options are provided to enable and disable them also.


Mod released for SMF 1.1.11 also ;)


Version 1.1x
Removed extra slash from image transfer directory.(wasn't a major effect on mod , but still work should be done properly ;) )



FAQ's

1. How can I use default avatar in my mod?

Well to do this, you just need to place this code in your mod

Code: [Select]
if(function_exists('checkDefaultAvatar')) {
$context['user']['id']['avatar']['image'] = checkDefaultAvatar($context['buddies'][$uid]);
}


2. After putting the code my avatar images are gone?
While calling the function the data should be appended to the parameter which is carrying the avatar image. For e.g,
a) If you are using avatar image on '$context['user']['id']['avatar']' then use the above code as follow

Code: [Select]
if(function_exists('checkDefaultAvatar')) {
$context['user']['id']['avatar'] = checkDefaultAvatar($context['buddies'][$uid]);
}

b) If you are using avatar image on '$context['my_user']['id']['avatar']['img']' then use the above code as follow
Code: [Select]
if(function_exists('checkDefaultAvatar')) {
$context['my_user']['id']['avatar']['img'] = checkDefaultAvatar($context['buddies'][$uid]);
}



GitHub Link

All images/css used in the mod falls under the license used below.

License
 * This SMF Modification is subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/