I uploaded a animated gif, but he show only 1 image.
But an animated gif is a loop of frames.
only 1 frame is shownd.
I uploaded a animated gif, but he show only 1 image. only 1 frame is shownd. http://www.busimatch.club ( The most exclusive business club) |
There are a multitude of discussions on this. I am just so bogged down at work I am unable to fix it. I think I have narrowed the issue down to the following scripts. inc/images.inc.php At one point in playing with the code, I was able to upload a GIF, but was only able to get the actual image by clicking "view original". It's a $20.00 mod if someone would take some time to modify this. There are several people here willing to pay. http://www.mytikibar.com |
images for the "normal view" are converted to jpg. It would be nice if the image format was not converted to jpg. Animated gifs can still be used in some places if one uses the original image. Animated avatars are not supported directly either. Geeks, making the world a better place |
Well there isn't any good solution in GD that always works, you need to have ImageMagick. so much to do.... |
I know a site that has animated gifs done, and working perfect. I cannot disclose the site, but I will make a snippet of the site with them working. ManOfTeal.COM a Proud UNA site, six years running strong! |
Thanks Newton. I inspected and see they are using the trick I discovered in some way. Dolphin stores avatars as jpgs and expects to see .jpg in the file name. However, if you rename a gif image to a jpg image, such as animated.gif to animated.jpg, Dolphin will load that animated gif. Browsers do not use the extension of the file, they use the header info to determine the file type; or at least that is a guess as I have not verify this. I have manually created the two images, the 32X32 and 64X64 animated avatars, renamed to xxxx.jpg and then manually assigned them to an account. They work perfectly but that is a rather tedious way to do it. It would be nice if the site (which I won't mention either) could share the changes they made in the avatar module to allow one to upload an animated gif and have the avatar module store it. I just don't have the time to play with this myself to see if I can get something working. However, if that site did it, then it can be done and works with Dolphin. Geeks, making the world a better place |
thats pretty interesting to know about. Oh and i will try the rename thingy too. Thanks Newton. I inspected and see they are using the trick I discovered in some way. Dolphin stores avatars as jpgs and expects to see .jpg in the file name. However, if you rename a gif image to a jpg image, such as animated.gif to animated.jpg, Dolphin will load that animated gif. Browsers do not use the extension of the file, they use the header info to determine the file type; or at least that is a guess as I have not verify this. I have manually created the two images, the 32X32 and 64X64 animated avatars, renamed to xxxx.jpg and then manually assigned them to an account. They work perfectly but that is a rather tedious way to do it. It would be nice if the site (which I won't mention either) could share the changes they made in the avatar module to allow one to upload an animated gif and have the avatar module store it. I just don't have the time to play with this myself to see if I can get something working. However, if that site did it, then it can be done and works with Dolphin. EDIT: Nop doesn't work. so much to do.... |
i had this issue a year or so ago. I made members mail me gifs so that they could be "approved" first. Once approved, they would appear in the default avatar lists and all users would be able to use the avatars. At the time, I did not have an issue with this as I did not want a user uploading an explicit animated gif for their avatars. caredesign.net |
thats pretty interesting to know about. Oh and i will try the rename thingy too. Thanks Newton. I inspected and see they are using the trick I discovered in some way. Dolphin stores avatars as jpgs and expects to see .jpg in the file name. However, if you rename a gif image to a jpg image, such as animated.gif to animated.jpg, Dolphin will load that animated gif. Browsers do not use the extension of the file, they use the header info to determine the file type; or at least that is a guess as I have not verify this. I have manually created the two images, the 32X32 and 64X64 animated avatars, renamed to xxxx.jpg and then manually assigned them to an account. They work perfectly but that is a rather tedious way to do it. It would be nice if the site (which I won't mention either) could share the changes they made in the avatar module to allow one to upload an animated gif and have the avatar module store it. I just don't have the time to play with this myself to see if I can get something working. However, if that site did it, then it can be done and works with Dolphin. EDIT: Nop doesn't work. Yes, it does work but as I said, it is tedious. the small avatar and larger avatar have slightly different names. Here is what you can do. First find out what the avatar number is for your avatar. Then create an avatar in the two different sizes. I use a graphic programme that could resize animated gifs; creating the 64x64 one first, then resizing and saving as the 32x32. I then uploaded the gifs and renamed on the server. Of course you have to clear caches; including your browser, to see the change. In my case I looked to see what avatar number was free, created my avatars, uploaded them, then I went into the database and assigned the avatars to me. I have not done this on the current production server. If you really need to see that I am telling you the truth, I can PM you the address of the old 7.0.9 site that is getting ready to go bye-bye. Geeks, making the world a better place |
i had this issue a year or so ago. I made members mail me gifs so that they could be "approved" first. Once approved, they would appear in the default avatar lists and all users would be able to use the avatars. At the time, I did not have an issue with this as I did not want a user uploading an explicit animated gif for their avatars. I thought about this as a means to get a bit of revenue for the site. Anyone wanting an animated avatar could email me the one they wanted to use, I would create the two sizes, upload them to the site, and assign them to the user. All for a small fee. Geeks, making the world a better place |
Step by Step for people who want to try it http://modmycms.com/m/tutorials/view/Dolphin-Mod-Use-Animated-GIF-s http://ModMyCMS.com --> Dolphin Hacks &Mods |
LMAO! What a great example, made me almost choke! Great work, as usual!!!! "Like" from me ManOfTeal.COM a Proud UNA site, six years running strong! |
Yes, that is how it can be done. However, how can we rework the avatar module to do it? Here is a link to a method to resize animated gifs using php without needing ImageMagick. If this procedure could be incorporated into the avatar module, then someone could upload an animated gif, resize it to the two different sizes, save as x.jpg, and xi.jpg, and be good to go. http://lifetimedev.blogspot.com/2012/02/how-to-resize-animated-gif-without.html Geeks, making the world a better place |
My Imagemagik is on... but it'snot working...
I know a site that has animated gifs done, and working perfect. I cannot disclose the site, but I will make a snippet of the site with them working.
http://www.busimatch.club ( The most exclusive business club) |
Sorry All- I hadn't seen this post before today.... I'm a little familiar with the site in the video LMAO.... Just to make clear, GG is spot on- It was a pain in the ass and yes, using methods we had discussed throughout the forums here. Everything had to be done manually and not practical for any of us ***without a small fee*** X~) I do although hope a module is developed or avatar module reworked cuz it seems there is still some interest for it YES? I saw this- http://www.boonex.com/n/it-s-your-choice-your-mod-request-for-09-13 perhaps a show of support may push it forward? Again, my apologies, I would be happy to share anything I manage to get working on my site- You all have done so much for me :) |
I do although hope a module is developed or avatar module reworked cuz it seems there is still some interest for it YES?
I just don't see it happening with the current way the avatar photos are cropped then saved. This alone throws that out the window. ManOfTeal.COM a Proud UNA site, six years running strong! |
I do although hope a module is developed or avatar module reworked cuz it seems there is still some interest for it YES?
I just don't see it happening with the current way the avatar photos are cropped then saved. This alone throws that out the window. I suppose this is why some sites have you specifically add a 32x32 or 64x64 ect... Thumbnail image... And if I recall, There was not Crop process...seems those sites had animated image functionality. |
It seems that a POST-Avatar Crop mod would somehow be possible... Something that allowed members to "Swap" their current avatar with an animated one? If that makes sense. Because basically, that's what we're doing to get this to work- Swapping the after-destuction avatar with 32px and 64px animated ones. On my site, I replaced ALL the images with animated ones- Profile Pic, Wall Post, Avatar etc... But, I finally concluded I was just going overboard with the whole thing. Would still like to do it with avatars though. |
Well, playing around with the code I noticed boonex has a default extension of JPG. I was able to get it to NOT convert a GIF to a JPG but, boonex wants to default to displaying a JPG all the time. If I view original I can see the animation, otherwise, it's just a blank image in the thumbs and album covers. To make the avatars animated, someone is going to HAVE to work on the default photo module and allow it to display something other than JPG's by default. http://www.mytikibar.com |
Well, playing around with the code I noticed boonex has a default extension of JPG. I was able to get it to NOT convert a GIF to a JPG but, boonex wants to default to displaying a JPG all the time. If I view original I can see the animation, otherwise, it's just a blank image in the thumbs and album covers. To make the avatars animated, someone is going to HAVE to work on the default photo module and allow it to display something other than JPG's by default. Yes; however, what we have discovered is that browsers, or at least the ones I tested it on, do not look at the extension to determine the type of image, they look at the header of the file to know how to render the image. Therefore, animated gifs with a jpg extension are animated in the browser. We would need to test all major browsers to see it this holds for all. Geeks, making the world a better place |
I haven't thought this all the way through, but- What about a way to use an embedded image avatar? Like a gif in an iframe as an avatar or something? And also, somehow using css to re-size down a 64px image to 32px via- background-size: 100%; Just throwing some other things out there that might spark other ideas from people who know way more than me about this stuff. |
Well.... I have it working! I need to go over my notes, but I will post what it takes to get animated gifs into dolphin. It does require an external php class, but the instructions will show you how to do that. http://www.mytikibar.com |
I have it working!
Excellent! ManOfTeal.COM a Proud UNA site, six years running strong! |
How to make dolphin support animated gifs in photos and avatars! If you have screen shots of the image, then right click the image and screen shot me the firebug information for that image, I can probably figure out what's missing. Oh! Bonus! This also gives you the ability to support animated avatars with no further coding!
http://www.mytikibar.com |
X~D Seriously???!!! Great Work- You Rock! I'll give her a go on 7.1.4....fingers crossed THANKS! |
OK....Got to this part of the instructions of editing the last file: around line 199 find Should it look like this after the change:
// predefined sizes
Thanks |
Currently on 7.1.4 with the modifications as I have them now- It goes through the add avatar process.... I select the animated Gif.... It refreshes to the image crop process... I can see my image and it is animated... I click "Add Avatar" and it refreshes like all is well... BUT then displays- "Set avatar failed" in a pink ribbon across the page... REALLY? Pink? Oh...I mean----> Dang-It! It didn't work! OK...must need a little code adjustment somewhere...I'll play with it a bit further...seems it's close :) |
Should it look like this after the change:
// predefined sizes
Thanks Yes. There is ONE routine in the dolphin code that assigns the extension as 'ext'. EVERYWHERE else it's 'Ext'. So, I had to put that check in there to make sure my 'Ext' variable is set. This was FAR easier than rewriting the entire routine! http://www.mytikibar.com |
I can see my image and it is animated... I click "Add Avatar" and it refreshes like all is well... BUT then displays- "Set avatar failed" in a pink ribbon across the page... REALLY? Pink? Oh...I mean----> Dang-It! It didn't work! OK...must need a little code adjustment somewhere...I'll play with it a bit further...seems it's close :) Can you upload an animated gif as a regular photo? If it fails there then we need to look in... /inc/classes/BxDolImageResize.php in function _resizeGD ($sSrcImage, $sDstImage) { Oh yeah, I am using GD not imagemagik. I just realized some might be using imagemagik. You'll have to add the code from function _resizeGD ($sSrcImage, $sDstImage) { if ($size[2] == IMAGE_TYPE_GIF){ require_once( BX_DIRECTORY_PATH_INC . 'gifresizer.php' ); and make it work with imagemagik. http://www.mytikibar.com |
OK, I hadn't noticed before----> When I browse for an image and select a gif, the screen refreshes and in red just below the browse button, it says- "Image upload failed".....Strangely enough though, it shows the animated Gif down in the cropping window I can add jpg avatars....and png as well....gifs fail. Trying to go the route of basic photo uploading----> jpgs and pngs go through the motions, but the form for adding the image doesn't show a preview image....and after submitting the form, the image doesn't appear on the site, yet there seems to be a placeholder and page for the image... Gif image uploads fail and the form doesn't appear at all.
I'll attach the 7.1.4 files so you can see....It's mostly in that BxPhotoSearch.php file. Not sure about the imageMagik part....Can I check that with Host Tools in admin? I'm not sure about Zarconia config there....It's pretty damn solid though. |
Host Tools says we're using GD :) |
1st if you don't have a routine like this, put it in your header.inc.php
### use this query is phpmyadmin or command line if you prefer
You call it like this DEBUGGER('some field ' . $sSomeField); or DEBUGGER('some array ' . print_r($aSomeArray,true)); Then you can see what those variables are when trouble shooting. Now, on to the problem. It seems it is 2 fold, so, 1st, remove anything that is attempting to convert to GIF's. Let's see if we can just upload a JPG and get it to display. If it uploads but doesn't display, I'm willing to bet when you inspect the element, the source URL is missing the extension. Since it is, we have to poke in the code and find what routine is NOT passing the $sExt variable. What I did with 7.0.9 is following the code thru all the subroutines, changing where dolphin forces a .jpg extension to the $sExt variable and making sure that that variable is passed from routine to routine. The DEBUGGER function is indispensable for doing this. Once you can upload a .JPG, a .PNG, and a .GIF and it displays in the thumb, medium and full, THEN you can add back the code to keep the animation in the .GIF image, This way you are not fighting 2 issues at once. Let me know what happens! http://www.mytikibar.com |
"1st if you don't have a routine like this, put it in your header.inc.php" Alrighty then....Don't have that....Never used anything more than error logs for resolving issues. BUT, I've added the code to the end of my header.inc.php and ran that SQL code adding a debugging table to my database. Now, I'll need to learn how to use it for problem-solving :) Sorry, I'm not quite sure what you mean here- "You call it like this DEBUGGER('some field ' . $sSomeField); or DEBUGGER('some array ' . print_r($aSomeArray,true));" Is there another way to explain or a real-world situation/scenario that would help me see this debugging in action and better understand? Much Thanks
|
if(!empty($aSubscription['params'])) { There ya go! That covers it pretty good. LOL http://www.mytikibar.com |
if(!empty($aSubscription['params'])) { There ya go! That covers it pretty good. LOL OK...I have no idea where or how to run that code.... I'm used to looking at logs and researching. Forgive me for my ignorance...Does this code output to a log somehow? |
BTW- "If it uploads but doesn't display, I'm willing to bet when you inspect the element, the source URL is missing the extension. Since it is, we have to poke in the code and find what routine is NOT passing the $sExt variable." Correct me if I am wrong....Wouldn't this screenshot indicate that the extension is getting passed along correctly?
Before image number 30 (9-21-2013) there would always be the one original with it's original extension, and the rest would be jpg....Now you can see that the extension remains whatever the original image type that is uploaded. ACTUALLY- The gifs are only generating for the "ri" whatever that is.... |
When you use the DEBUGGER function, look in your database at the debugger_log table. That's where your info is posted. The extensions are being kept when the images are created, however, when dolphins looks to display them, they are not being passed in the $sExt variable. Right click a blank image and look at the source. It is more than likely the hash then a . with no extension. So that's in the code somewhere. <div style="background-image: url('http://www.mytikibar.com/photos/get_image/browse/0dd84c59cb82ed2b4eff4ba076947801.jpg');" class="sys_file_search_pic bx_photos_file_search_pic"> There's a function in BxPhotosModules.php called actionGetImage and in BxPhotosSearch.php called serviceGetImage
function serviceGetImage ($aImageInfo, $sImgType = 'thumb') { add the DEBUGGER line and look in your debugger_log make SURE there is a parameter $aImg['Ext'] and it holds the extension. if not, you need to go to function _getImageFullInfo and find out why it's not getting the extension. Just trace the routines backwards and use DEBUGGER to post the variables until you find the issue. If you get ['ext'] it is DIFFERENT than ['Ext'] and that will be why they don't display.
http://www.mytikibar.com |
OK- that makes better sense :) Not saying I got it all soaked-up...But that moves me forward a bit- Much Thanks Steve for taking the time. OK, I'm going to go back through and carefully apply the changes one by one and test again... FYI- The very last step of your instructions have to be done differently for 7.1.4- Your instructions: around line 662 find $aUnit = array( Here is what the 7.1.4 code actually looks like for that function- function getSwitcherUnit (&$aData, $aShowParams = array(), $aAddElems = array()) And the changes I made- function getSwitcherUnit (&$aData, $aShowParams = array(), $aAddElems = array()) Is this how you would have done this? OK, Going to go back through this again and see what we get :) |
I would add the bold code and see what the debugger_log shows you for $aData and make sure $aData['Ext'] exists. If it's $aData['ext'] you have to do this $aData['Ext'] = $aData['ext']; also, make sure $aData['Ext'] contains the extension. $sImgUrl = $this->getCurrentUrl('file', $aData['id'], $aData['uri']); DEBUGGER(print_r($aData,true); http://www.mytikibar.com |
Sorry- finally got a bit of time to work on this more... OK....Steve, you said- There's a function in BxPhotosModules.php called actionGetImage
and in BxPhotosSearch.php called serviceGetImage
function serviceGetImage ($aImageInfo, $sImgType = 'thumb') {
add the DEBUGGER line and look in your debugger_log
make SURE there is a parameter $aImg['Ext'] and it holds the extension.
if not, you need to go to function _getImageFullInfo and find out why it's not getting the extension.
Just trace the routines backwards and use DEBUGGER to post the variables until you find the issue.
If you get ['ext'] it is DIFFERENT than ['Ext'] and that will be why they don't display. Here is the results for that-
So yeah, it's not passing along the extension and is showing ext instead of EXT just as you figured.... Not sure where to go from here....Does the screener help you? |
go to _getImageFullInfo function _getImageFullInfo($iId, $sType = 'thumb') { After that add this. DEBUGGER(print_r($aImageInfo,true)); See if you get $aImageInfo['ext'] or $aImageInfo['Ext'] if you get $aImageInfo['ext'] and no $aImageInfo['Ext'] remove the DEBUGGER line and add this... if (!$aImageInfo['Ext'] ) If you don't get either, then we need to investigate function _getImageDbInfo http://www.mytikibar.com |
OK Steve.... go to _getImageFullInfo function _getImageFullInfo($iId, $sType = 'thumb') { After that add this. DEBUGGER(print_r($aImageInfo,true));
|
so add this if (!$aImageInfo['Ext'] )
http://www.mytikibar.com |
Been tied-up with other projects.... Will try to get back to this asap. |
I tried you code on 7.1.4 Steve and cannot seem to get it working ... infact the code broke my test site :/ is there any updated way of having flash / animated gifs working ? DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
If you give me more specifics, I might be able to help you out. I am staying with 7.0.9 because of years of mods. Look thru this article and create the DEBUGGER function and we can start trouble shooting. http://www.mytikibar.com |
this part is different on my files:- $aPics = $this->oModule->oAlbums->getAlbumCoverFiles($iAlbumId, array('table'=>$this->aCurrent['table'], 'field'=>'ID', 'fields_list'=>array('Hash')), array(array('field'=>'Status', 'value'=>'approved')), $iLimit);
around line 118 find DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
'fields_list'=>array('Hash')),
you can still change: 'fields_list'=>array('Hash','Ext')) and see what happens. We are trying to pass 'Ext' to all functions so they images will display right. 'Ext' contains the extension of the filename whether it be GIF, JPG, or PNG http://www.mytikibar.com |