Imgur Links only for avatar/sigs?
#1
Is there a plugin for this? If the link isn't an imgur link when changing your avatar, you will receive an error. Tried finding this in the extended page but can't find any plugin related to it
Reply
#2
Actually, it doesn't exist.

Stupid question, but why do you want to force imgur usage for avatars and signatures pictures ?
Do not ask me help through PM or Discord
Reply
#3
(2019-06-18, 10:13 AM)Crazycat Wrote: Actually, it doesn't exist.

Stupid question, but why do you want to force imgur usage for avatars and signatures pictures ?

Security reasons of course man
Reply
#4
You would need to hook into usercp.php and intercept the upload URL. Checking would be easy, then just make $avatar_error global and assign an error message to it, if it isn't from Imgur.
$plugins->add_hook("usercp_do_avatar_start", "my_function");

function my_function()
{
	global $avatar_error;

	if (strpos($mybb->input['avatarurl'], 'imgur.com') === false) {
		$avatar_error = 'Uploads must be from Imgur!';
	}
}


^ that is untested, I just typed it out in the textbox, but that's the basic idea.
[retired]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)