I know very little about php and nothing about javascript, so I would like to stick with php.... my question is about my image gallery, I have everything functioning perfectly but I wish to have the images open in a new window when they are clicked. I would like the new window to be without a navigation and address bar.

****/

<div id="main">
<div id="gallerytitle">
<h2><span><?php printHomeLink('', ' | '); ?><a href="<?php echo htmlspecialchars(getGalleryIndexURL());?>" title="<?php echo gettext('Albums Index'); ?>"><?php echo getGalleryTitle();?></a> | <?php printParentBreadcrumb(); ?></span> <?php printAlbumTitle(true);?></h2>
</div>
<div id="padbox">
<?php printAlbumDesc(true); ?>
<div id="albums">
<?php while (next_album()): ?>
<div class="album">
<div class="thumb">
<a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?></a>
</div>
<div class="albumdesc">
<h3><a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumTitle(); ?></a></h3>
<small><?php printAlbumDate(""); ?></small>
<p><?php printAlbumDesc(); ?></p>
</div>
<p style="clear: both; "></p>
</div>
<?php endwhile; ?>
</div>
<div id="images">
<?php while (next_image(false, $firstPageImages)): ?>
<div class="image">
<div class="imagethumb"><a href="<?php echo htmlspecialchars(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?></a></div>
</div>
<?php endwhile; ?>
</div>
<?php printPageListWithNav("&laquo; ".gettext("prev"), gettext("next")." &raquo;"); ?>
<?php printTags('links', gettext('<strong>Tags:</strong>').' ', 'taglist', ''); ?>
</div>
<?php if (function_exists('printSlideShowLink')) printSlideShowLink(gettext('View Slideshow')); ?>
<?php if (function_exists('printRating')) { printRating(); }?>
</div>

<div id="main"> <div id="gallerytitle"> <h2><span><?php printHomeLink('', ' | '); ?><a href="<?php echo htmlspecialchars(getGalleryIndexURL());?>" title="<?php echo gettext('Albums Index'); ?>"><?php echo getGalleryTitle();?></a> | <?php printParentBreadcrumb(); ?></span> <?php printAlbumTitle(true);?></h2> </div> <div id="padbox"> <?php printAlbumDesc(true); ?> <div id="albums"> <?php while (next_album()): ?> <div class="album"> <div class="thumb"> <a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?></a> </div> <div class="albumdesc"> <h3><a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumTitle(); ?></a></h3> <small><?php printAlbumDate(""); ?></small> <p><?php printAlbumDesc(); ?></p> </div> <p style="clear: both; "></p> </div> <?php endwhile; ?> </div> <div id="images"> <?php while (next_image(false, $firstPageImages)): ?> <div class="image"> <div class="imagethumb"><a href="<?php echo htmlspecialchars(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?></a></div> </div> <?php endwhile; ?> </div> <?php printPageListWithNav("&laquo; ".gettext("prev"), gettext("next")." &raquo;"); ?> <?php printTags('links', gettext('<strong>Tags:</strong>').' ', 'taglist', ''); ?> </div> <?php if (function_exists('printSlideShowLink')) printSlideShowLink(gettext('View Slideshow')); ?> <?php if (function_exists('printRating')) { printRating(); }?> </div>

/***

above is the script used to show my images from the images folder, its a little bit messy... I would like to know what changes i need to make in order to get the results i desire, but let me know if this is not the file i have to make changes to.

thank you!!!

    First off, read formatting syntax

    Secondly, use &#91;php&#93; code here... &#91;/php&#93; for php code. Use html tags for html code and code tags for other code instead of the php tags.

    That said, looking at your code for more than 5 seconds make my head hurt, and so I didn't. While I have a suggestion, I can't really say for sure I found the issue in that little time...

    <a href="<?php echo htmlspecialchars(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>">
    	<?php printImageThumb(getAnnotatedImageTitle()); ?>
    </a>

    You will make links open in a new window if you insert target="blank" in the opening a tag

    <a href="<?php echo htmlspecialchars(getImageLinkURL());?>" title="<?php echo getBareImageTitle();?>" target="_blank">

    However, these will still have address bar etc and you can't do anything about that. To have a small chance of achieving that, you'd need to use the javascript function window.open
    Still, nowdays you can't expect browsers to respect you not wanting an address bar or status bar.

      Write a Reply...