Lightbox Images Squished

resolved (19 posts) (3 voices)

  1. flightlineaviationmedia
    Member

    I'm having a problem where when you view the image in the lightbox it is squished width-wise. I did try one fix that was in another post, changing 4 lines in the php to: 'terms' => explode(',', $cat),
    But that did not help. It is still the same.

    Is there anything else I can do?

    Posted 6 months ago #
  2. Elliott
    Support

    Hello flightlineaviationme,

    Send us a link to your page and we'll take a closer look.

    Posted 6 months ago #
  3. flightlineaviationmedia
    Member

    Ok, here is the page:
    http://flightlineaviationmedia.com/?page_id=1377

    Posted 6 months ago #
  4. flightlineaviationmedia
    Member

    And, another thing I have noticed is that the portfolio on that page is pulling in all portfolio posts, not just the ones specified in the category. i have the category "air show" selected in that portfolio shortcode but it is showing posts from other cat's too.

    Posted 6 months ago #
  5. Elliott
    Support

    By default prettyPhoto will open up your images so that they fit inside the screen. If you take this feature off then they will open in their full size and users on smaller resolution will have to scroll around the page to see all of the image, is this what you are wanting?

    There is a current bug when using multiple categories with the portfolio, we will most likely have it fixed in the next update.

    Posted 6 months ago #
  6. flightlineaviationmedia
    Member

    When I use the Galleria, and open the same image in a lightbox, its not squished. The lightbox image is also larger. So I guess I'm not understanding why there is a difference betweeen lightbox images in Galleria and in Portfolio.

    Posted 6 months ago #
  7. Elliott
    Support

    I think the galleria script is using just a plain lightbox, not prettyPhoto.

    Posted 6 months ago #
  8. flightlineaviationmedia
    Member

    Ok, then apparently the problem is with prettyPhoto..

    Posted 6 months ago #
  9. Ruderic
    Support

    Hello,

    You can define custom height and width dimensions for prettyPhoto. That way, you can configure the lightbox so it's opened at a size that suits your needs.

    Go to the theme folder and open the file "lib/scripts/custom.js". In line #75 you will find this code:

    jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
    	overlay_gallery: false, social_tools: '', 'theme': 'light_square' /* light_square / dark_rounded / light_square / dark_square / facebook */
    });

    Replace it with:

    jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({
    	default_width: 500,
    	default_height: 344,
            overlay_gallery: false, social_tools: '', 'theme': 'light_square' /* light_square / dark_rounded / light_square / dark_square / facebook */
    });

    Assign your own values there, and let us know the results.

    Posted 6 months ago #
  10. flightlineaviationmedia
    Member

    It is not working. No matter what I put in there, it looks the same.

    Posted 6 months ago #
  11. Elliott
    Support

    You can set the allow_resize option to false, http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation/, which will make all images display in their original dimensions.

    When users with a smaller resolution view the image though they will need to scroll around to see it all. To not annoy your users I suggest leaving it on, they can click on the fullsize button in the top right hand corner of the image to see it in it's full dimensions if they need.

    Posted 6 months ago #
  12. flightlineaviationmedia
    Member

    The images that I uploaded were 1024px wide so I figured it should be ok, it would be resized proportionally. But what I just discovered is that if I upload an image of only 900px, then the lightbox image is not squished and is proportionally larger. as it should be.

    In the page example I linked above, the first image in the first row is new. If you look at it in lightbox you can actually see it shrink in width when you click "next" to go to image #2. I can deal with 900px.

    Another portfolio-related question - is there any way to reduce the dead space between portfolio rows as seen in my example page, and also move the title closer to the image? Overall the portfolio page seems to have a lot of dead space.

    Posted 6 months ago #
  13. flightlineaviationmedia
    Member

    Another couple questions about it..... Is it possible to change the size of a portfolio thumbnail? I'm noticing that the left and right edges are getting cropped. And, is there any option for displaying caption info in the bar under the lightbox image?

    Posted 6 months ago #
  14. Elliott
    Support

    There is a lot of space there because the layout has been customized. You can change the image sizes in Dashboard -> your theme -> Image Resizing, what your looking for is the full width layout, four column portfolio sizes.

    I don't recommend making them bigger though as someone on a smaller resolution will have to scroll around the page to see it all and that get's pretty annoying.

    As for the lightbox caption I'll try and get a tutorial worked out later today.

    Posted 6 months ago #
  15. Elliott
    Support

    Alrighty for the lightbox captions make sure you fill out the alt and title text of your featured image as you upload it. If you forgot to then you can click the image when editing your post and fill out the texts.

    Next open up /wp-content/themes/[your_theme]/lib/shortcodes/15-portfolio.php and on lines 243 - 256 you should see this,

    $out .= mysite_display_image( array(
    				'src' => $img[0],
    				'alt' => '',
    				'title' => '',
    				'height' => $height,
    				'width' => $width,
    				'class' => 'hover_fade_js',
    				'link_to' => $link_to,
    				'link_class' => 'portfolio_img_load',
    				'prettyphoto' => ( empty( $_post[$id][0] ) ? true : false ),
    				'group' => $img_group,
    				'preload' => true
    			) );

    Change it like this,

    $meta = get_post(get_post_thumbnail_id($id));
    $out .= mysite_display_image( array(
    				'src' => $img[0],
    				'alt' => get_post_meta(get_post_thumbnail_id($id), '_wp_attachment_image_alt', true),
    				'title' => $meta->post_title,
    				'height' => $height,
    				'width' => $width,
    				'class' => 'hover_fade_js',
    				'link_to' => $link_to,
    				'link_class' => 'portfolio_img_load',
    				'prettyphoto' => ( empty( $_post[$id][0] ) ? true : false ),
    				'group' => $img_group,
    				'preload' => true
    			) );

    And then do the same for lines 573 - 585.

    I'll add this to our queue and we'll see if we can get it added in a future update.

    Posted 6 months ago #
  16. flightlineaviationmedia
    Member

    Ok. I see how to make the edges of the portfolio thumbs so they are not cropped. I made it bigger, but just a little but.

    Was there ever a work-around for the bug that displays all portfolio categories? I was trying to make one page with one category of portfolio but its displaying any categories, so I may have to use a different method for displaying the pics maybe Fancyimage.

    Posted 6 months ago #
  17. Elliott
    Support

    Try the solution in the bottom of this thead and let us know if it works for you okay,

    http://mysitemyway.com/support/topic/portfolio-problems-1#post-38204

    Posted 6 months ago #
  18. flightlineaviationmedia
    Member

    Alrighty.... the work-around for the categories seems to be working as now it is only showing the category specified in the shortcode, and the lightbox captions are sort of working. It is showing the "alt" field above the picture. Was it supposed to show the title as well? I changed both lines of code as show above. Its not really a huge deal though, I can put what I want in the alt field. Its a nice touch to have.

    As far as the thumb resize in portfolio, I see how to do that now but just from a design perspective I wish there was less "dead" space on a portfolio gird. What I want to do is lay out a group of 60 images with the titles. I'm just not sure if I should do it with Portfolio or Fancy Image.

    Posted 6 months ago #
  19. Elliott
    Support

    If you filled out the title (of your featured image) then it should be displaying in the bottom left hand corner.

    Posted 6 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme