curvyCorners for Photos and Thumbnails curvyCorners for Photos and Thumbnails
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

curvyCorners for Photos and Thumbnails

Started by Gizmo, July 23, 2006, 07:22:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gizmo

Greetings and Salutations!

I'm always trying new things on my test gallery and I came across this javascript for creating curvyCorners. I've been trying to apply this to the intermediate photo view first but I'm having some difficulty determining the height of the intermediate photo. I have the configuration set up to make the long edge 400px on uploading so depending on whether this is in landscape or portrait is important but more important is what's the height. In order to make the corners round of a photo, it has to be set as the background image of a <div> tag. I've changed the code in the function theme_html_picture() to accomplish this by using inline styling but determining the height and width of the photo eludes me as you need to make the height about 20px less for the script to work correctly. Can anyone offer a glimpse or answer to what I need to do?

In the function theme_html_picture(), I modified this line
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
to this
            $pic_html .= "<div class=\"innerDiv\"; style=\"background-image: url($picture_url); height: 260px; width: 400px;\" /></div>";

What I need is a dynamic variable for the height and width of the intermediate photo in this line.

When the height is hard coded and a correct sized photo used, here's what it looks like: http://www.bullseyephotos.com/test/displayimage.php?album=lastup&cat=3&pos=4

When a photo doesn't have the correct height, this is what it looks like: http://www.bullseyephotos.com/gallery/displayimage.php?album=1&pos=8. As you can see, the top repeats at the bottom.

curvyCorners - http://www.curvycorners.net/index.php

Once this gets worked out, I'll apply this to the thumbnails and fullsized photos with a new cool theme I've been working on. While I'm not very efficient with PHP, I'm giving it a go with this project.

Thanks!

Gizmo
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Nibbler

You have the pic dimensions in the $image_size array. I'm just getting a parse error atm with your links.

Gizmo

Sorry about the error. I had tried some changes and then walked away and forgot to put it back. Actually that was the array I was last working on but couldn't get it to work correctly. I'll keep plugging away on it since it's a great learning experience but if you care to elaborate on how to call this I wouldn't be too upset.  ;)
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Gizmo

Got it working somewhat. Have to get to bed for a 4am teleconference  >:( so I'll post the fix tomorrow. Basically I took some code from function compute_img_size($width, $height, $max) in the functions.inc.php file.
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision