• Hey,
    I am using the gallery plugin Lazyest Gallery and I’m wanting to mod the width of the popup window generated. Here is the popup window code:

    resizable=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=yes,width=" . $lg_gallery->get_option( 'pictwidth' ) . ",height=" . $lg_gallery->get_option( 'pictheight' ) . ",left=100,top=100'))";

    See where width and height are declared? It retrieves the image width and height and creates the popup window accordingly. How can I change this to add say 10px? I know it would be something like:

    height=" . $lg_gallery->get_option( 'pictheight' ) + 10px

    Could anybody give me a hand with this?
    Any help is greatly appreciated.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • your can do something like this:
    create a new variable
    $myheight = (int)$lg_gallery->get_option( 'pictheight' ) + 10;
    and in de popup window code put
    height=" . $myheight . "

    Thread Starter drinkingsouls

    (@drinkingsouls)

    Hey, thanks for the reply. Your solution is semi-functional. When the popup window opens it opens with the dimensions I specified, but as soon as the image has loaded the popup window is re-sized to fit around the image again. Any ideas on how to prevent this?

    The reason I have this problem in the first place is because I needed scroll bars on some of my images. Ideally, the script would check if popup was larger than the screen res and apply scroll bars if it was.

    An easier way I thought would be to just add scrollbars=yes to the popup function, which worked, but it inserted the scrollbars on the inside of the window so they took up space. Now I’m trying to add on the width of the scrollbar to try and prevent them from showing when they don’t need too. Does that make sense?.

    Thanks

    IC,
    please have a look at lazyest-popup.php.
    in the function FitPic:

    iHeight = document.images[0].height - iHeight + 10;

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change popup window size’ is closed to new replies.