HostVein
MyBB: Making Gravatar push over SSL - Printable Version

+- HostVein (https://www.hostvein.com)
+-- Forum: General (https://www.hostvein.com/forumdisplay.php?fid=1)
+--- Forum: Tutorials (https://www.hostvein.com/forumdisplay.php?fid=10)
+--- Thread: MyBB: Making Gravatar push over SSL (/showthread.php?tid=9)



MyBB: Making Gravatar push over SSL - HostVein-Admin - 02-21-2016

An annoying this about MyBB is that even though the site is setup to use HTTPS:// it chooses to still pull gravatar over a hard coded http:// call. This effectively makes all your HTTPS:// MyBB forums throw the lovely "unsecure content" flag and removes your nice green HTTPS:// label.....


Here is how to fix:

1. Login to your server wish ssh / winscp / ftp or what ever file manager you use.
2. Find the usercp.php file in the root of your forum directory.
3. Edit the file and search for grava ....
4. Find this specific section of code:
Code:
            $updated_avatar = array(
                "avatar" => "http://www.gravatar.com/avatar/{$email}{$s}.jpg",
                "avatardimensions" => "{$maxheight}|{$maxheight}",
                "avatartype" => "gravatar"
            );
5. Change this string
Code:
"avatar" => "http://www.gravatar.com/avatar/{$email}{$s}.jpg",
to:
Code:
"avatar" => "https://www.gravatar.com/avatar/{$email}{$s}.jpg",
6. Wait for your users to re-import their gravatar images, or make a news posts to ask them to redo them.


p.s. I didn't personally need to, but you should be able to query around mysql and force all http to https. As this is a new forum, I just did this in the begging before the user base was here.


RE: MyBB: Making Gravatar push over SSL - Daisy22 - 03-15-2017

Hey! its really great job and thank you for sharing with us,this awesome information Smile