dbodor Posted December 16, 2006 Report Share Posted December 16, 2006 I'm very new to php and would appreciate your expertise. I've been struggling with automatic thumbnail generation for a few weeks now. After correcting a few other potential problems like filenames containing multiple dots, and filenames with mismatched case, I had given up and gone to manually creating and linking thumbnails. That worked for a while, but then I wanted to upload a revised GEDCOM and more photos, and it took me back to square one. I don't want to redo all that manual work each time I decide to upload a revised GEDCOM with added photos. So I started looking at generatethumbs.php. Knowing very little about php, but some about basic programming, I tried a revised version which removed lines 46-51 if( $row[thumbpath] ) { if( (!$regenerate && file_exists( "$rootpath$usefolder/$row[thumbpath]" )) || !in_array($ext,$imagetypes) ) $newthumbpath = ""; else $newthumbpath = "$rootpath$usefolder/$row[thumbpath]"; }And then changed the elseif on line 52 to if elseif( $row[path] && in_array($ext,$imagetypes) ) { //insert prefix in path directly before file nameI uploaded the revised file and Yeah! It works! Now, my question is what is the function of the part I removed? Will this solution cause a different problem? Why did the original version cause me problems to begin with?By the way, with the old version, all the photos received the same thumbnail image, named only the thumbnail prefix "thumb_" Quote Link to comment Share on other sites More sharing options...
dbodor Posted December 21, 2006 Author Report Share Posted December 21, 2006 Never mind. All this was fixed in 6.0.3. No need for the modification. Thumbnail generation is working fine now.DB Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.