Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Help, one avatar for non-avatar users. like gravatar but without another server

battersbatters New
edited May 2011 in Vanilla 2.0 - 2.8
how to make all users without avatars preset one single avatar, and when the user is registered it is automatically assigned this avatar. I do not want to use gravatar, because avatars are very long to be loaded from another server, and rarely ever loaded.

I want one avatar, uploaded to my hosting service to assign to all users without avatars.
Help, how to do this
Tagged:

Comments

  • AoleeAolee ✭✭

    replace this line
    $User->Photo = $Protocol.'gravatar.com/avatar.php?' .'gravatar_id='.md5(strtolower($Object->$Email)) .'&default='.urlencode(Asset(Gdn::Config('Plugins.Gravatar.DefaultAvatar', 'plugins/Gravatar/default.gif'), TRUE)) .'&size='.Gdn::Config('Garden.Thumbnail.Width', 40);
    with
    $User->Photo = Gdn::Request()->Domain().Url('plugins/Gravatar/default.gif');

    in

    /plugins/Gravatar/default.php
  • thanks again Aolee, everything works perfect
  • RaizeRaize ✭✭
    There's also a plugin for this
Sign In or Register to comment.