Not Solved Rotating Avatars Not Working
#1
Not Solved
I'm struggling to get Rotating Avatars (randimg.net, gravatar, etc.) to work on my board. I have used them on other mybb boards, so I know it's possible, but can not figure out why it is not working on my board.

When entering the link provided from the rotating avatar service I am given the error:

The URL you entered for your avatar does not appear to be valid. Please ensure you enter a valid URL.

It is formatted something like: http://pile.randimg.net/1/11/1111/myalbum.png and the size of the images are correct.

I am running mybb 1.8.5

Regular direct image links DO work, but only if they are the right size (even though resizing is specified in the board settings for profile options)

Any ideas how to fix this?
Reply
#2
Not Solved
Can I ask why you'd want this? Isn't the purpose of an avatar to give you an identity? Having tons sorta defeats the purpose IMO.
[Image: logo.png]
Reply
#3
Not Solved
You can have variety and still have an identity-- it's a feature that many members of this board want.
Reply
#4
Not Solved
Try to disable resizing. Also can you embed the images into posts correctly? If so then I suspect it's the resizing.
Reply
#5
Not Solved
If only it were that easy to fix! I tried what you suggested, but the same error appears. I am able to embed images into posts-- it's just the image rotation links on the avatar that won't go

I have a feeling it might be something in the admin/modules/user----> users.php code, somewhere around

// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)

not sure how to remedy it. The code in this area is as follows:

$file = fetch_remote_file($mybb->input['avatar_url']);
					if(!$file)
					{
						$avatar_error = $lang->error_invalidavatarurl;
					}
					else
					{
						$tmp_name = "../".$mybb->settings['avataruploadpath']."/remote_".md5(random_str());
						$fp = @fopen($tmp_name, "wb");
						if(!$fp)
						{
							$avatar_error = $lang->error_invalidavatarurl;
						}
						else
						{
							fwrite($fp, $file);
							fclose($fp);
							list($width, $height, $type) = @getimagesize($tmp_name);
							@unlink($tmp_name);
							echo $type;
							if(!$type)
							{
								$avatar_error = $lang->error_invalidavatarurl;
							}
						}
					}

					if(empty($avatar_error))
					{
						if($width && $height && $mybb->settings['maxavatardims'] != "")
						{
							list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
							if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
							{
								$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
								$avatar_error = $lang->error_avatartoobig;
							}
						}
					}

					if(empty($avatar_error))
					{
						if($width > 0 && $height > 0)
						{
							$avatar_dimensions = (int)$width."|".(int)$height;
						}
						$extra_user_updates = array(
							"avatar" => $db->escape_string($mybb->input['avatar_url'].'?dateline='.TIME_NOW),
							"avatardimensions" => $avatar_dimensions,
							"avatartype" => "remote"
						);
						remove_avatars($user['uid']);
					}
					else
					{
						$errors = array($avatar_error);
					}
				}
			}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)