General ⇒ DVCS Info (Mercurial/CVS) :: Archives ⇒ New function and remote avatar filesize :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDVCS Info (Mercurial/CVS)

Archived ⇒ New function and remote avatar filesize


lol. Laughing

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


PerM wrote
A side note: The whole idea of mixing types like you can do in php freaks me out. Maybe I'm just old fashioned Smile


I still get hung up on this...but I'm too old to change my ways now. Rolling Eyes

J.
j e r u v y a t y a h o o d o t c o m

Need help? Look here: www.dragonflycms.org/W...d=112.html
Need to chat? Look for me on irc.freenode.net

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu7.10/Debian3.1 - 2.2.3/1.3.37 - 5.0.38/4.0.27 - 5.2.1/4.4.7 - CVS/9.1.2}


Jeruvy wrote
PerM wrote
A side note: The whole idea of mixing types like you can do in php freaks me out. Maybe I'm just old fashioned Smile


I still get hung up on this...but I'm too old to change my ways now. Rolling Eyes


It's good to know I'm not alone Smile

So, will this modification make it into v9? Big grin

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


DJMaze wrote
any update ?


***making DJMaze aware of the answers incase he missed***

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


PerM wrote
So, will this modification make it into v9? Big grin


I for one hope it will.

NEMINI.org, NEMINI.us, NEMINI.info, NYMINI.org

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
1.3.34 (Unix)/4.1.18-standard/4.4.2 /9.1.0.8 CVS


PerM strstr() doesn't work on the binary data.
Did you check it out ?

I did preg_match() and preg_split() and then it worked.

linking.php line 164

I've used preg_split() to count the ammount of frames.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


DJMaze wrote
PerM strstr() doesn't work on the binary data.
Did you check it out ?

I did preg_match() and preg_split() and then it worked.

linking.php line 164

I've used preg_split() to count the ammount of frames.


Yes, I did check it out and it works. Look at this page

I've modified part of get_fileinfo() in linking.php to look like this:

if ($detectAnim && ereg('image/', $file['type'])) { $file['animation'] = ( strstr( $data, 'NETSCAPE2.0' ) ? true : false ); //$data = preg_split('/\x00\x2C/', $data); // split GIF frames //$file['animation'] = (count($data) > 2); // 1 = header, 2 = first/main frame }

Your version says that the file www.google.se/images/logo_sm.gif is animated. As far as I know a gif can only be animated when it contains the extention header that has the string "NETSCAPE2.0" in it. I might be wrong, but it seems that counting the frame delimiters are not 100%

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


not every animation has the NETSCAPE2.0 header so that's an problem.

however i did find in the binary code the frame split is a bit longer.

00 xx 00 2c

but the xx is variable

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


hmm this seems to work.

if ($detectAnim && ereg('image/', $file['type'])) { $data = preg_split('/\x00[\x00-\xFF]\x00\x2C/', $data); // split GIF frames $file['animation'] = (count($data) > 2); // 1 = header, 2 = first/main frame }

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Animations without the NETSCAPE2.0 header? As I've understood it that's one of the criterias for an animated gif. Where did you find that info?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
<site currently offline>


Is there anyway to put that code into version 8.2b?

www.spinstrument.com

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
8.2b


What code would I have to edit to get it to check the remote avatar size?

www.spinstrument.com

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
8.2b


has the avatars upload feature been fixed for 8.2b?

and on that note, why don't i post a new post? : )

[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1


masterbeta wrote
has the avatars upload feature been fixed for 8.2b?

and on that note, why don't i post a new post? : )


no ,masterbeta. it fixed in 9.0 Big grin

Firefox is my Favorite Browser

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Apache/1.3.34 (Unix)/4.0.25-standard/4.4.1/CVS


PerM wrote
Animations without the NETSCAPE2.0 header? As I've understood it that's one of the criterias for an animated gif. Where did you find that info?


I have an special animation editor which stores an different header without "NETSCAPE2.0" and that's how i figured out that it doesn't work Wink

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

All times are UTC