News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

.gif avatars

Started by Belford, February 05, 2012, 07:54:50 AM

Previous topic - Next topic

Belford

Hello!

Is there any way to disable animated avatars?

kat

Sorry, Belford.

I don't believe there is. :(

I believe it'd be quite difficult for the software to differentiate between animated and static files, really. (I could be wrong).

There could be a mod, to do this. But, I somehow doubt it. I'll go and have a search. ;)

In the meantime, let me welcome to the ol' forum!

kat

Did a search and there doesn't seem to be anything, I'm afraid.

You could always make it a forum rule not to use them and remove any that breaks the rule, of course.

NanoSector

Lemmesee, there must be a way.. I'll make you something in a moment.

* Yoshi2889 gets his tools ready for some screwing work
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat


Illori

if the image is larger then the alloted size, it will automatically be resized and that will break the animation, so if you set the size somewhat smaller then normal that could help.

NanoSector

On line 2591 of Profile-Modify.php in your Sources directory, find this:

if ($value == 'none')


add before:

        // Some checking work. We don't like GIFs!
        if ($value != 'none' && $value != 'server_stored')
        {
            // Two different modes for two different methods!
            if ($value == 'external')
            {
                // If (extension == gif) then ERROR :D
                if (end(explode('.', $_POST['userpicpersonal'])) == 'gif')
                    fatal_lang_error('no_gif_allowed');
            }
            elseif ($value == 'upload')
            {
                if (end(explode('.', $_FILES['attachment']['name'])) == 'gif')
                    fatal_lang_error('no_gif_allowed');
            }
        }


Then, in your "Themes/default/languages" folder, find "modifications.english.php" or any other language you have installed, and add this:
$txt['no_gif_allowed'] = 'Animated avatars are not allowed in this forum.';

This is probably not the most reliable way to do it, but it gets the job done I guess.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Illori

but that would stop the use of gifs in general as well right?

NanoSector

Quote from: Illori on February 05, 2012, 09:40:12 AM
but that would stop the use of gifs in general as well right?
Yeah. But it's easier then to check if the image has multiple frames.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

JimM

You can disable them in your browser if you are using Firefox, Opera, or IE.  :P
Jim "JimM" Moore
Former Support Specialist

Advertisement: