I've recently wanted to do this too, I've hacked in a way to do it with the fairly old version of Gitorious I've inherited in this workplace.
My reasons were due to the default avatar (the silhouette of the guy, "default_face.gif") no longer appearing, but instead, a piece of text just saying "*avatar*" appeared in its place. I'm guessing the issue is related to the one reported here: https://issues.gitorious.org/issues/137 Due to some change in the gravatar site itself? After googling some more, I noticed there was a mention of newer versions of Gitorious offering a configuration option to disable gravatar. Sounds good, but I'm in no position to upgrade right now, so I'll settle for a hack. Here's what I did: - Edit this file on your server: "* /srv/www/gitorious/app/application_helper.rb*" - Change the "*gravatar_url_for*" function: *FROM*: def gravatar_url_for(email, options = {}) options.reverse_merge!(:default => "#{GitoriousConfig['gitorious_server_path']}/images/default_face.gif") port_string = [443, 80].include?(request.port) ? "" : ":#{request.port}" "http://www.gravatar.com/avatar.php?gravatar_id=" + (email.nil? ? "" : Digest::MD5.hexdigest(email)) + "&default=" + u("http://#{GitoriousConfig['gitorious_host']}#{port_string}" + "/#{options.delete(:default)}") + options.map { |k,v| "&#{k}=#{v}" }.join end *TO*: def gravatar_url_for(email, options = {}) GitoriousConfig['gitorious_server_path'] + "/images/default_face.gif" end - restart apache with "*sudo service apache2 restart*" - Re-load your gitorious page. And now, the default-avatar will get loaded from its local path, instead of trying to access the gravatar website. On Friday, 22 July 2011 23:26:51 UTC+10, dtolj wrote: > > How to disable Gravatar? -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
