Launch Slideshow in a new non-embedded window?

Evo

Joined: 2007-06-14
Posts: 43
Posted: Sun, 2007-07-01 16:18

Right now at http://www.thecrookstoncollection.com I really like using Drupal (I just installed it, so yes it'll be customized to a greater extent), unfortunately when dealing with an integrated gallery, you end up losing some screen space.

What I'd like to do is when in embedded mode, and someone clicks Slideshow, it will launch /gallery2/v/slideshow/%path% in a new window instead of /v/slideshow/%path% (the embedded version) in the same window.

Is this possible?

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2007-08-09 20:32

maybe something like this:

        global $gallery;
        $urlGenerator =& $gallery->getUrlGenerator();
        $links = array();
        foreach ($items as $item) {
            $itemId = $item->getId();
            if (isset($wantsDetailedLinks[$itemId])) {
                $url = $urlGenerator->generateUrl(
                    array('view' => 'slideshow.Slideshow', 'itemId' => $itemId),
                    array('forceFullUrl' => true, 'forceDirect' => true));
                $jsUrl = str_replace('&', '&', $url);
                $links[$itemId][] =
                    array('text' => $this->translate('View Slideshow'),
                          'params' => array('href' => $url),
                          'script' => "window.open('$jsUrl');return false");
            }
        }
        return array(null, $links);

replace the entire contents of getItemLinks in slideshow/module.inc with that.