![]() |
Block animated avatars
On my forums we try to enhance the reading experience, and do not allow our members to use animated avatars. One of my members have written the following hack for my forums, and I got his permission to post it here on vbulletin.org.
What this hack does is to prevent your users from uploading an animated image. It does this by checking if the image contains more than one frame. It is not retroactive, and your current avatars will remain as is. Hope you will enjoy this. Changes: 1 New Phrase 1 File to edit (profile.php) Installtime: 45 sec In profile.php, find: Code:
// ####################### SET PHP ENVIRONMENT ########################### Code:
// Block Animated Avatars Hack - by Scha at freakforum.nu In profile.php, find: Code:
if ($avatarid == 0) Code:
// Block Animated Avatars Hack - by Scha at freakforum.nu Add phrase 'avataranimated' under the category 'Front-End Error Messages' with the following content Code:
We do not allow the usage of animated avatars on our forums. Please consider uploading a static image instead. Done. Please leave a comment if there is something you are wondering about, or if you encounter a bug. |
very cool!
|
what is wrong with animated avatars??? :(
Well thanks for sharing anyways nso ;) |
Polo: On my forums we value the information it contains above the package it is delivered in. Animated avatars steales focus from the content, and it is more intensive on 64K'ers since it in essense contains several images in one.
|
Screenshot please ?
|
Quote:
|
Nice.. but needs a usergroup conditional so certain usergroups can have animated avatars.
|
Quote:
priority 2, WAI checkpoint 7.3 - "Do not create a blinking effect with animated gif images." Some people with cognitive or visual disabilities are unable to read moving text quickly enough or at all. Movement can also cause such a distraction that the rest of the page becomes unreadable for people with cognitive disabilities. Screen readers are unable to read moving text. People with physical disabilities might not be able to move quickly or accurately enough to interact with moving objects. |
Quote:
|
Is there a way to make this so Admins can have animated avatars but not anyone else? Might be a nice way to add a perk for certain membergorups on a site. ;)
|
Quote:
|
FYI a 10k jpg takes up the same amount of space as a 10k animate gif.
|
Sure, but a lot of forums allow crazyass filesize - mostly because the admins are too dumb to use the admcp :)
However the bandwidth has nothing to do with my descition to block animated avatars. It is in my opinion, as earlier stated, screenspam which steales focus much more than a static 64x64 IMG (unless you do a goatse or something). My users love this rule, and there is never any complaints. |
yeah... forums have different needs... every single forum is unique..
|
Updated the second profile.php edit and I suggest that anyone using this script update their profile.php with the changes. Just delete the old code and add the new.
|
Thank you VERY MUCH for this mod!!
|
Note: having to uninstall this, as all avatar uploads stopped working. May have to do with the Geek Articles System 3.51 hack I installed afterwards? I will try installing it again and see what happens, but wanted to note this potential conflict.
|
Please describe the actuall errors and/or errormessages you recieved and I might answer that for you.
Cheers. |
there is not a single link between the Geek articles system and this hack... btw, if your php server is older than 4.3, you may encounter the problem related to detecting image size and content...
|
No errors, or at least no error messages at all ... the avatars appeared to save normally (regular files, not animated ones) but were not displayed/changed.
One user did report receiving the no animated images error message when trying to upload a static gif, but I couldn't reproduce that error myself. Sorry I can't be of more help. *My php version is 4.3.10* I'm sure it's probably just a conflict with another hack ... |
Ah yes. That one.
The hack works by detecting a certain pattern in the file PHP Code:
Suggestion on this part would be highly appreciated. I know that you also could do a check for the string "NETSCAPE" in the header of the gif, but that won't suffice. Does anyone know how an image processing application like, for example, Adobes Imagemagic (isn't that the right one?) seperate the frames? |
Back to click install again ... the Geek helped me sort out whatever was causing the conflict, and this is working again for me. Guess I could have waited for my earlier feedback, but when I put things off, they never get done, so ...
Thanks again for this hack! |
Seems like a nice hack. I prefer to just allow users the option to freeze them, however.
|
All times are GMT. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|