Log in

View Full Version : Disable (animated) gifs as avatars?


dutchbb
04-07-2005, 09:56 PM
How can I prevent users from using (animated) gifs as avatar?

007
04-07-2005, 10:36 PM
This would be awesome... I hate animated gifs...

akanevsky
04-08-2005, 12:10 AM
Make a check for uploaded GIF's... However, there is a way around it - even if a gif file has no extension, server will still know that it is a GIF... So I don't really know.

007
04-08-2005, 12:22 AM
Just ban people with animated gif avatars LOL!

akanevsky
04-08-2005, 12:25 AM
Good idea. However, some good people like animated avatars...
Banning them in a such cases would be a loss to you, as the board administrator.

What I'd do is I'd only allow JPG and PNG files to be used as avatars... To do that, a preg_replace fix would be required.

Tekton
04-08-2005, 12:31 AM
gifs kinda suck anyways... why not go with the jpg/png only idea?

akanevsky
04-08-2005, 12:47 AM
Because I don't feel like looking it up in the code right now. If noone else posts it, I might do tomorrow...

dutchbb
04-08-2005, 09:56 AM
Because I don't feel like looking it up in the code right now. If noone else posts it, I might do tomorrow...
ok tnx

some anim. avatars aren't that bad, but others get really annoying :s
I think alot of people would be very happy with this little hack (should be in vb standard code anyway IMO)

akanevsky
04-08-2005, 08:03 PM
There you go:

[vBulletin Hack Thread #79630 (https://vborg.vbsupport.ru/showthread.php?t=79630)]

tehste
04-09-2005, 01:52 PM
There was a hack that prevents animated gifs.
I don't understand why you don't like them. They don't take extra space or bandwidth because you can set the limits in vb options so what is the problem, with them? Also by clicking the 'stop' button when a page is loaded animated gifs stop animating.

https://vborg.vbsupport.ru/showthread.php?t=76832&highlight=animated

NB: use the search :ermm:

akanevsky
04-09-2005, 01:55 PM
I, personally, have no problem with them.
But some people on my board complain that animated avatars and images in signature get on their nerves. So why not make it nicer for them?

Besides, my hack is muuuuuuuuuch smaller (only 6 lines of code, unlike the one you gave link to), which makes it quicker.

tehste
04-09-2005, 02:05 PM
To block animated gifs is a bit different than to block all gifs. Ok if you like we can discuss which file format has the best compression and is more suitable. The simple fact is gifs are everywhere so alot of users will have a gif they want to use. Your hack still has its uses and I'm not saying which is better or anything. However, if the thread makers had searched the forum maybe you wouldn't have spent the time making a png/jpg only avatar hack.

dutchbb
04-09-2005, 02:48 PM
There was a hack that prevents animated gifs.
I don't understand why you don't like them. They don't take extra space or bandwidth because you can set the limits in vb options so what is the problem, with them? Also by clicking the 'stop' button when a page is loaded animated gifs stop animating.

https://vborg.vbsupport.ru/showthread.php?t=76832&highlight=animated

NB: use the search :ermm:
Well, just because you like them doesn't mean everyone does.

they're very anoying, especially the flashing, fast moving ones.

ps: I always use the search, but this time search results didn't show that hack for me.

To block animated gifs is a bit different than to block all gifs. Ok if you like we can discuss which file format has the best compression and is more suitable. The simple fact is gifs are everywhere so alot of users will have a gif they want to use. Your hack still has its uses and I'm not saying which is better or anything. However, if the thread makers had searched the forum maybe you wouldn't have spent the time making a png/jpg only avatar hack.
JPG is better for pictures anyway

gif is more like for buttons, logos etc
And I have search the forum first, but didn't find the right hack, this ones serves me well.

I, personally, have no problem with them.
But some people on my board complain that animated avatars and images in signature get on their nerves. So why not make it nicer for them?

Besides, my hack is muuuuuuuuuch smaller (only 6 lines of code, unlike the one you gave link to), which makes it quicker.
yep your hack is just smaller and more usefull to me thanks again bro

akanevsky
04-10-2005, 12:02 AM
Triple_T
Yah :)

zsdave
I do not understand, how does THAT hack block only animated gifs... I see some xBLAHBLAH code, is that a frame break symbol or something? Besides, opening and reading a file will still be slower than just restricting the extension.

nso
04-10-2005, 09:59 PM
Dark Visor: I suggest you read the specifications of GIF89a, like the author of the hack in question has. It is however a correct observation that 0x2C is the image seperator byte in the GIF-stream.

That said. The hack is flawed because it checks the whole file, and not only the datablock that contains the raw imagedata. The image palette may also contain that byte in some cases, which creates a false positive.

However, a new hack which will be 100% foolproof is in the works.

I do NOT recommend that anyone installs a hack that completely block the GIF-format. The GIF-format deliveres the best compression for standard sized 64x64 avatars. JPEG usually needs more space to define the headers and palettes alone than a complete GIF file requires to deliver the whole image.

akanevsky
04-10-2005, 10:18 PM
nso, where can I read the specifications?

nso
04-10-2005, 11:46 PM
Specs: http://www.w3.org/Graphics/GIF/spec-gif89a.txt
Easy reading: http://members.aol.com/royalef/gifabout.htm

akanevsky
04-13-2005, 01:31 AM
Thanks dude. When you finish your hack, please PM me. Thanx.