MyBB Community Forums

Full Version: Default avatar on registration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well, you need to have template conditionals installed, but it works like this:

 <if $post['avatar'] then>
		{$post['useravatar']}
                <else>                       
                <img src="{$mybb->settings['bburl']}/images/avatars/xxxx.jpg" alt="avatar" height="70px" width="70px" />                    
                </if>

and you put that where you want an avatar in postbit and xxxx.jpg is the link to the default avatar image
Snip, didn't notice the next page.
What exactly are template conditionals and how would I go about installing them?
This is not really php. This is using a plugin called template conditionals where you can make if else statements in templates.

It is a VERY handy plugin indeed (for me, this is the one plugin I would always have). If I could have only one plugin it would be this (or a very similar one).

http://mybbhacks.zingaburga.com/showthread.php?tid=464

Forum discussing how to use this plugin:

http://mybbhacks.zingaburga.com/forumdisplay.php?fid=38
(2012-10-13, 04:04 PM)Bumbanut Wrote: [ -> ]Snip, didn't notice the next page.
What exactly are template conditionals and how would I go about installing them?

* Leefish waggles eyebrow
If you really need a plugin i can upload the one i use currently. Its custom code that is only supporting Mysql databases and nothing else..

I use things like:

$db->query
For updates changes etc.

And yes i know thats a lazy way! :/
In fear of breaking something I can't fix with the plugin Leefish suggested to me, I solved the issue another way - I used Default Profile to set every new members' avatar and set every current members' avatars manually. Realizing that the user could still remove their current avatar, I decided to remove that option as well. Now every user has a default icon and they are unable to remove it, only change it.

Thanks a ton for the help though.
I'm no expert but couldn't you just replace the default avatar imagine with a different one?

admin/styles/default/images/default_avatar.gif - this one...

Or would that not work?
Pages: 1 2