New Policy on animated avatars

#51
#51
In a moment of weakness last night, I gave into the rare occurrence of thought and came up with two supplemental additions, should animations be once again desired.

1. To keep bandwidth in check, you could create a CRON job to execute a shell/Perl script that would determine percentage of bandwidth used for the month. If the percentage hits a threshold, say 85%, make a call to the database to set "disable_ani" to 1, and within the code to display avi, check that value before executing. That way if bandwidth approaches max, all animations are cut off for all users. Running the CRON job 3 or 4 times a day will make sure that once the new month hits, and percentage drops to 0 (make sure you have numerator value + 1 to keep from having a non-real error), the disable will be reset. And, it would allow continuous monitoring of bandwidth relative to new animations.

2. If the idea of everyone having animations disabled could take away from the aesthetics of the board, once a user uploads an image, a snapshot of the first frame of the animation could also be stored as "avatarfilename_static.ext," and instead of simply disabling all avatars for non-users/those without animations checked, the call to display the avatar would instead display the static image.

Just little ideas to help you decide if you want to bring it back, or not.
 
#53
#53
Probably too late, but should go something like this:



Default for all users, and non-users would be "off," so, unless it was purposely turned on, the display avi call would not be executed for those individuals with gif of png avatars.

The SQL db call would have to reflect similar to signature call, except for new column in user database for "animations."

The code above would simply replace the standard call to display avatar when building the individual threads.

Edit: Obviously above is pseudo-code, as I haven't actually looked at Vbulletin code, ever. But, I could probably knock out an add-in over the weekend, if you wanted to bring it back. Your call. I plan on being here a while.

In a moment of weakness last night, I gave into the rare occurrence of thought and came up with two supplemental additions, should animations be once again desired.

1. To keep bandwidth in check, you could create a CRON job to execute a shell/Perl script that would determine percentage of bandwidth used for the month. If the percentage hits a threshold, say 85%, make a call to the database to set "disable_ani" to 1, and within the code to display avi, check that value before executing. That way if bandwidth approaches max, all animations are cut off for all users. Running the CRON job 3 or 4 times a day will make sure that once the new month hits, and percentage drops to 0 (make sure you have numerator value + 1 to keep from having a non-real error), the disable will be reset. And, it would allow continuous monitoring of bandwidth relative to new animations.

2. If the idea of everyone having animations disabled could take away from the aesthetics of the board, once a user uploads an image, a snapshot of the first frame of the animation could also be stored as "avatarfilename_static.ext," and instead of simply disabling all avatars for non-users/those without animations checked, the call to display the avatar would instead display the static image.

Just little ideas to help you decide if you want to bring it back, or not.

I love code-speak. :)

The problem I see is: you don't know whether an avatar is animated by its extension.
 
#54
#54
I love code-speak. :)

The problem I see is: you don't know whether an avatar is animated by its extension.

Take the assumption that all *.gif and *.png are animated, and treat them as such. To correct the assumption, apply the snapshot static process to cover the bases.

And, there might be a way to determine if an image has frames, and is thus animated.

I'd have to get back to you on, but I can do the leg work if you are considering it...
Posted via VolNation Mobile
 
#55
#55
#60
#60
I consider myself to be slightly intelligent, but I've just never understood crap like this. It doesn't click.

It would if you had a background in it, which is all it really requires. I'd bet good money that you could pick it up in almost no time. But, unless it's a hobby, job or passion, it is really a waste of time. Literally.

I like problem solving, and that is what coding is, at a fundamental level.
Posted via VolNation Mobile
 
#61
#61
It would if you had a background in it, which is all it really requires. I'd bet good money that you could pick it up in almost no time. But, unless it's a hobby, job or passion, it is really a waste of time. Literally.

I like problem solving, and that is what coding is, at a fundamental level.
Posted via VolNation Mobile

Eh, I'll stick to my crossword pizzles, thanks.
 

VN Store



Back
Top