colorbox

Hi, how can I do after the album itself opens and click on the photo itself to open it with my colorbox, not a single photo

10x

Comments

  • acrylian Administrator, Developer
    Use the iFrame method. Please see the Colorbox website for detailed info how to configure. (This would not really be SEO friendly.)
  • Al Member
    thanks, but I can not handle, do not know exactly what to do and what script to edit
  • acrylian Administrator, Developer
    I suggest to read the theming tutorial and look at the standard themes (zenpage theme for example uses Colorbox) to get familiar with Zenphoto themes.
  • Al Member
    yeah, I saw that this issue using colorbox, but not the way I had in mind when I want open and I go www.mygallery.com/al/ al gallery with pictures themselves that I upload, and when click on this photo to me with open colorbox, now when the photo was http://mygallery.com/al/dsc03254.jpg.php and click on it it opens with my colorbox-a

    10x
  • acrylian Administrator, Developer
    You need to change your theme if you want to do it different. There are loads of threads about doing this with other "box" scripts
  • Al Member
    K, what themes would you suggest me to do it as I want.

    Thanks a lot
  • acrylian Administrator, Developer
    It is possible with virtually every theme.
  • Al Member
    I will explain exactly how you do it?
  • i would like too create a slideshow with colobox plugin.

    i have based my new design on zenpage theme : http://www.gtrs.fr/galerie/

    so how can i integrate colobox slideshow for album and not only for a picture ?
  • acrylian Administrator, Developer
    I assume you have read the theming tutorial. So in short you have to change your theme's album.php to open the image in a colorbox instead of a new page. This has been covered several times on the forum (seach for "thickbox" or "lightbox").

    Note that if you use pagination the colorbox will only work for the page you are on.
  • Al Member
    <head>
    <?php zenJavascript(); ?>
    <title><?php echo getBareAlbumTitle(); ?> | <?php echo getBareGalleryTitle(); ?></title>
    <meta http-equiv="content-type" content="text/html; charset=<?php echo getOption('charset'); ?>" />
    <link rel="stylesheet" href="<?php echo $_zp_themeroot; ?>/style.css" type="text/css" />
    <?php require_once(SERVERPATH.'/'.ZENFOLDER.'/js/colorbox/colorbox_ie.css.php')?>
    <script src="<?php echo FULLWEBPATH . "/" . ZENFOLDER ?>/js/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
    <script type="text/javascript">
    // <!-- <![CDATA[
    $(document).ready(function(){
    $(".colorbox").colorbox({inline:true, href:"#imagemetadata"});
    $("a.thickbox").colorbox({maxWidth:"98%", maxHeight:"98%"});
    });
    // ]]> -->
    </script>

    <?php zenJavascript(); ?>
    <?php printRSSHeaderLink('Album',getAlbumTitle()); ?>
    <?php printZDRoundedCornerJS(); ?>
    </head>
    <body>

    <div id="main">

    <div id="header">
    <h1><?php echo getGalleryTitle();?></h1>
    <?php if (getOption('Allow_search')) {
    $album_list = array($_zp_current_album->name);
    printSearchForm(NULL, 'search', NULL, 'Search album', NULL, NULL, $album_list);
    } ?>
    </div>

    <div id="content">

    <div id="breadcrumb">
    <h2>" title="<?php echo gettext('Index'); ?>"><?php echo gettext("Index"); ?> » <?php echo gettext("Gallery"); ?><?php printParentBreadcrumb(" » "," » "," » "); ?><?php printAlbumTitle(true);?></h2>
    </div>

    <div id="content-left">
    <div><p><?php printAlbumDesc(true); ?></p></div>
    <?php printPageListWithNav("« ".gettext("prev"), gettext("next")." »"); ?>
    <div id="albums">
    <?php while (next_album()): ?>
    <div class="album">
    <div class="thumb">
    " title="<?php echo gettext('View album:'); ?> <?php getBareAlbumTitle();?>"><?php printCustomAlbumThumbImage(getBareAlbumTitle(), NULL, 95, 95, 95, 95); ?>
    </div>
    <div class="albumdesc">
    <h3><a href="<?php echo
    htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printAlbumTitle(); ?></h3>
    <?php printAlbumDate(""); ?>
    <p><?php echo truncate_string(getAlbumDesc(), 45); ?></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">" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getBareImageTitle()); ?></div>
    </div>
    <?php endwhile; ?>
    <?php if(getOption("Use_thickbox")) {
    $boxclass = " class=\"thickbox\"";
    $tburl = getUnprotectedImageURL();
    } else {
    $thickboxclass = "";
    $tburl = getFullImageURL();
    }
    if (!empty($tburl)) {
    ?>
    "<?php echo $boxclass; ?> title="<?php echo getBareImageTitle();?>">
    <?php
    }
    printCustomSizedImageMaxSpace(getBareImageTitle(),580,580); ?>
    <?php
    if (!empty($tburl)) {
    ?>

    <?php
    }

    </div>
    well use this code album.php, but still will not work, where's my mistake I can not understand
  • acrylian Administrator, Developer
    Of course it does not. You can't copy just copy stuff and hope that it will work... You surely did not read the theming tutorial yet.
  • Al Member
    Now I understand that it will not help me change the code in album.php, I recommend you to use chililight2 but it gives many errors. Please if you can help me ...
  • acrylian Administrator, Developer
    You need to change the code on album.php. So last attempt: You have to change the image link within tne next_image() loop to point to the full image and attach the colorbox to that.
  • Al Member
    <?php while (next_image(false, $firstPageImages)): ?>
    sorry but I do not know much about php

    what code to use realy ?

    i use zenpage themes
  • acrylian Administrator, Developer
    sorry but I do not know much about php
    Sorry, you then really need to learn some basics first. We won't teach those. Within that loop there is a image link (you know what a link is, right?), change that link to use `getFullImageURL()`.
  • Thank's for this explication :)
  • Al Member
    trying all night and you are unable to do
  • acrylian Administrator, Developer
    Well, then this is probably above your knowledge, sorry.
  • Al Member
    do not be so bad help of a lamer
  • Al Member
    please edit album.php for me pleaseeeee ......
  • Al,

    If you'd like I can direct you to a few web developers who would be happy to give you a quote on what it would cost do design your site for you....

    Seriously, the help here is free, insults will not get you anywhere. The main idea behind the forums is to help everyone help themselves. The advice is sound, if you cannot modify the image loop to change a call, then it is likely above your knowledge and you should step back a bit and look at fixing the basics.

    Might I suggest taking a look here:
    Theming tutorial
  • acrylian Administrator, Developer
    Well said!
Sign In or Register to comment.