News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Additional Info
Type
Package ID
sid2varun:default_avatar
First Created
July 27, 2010, 03:09:03 PM
Last Updated
February 01, 2021, 05:02:52 PM

Default Avatar v2.3

Default avatar for members using no avatars
Compatible With 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.18, 1.1.21, 2.0, 2.0.1, 2.0.4, 2.0.15, 2.0.17, 2.0.18
Latest version v2.3
Downloads 16,772
Reviews 0
Rating 0/5
Subscribers 63
License (View License)
Author(s)
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

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

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
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/
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: