How can I "always" open images in a new window?

asad_wosaibi

Joined: 2005-05-26
Posts: 7
Posted: Tue, 2005-05-31 19:13

Hi,
I want users to click on thumbnails and "ALWAYS" open the images in a new window(i.e. have a new web-browser window wiht only the image in it) instead of within the same window.?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2005-06-01 01:06

See this thread, http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27255&highlight=open+window.

Only you'll be editing albumBody.tpl instead.

 
Xprcsn7

Joined: 2005-08-01
Posts: 10
Posted: Mon, 2005-08-01 19:39

I checked the thread and apparently they hadn't figured it out. Their goal was slightly different: to make a full sized image to appear as a popup, what i'm trying to do is simply click on thumbnail and opens the regular medium sized photo page in a new window this way people can view the thumbnails and picture at the same time, but in G2b4...i think the other guy had b1.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-08-02 04:02

I've been talking to bharat on irc on how to do this. It's possible, but not efficient. He started down the path of getting me the answer, but we stopped when he suggested it might be easier to just edit photo.tpl to render only the image. Here's the useful stuff from our conversation:

Quote:
<bharat> sure .. if you know the id of the resize you can do
<bharat> {g->url arg1="view=core.DownloadItem" arg2="itemId=`$derivativeId`"}
<bharat> that'll give you the url directly to the iamge
<nivekiam> so would the id of the resize be the same as $child.id in album.tpl?
<bharat> the short answer is "no"
<bharat> but I can tell you how to get it
<bharat> so the child.id is the id of the GalleryPhotoItem
<bharat> it's got 2-3 derivatives (1 thumbnail, 1-2 resizes)
<bharat> so the trick is to get the derivative ids at the same time as we fetch the thumbnails
<bharat> we don't do that though for efficiency (since we don't use it)
<bharat> so he'd need to figure out which resize he wants (there can be more than one, of course) and then link directly to that resize
<bharat> this is not *hard* but it requires writing a little code
<nivekiam> yeah, I can only see people using this with custom themes, esspecially since they'll probably need to use javascript to for a custom sized pop-up
<bharat> it might be easier to change photo.tpl to just render the <img>
<bharat> and then use a _target on the <a> in album.tpl

That's when I started editing photo.tpl, theme.inc and creating a new "wrapper" for photo.tpl on my site. I'm lazy and didn't put in the extra 5 seconds of work to edit album.tpl to open the link in a new window. ;) Check out my site for an example: removed link, it doesn't contain modifications any longer those changes will be there for a couple of days or at least until I update from CVS again.

Here's what I did:
NOTE: You may want to create a new theme as at least one of your changes could be overwritten by an upgrade. Theme.inc cannot be made 'local', thus it's overwritten on every upgrade, if the theme exists in an upgrade.

1) created a 'local' directory under /themes/matrix/templates and copied photo.tpl into it. You'll want album.tpl as well

2) edited photo.tpl to look like this

{if !empty($theme.imageViews)}
{assign var="image" value=$theme.imageViews[$theme.imageViewsIndex]}
{/if}
              {if isset($theme.photoFrame)}
                {g->container type="imageframe.ImageFrame" frame=$theme.photoFrame}
                  {g->image id="%ID%" item=$theme.item image=$image fallback=$smarty.capture.fallback class="%CLASS%"}
                {/g->container}
              {else}
                {g->image item=$theme.item image=$image fallback=$smarty.capture.fallback}
              {/if}

3) created a new file imaginatively called 'none.tpl' in the same 'local' directory and copied the contents of theme.tpl into it. Then I cut out the stuff I didn't want, breadcrumb, the image at the top, the images at the bottom, etc

4) edited theme.inc and revised the showPhotoPage() function to return 'none.tpl' instead of 'theme.tpl'

That's pretty much it. You'll want to edit album.tpl to open the link in a new window and you may want to use javascript or what ever you want to open the new window. Gotta go the Closer is on ;)

Oh and maybe take a look at this, may or may not help: http://wpg2.ozgreg.com/viewtopic.php?t=46

 
Xprcsn7

Joined: 2005-08-01
Posts: 10
Posted: Tue, 2005-08-02 08:26

Hi, I followed your instructions to the last step...which again, is the final code for creating the new window. I'm sorry but I have no background in PHP or java or whatever the code is for album.tpl. So I went online and looked for new window scripts and tried pasting them but no luck....I also looked at the other link, but they hadn't figured it all the way out yet...and I also checked out your site and navigated all over the test pages, but did not find an example of an album thumbnail opening a new window. we're soo close, all I need is that five seconds you lazed out on! :D

www.xprecision.com

 
n8jaeger

Joined: 2005-06-20
Posts: 13
Posted: Tue, 2005-08-02 12:57

hi all,
trying to do the popup-thing for the fullsize images. in gallery 1.x, if i remember right, there was a parameter in admin menu to select "popup yes/no". is this paramter gone in g2 beta4? how can i do this with g2 b4? the procedure must be different then above in some steps, i think

 
n8jaeger

Joined: 2005-06-20
Posts: 13
Posted: Tue, 2005-08-02 13:04

self-solved ;)

change

<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">

to

<a {if $frameType != "itemFrame"}
href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">
{else}
href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.id`"}" target="_blank">
{/if}

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-08-02 13:35

That works if you're not showing image frames or want to show the original item (downloadItem). Either way, in my gallery I have full size images restricted to logged in users so I got an error if I wasn't logged in because I'm also using image frames...

All you really have to change is this:<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">

to this:<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" target="_blank">

 
szac

Joined: 2003-07-08
Posts: 26
Posted: Thu, 2005-08-25 13:59

This is SWEET!! Is it possible to get it to work with RC2? Since the theme.inc system is gone, where would I modify theme.tpl to get it to return photo.tpl in a different template other than theme.tpl?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2005-08-25 17:06

Theme.inc is there.

\themes\matrix\theme.inc

You'd modify theme.inc to refer the to a different template other than theme.tpl for photos. Re-read my previous post, http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=157799#157799

Except my site doesn't have that modification in it any longer.

 
szac

Joined: 2003-07-08
Posts: 26
Posted: Thu, 2005-08-25 17:49

WOW. I totally missed it (was looking in /templates!). Thanks so much for this mod. I've been trying to get something likes this working with G1 for quite some time. Now I'll try to throw some js in there for some nice sized popup windows! CHEERS

 
szac

Joined: 2003-07-08
Posts: 26
Posted: Thu, 2005-08-25 23:28

I found a nice javascript that'll resize the window to the image and add some pixels for the nav and what not. The only problem is that it requires the dimensions of the image to set the size. I'm thinking it's in $photoItem-> somewhere but am clueless to pull it off. I know i have to set the width and hieght as variables and then call them in the js function.

How do I call the image dimensions and set them as variables?

Thanks Alot! With the javascript working properly I should be able to get my gallery to function somewhat like the "Photo of the Moment" at http://tumyeto.com/[/url]

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2005-09-01 00:19

I'm using WPG2 plugin with latest G2 and Matrix theme. For my Full Size images to popup in a new window I simply added the below code to photo.tpl just above {* Download link for item in original format *}

This is actually the same exact code taken from the photo.tpl file in wordpress theme.

	{if count($theme.imageViews) > 1}
	  {if !empty($theme.sourceImage)}
	    <p class="gbIBlock">
		<A href="javascript:void(0);" onclick="window.open('{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"}','viewWindow', '{g->text text="width=%d,height=%d" arg1=$theme.sourceImage.width+20 arg2=$theme.sourceImage.height+20}, resizable=yes,scrollbars=yes' );">
	       {g->text text="View Full Picture"}
	{if !empty($theme.sourceImage.width)}
	  ({g->text text="%dx%d" arg1=$theme.sourceImage.width arg2=$theme.sourceImage.height})
	  ({g->text text="Javascript New Window"})
	 {/if}
	</a>
	</p>
	{/if}
	{/if}
 
szac

Joined: 2003-07-08
Posts: 26
Posted: Sat, 2005-09-03 15:18

Sweet! Is it possible to get that to link from the album view?

 
kylemac123
kylemac123's picture

Joined: 2005-09-14
Posts: 16
Posted: Thu, 2005-09-15 01:35

I seem to be missing something... I had it set so that clicking on the resized image would result in the full sized image being opened in a new window back with beta4 and rc2, now it seems that no longer works, and I can't figure out what I did for the life of me. The above posters solution is alright if you want another link below the image, but I want the image itself to be the link. I figured I'd be editing photo.tpl, but now i'm not so sure. Anyone care to point me in the right direction?

 
Ave

Joined: 2003-05-11
Posts: 19
Posted: Sat, 2005-09-17 21:48

When I use <a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" target="_blank"> I see subalbums in another window too. I want to see only photos in a new window.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-09-17 22:36

kylemac123 and Ave take a look at step 4 above

Quote:
4) edited theme.inc and revised the showPhotoPage() function to return 'none.tpl' instead of 'theme.tpl'

http://gallery.menalto.com/node/31184#comment-123838

 
Ave

Joined: 2003-05-11
Posts: 19
Posted: Sun, 2005-09-18 04:42

I do all steps. But I need a popup when I click on a thumbPhoto. For a thumbAlbum (subAlbum) I don't want a popup.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2005-09-18 16:17

You'll need to play around with adding this code to wrap around the part of the code that creates the link and brings in the image with this:

{if $child.canContainChildren}

... code here ...

{/if}
 
Ave

Joined: 2003-05-11
Posts: 19
Posted: Mon, 2005-09-19 18:04

Hi nivekiam,

It works. Many thanks for the help! Here is the code:

Quote:
{if $child.canContainChildren}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">
{else}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" target="_blank">
{/if}

Now I' looking for a javascript. In order to show only the image.

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Mon, 2005-09-19 22:08

I haven't read this thread very very closely but I gather two suggested options for having a certain link open in a new window:
- <a href="javascr ipt:void(0);" onclick="wi ndow.ope n('somelink');">
- <a href="somelink" target="_blank">
I don't like either of these methods. Usualy I code using the strict dtd but I guss both methods are not correct to the XHTML dtd either (just guessing here). The first one is bad for obvious reasons; if javascript is impaired the script will not work and even worse; when users do click shift the link tries to go to "java script:voi d(0);" which is clearly wrong.
The second method I don't like because I think that that won't validate or otherwise the attribute was not intended for this use.

My solution involves the attribute rel="external".
Instead of adding target="_blank" add rel="external" to the link and make the following javascript functions available (through inclusion in the page header or by adding it to an existing (and included) .js file)

/*
* Function used to get elements which have a certain classname. The classname does not have to be
* the only classname an object has.
*/
document.getElementsWithExternalRel = function () {
        var s = [document.documentElement || document.body], i = 0, r = [], l = 0, e;
        var re = new RegExp('^external$'); // '(^|\\s)external(\\s|$)'
 
        do {
                e = s[i];
 
                while (e) {
                        /* Element nodes only */
                        if (e.nodeType == 1) {
                                if (e.rel && re.test(e.rel)) r[l++] = e;
 
                                s[i++] = e.firstChild;
                        }
 
                        e = e.nextSibling;
                }
        }
 
        while (i--);
 
        return r;
}
 
/*
* Open a certain URL in a new window. If a popup blocker prevents this the link is opened in the
* current window.
*/
function fnDOM1Open( event ) {
        if ( window.event ) {
                var shiftKey = window.event.shiftKey;
        } else {
                var shiftKey = event.shiftKey;
        }
 
        if ( !shiftKey ) {
                var strURL = this.href;
                var oNewWindow = window.open( strURL );
 
                if ( !oNewWindow ) {
                        window.location.href = strURL;
                }
 
                return false;
        } else {
                return true;
        }
}
 
/*
* Assign an onclick event handler to all links having the classname "newWindow"
*/
function fnAssignPopupLinks() {
        var aAnchorList  = document.getElementsWithExternalRel();
        i               = aAnchorList.length;
 
        while (i--) {
                oAnchor  = aAnchorList[i];
 
                if ( oAnchor.href ) {
                        oAnchor.onclick = fnDOM1Open; // DOM level 1 approach
                }
        }
}

All you need to do then is to call the function fnAssignPopupLinks() at the end of the page and it runs in less then a second time for all browsers adding the onclick event handlers to all links having rel="external"

This way is much cleaner because it validates and does not disable a user from opening a link when javascript is switched off. And when users use the shift key the javascript lets the browser do the default action whatever that might be so it doesn't interfere with intuitive thingies...

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Fri, 2005-10-07 00:17

I have applied RwD's javascript (above) to my g2 and it is opening the images in a new window when I click the thumbnail.
***NB: I put the script in the header of templates/local/theme.tpl and surrounded the <script></script> tags with {literal}{/literal} tags to escape Smarty's attention.

Now i want the new window to be sized to the image, maybe a tad bigger to take navigation etc.

Any quick answers on how to pass the image dimensions to the script above and output a nice size window?

Thanks
Norv
*see next post

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Fri, 2005-10-07 02:17

I got a partial solution by adding this code to the header of theme_photo.tpl which is called in my theme.inc in function showPhotoPage.
(My theme_photo.tpl is a copy of theme.tpl with only the photo included on the page)

{literal}
    <script language="javascript" type="text/javascript"/>
    <!-- hide script from older browsers
   var NS = (navigator.appName=="Netscape")?true:false;

     function FitPic() {
       iWidth = (NS)?window.innerWidth:document.body.clientWidth;
       iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       iWidth = (document.images[0].width - iWidth) + 20;
       iHeight = (document.images[0].height - iHeight) + 20;
       window.resizeBy(iWidth, iHeight);
       self.focus();
     };

    // end hiding script from older browsers -->
    </script>
{/literal}

4 problems with this:
1. I would like to have a second popup automatically close the first popup
2. the album page blanks out for a second while the popup loads
3. when you stop the slideshow it goes to the popup of the current image and closes the album page
4. the margins vary and even disappear on some pix

Example at www.longforest.com/g2test/main.php
Thanks to http://www.sitepoint.com/article/resize-popup-fit-images-size for the code above.

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-10-07 04:53

1, Assign a name to the window like window.open( strURL, 'myGallery' ).
2, ??.
3, That sucks, probably javascript related. Try to find the point where it does this by adding alert( 'message' ); statemants in the code. Naming the window might have solved this already though.
4, I think that depends on the image dimensions. Can you check that the images indeed do get a margin?? (check with firefox + some extentions)

______________________
I made a theme for G2, try it :)

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Fri, 2005-10-07 06:06

1. Thanks RwD, I will try that
2. I forgot to add that the function FitPic() in the header of theme_photo.tpl
is called in a <body onLoad='FitPic();'> tag, maybe that causes the album page visible beneath the popup to 'blank out' or reload?
3,4. ditto 1

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-10-07 08:27

2, For some reason or the other IE seems to do blanking out stuff rather often when javascript is involved. If the problem doesn't happen in Firefox then it is probably just that...
______________________
I made a theme for G2, try it :)

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Tue, 2005-10-11 02:07

I assigned a name to the window in fnDOM1Open(event) as in
var oNewWindow = window.open( strURL, 'myPopup' ,'resize=yes,width=500,height=500');
and now
1. Fixed: the second popup closes the first popup
2. Fixed: the album page stays loaded
3. Not fixed yet - stopping slideshow still shows current image in popup and closes album page
4. Fixed: margins are fine

but
5. Now the second popup loads underneath the album page, despite the self.focus() line in function FitPic(), called when the popup loads

I have tried a lot of rudimentary hacks to get the new popup to focus, ie. load on top of the album page but ????
Here's the example again: http://www.longforest.com/g2test/main.php?g2_view=core.ShowItem&g2_itemId=17
Thanks again
norv

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Tue, 2005-10-11 07:10

3. Actually it is not closing the album page. The slideshow always stops at the current
picture and returns to the current pictures photo page. If your photo.tpl happens to be the page
opened in the popup, then the main window will look like the popup. You would have to change the
slideshow to go to the album rather then the picture:

  • Copy the file "modules\slideshow\templates\Slideshow.tpl" to "modules\slideshow\templates\local\Slideshow.tpl"
    (create the directory if needed)
  • Comment out the line saying:
    linkStop.href = document.getElementById('href_'+index).href;
    

    So change it into:

    // linkStop.href = document.getElementById('href_'+index).href;
    

    or remove it completely.

  • Change the part of the stop button:
    <a id="stop" href="{g->url arg1="view=core.ShowItem"
     arg2="itemId=`$SlideShow.itemList[$SlideShow.start].id`"}">
      {g->text text="Stop"}
    </a>

    Turn the link into:

    <a id="stop" href="{g->url arg1="view=core.ShowItem"
     arg2="itemId=`$SlideShow.item.id`"}">
      {g->text text="Stop"}
    </a>

It does what you ask, but I think this kind of makes it unclear where you are going to when you press
stop, perhaps you should also add the pagenumber? This will get worse when the slideshow also starts
opening subalbums (doesn't do that yet).

5. The problem is that the onload event fires after all page content has loaded (including images and
other binary content). I found a possible solution for this here.
One thing though here is that you do not have the correct dimensions yet before the image is loaded.
but you'll have that anyway if you get what you want. I am sure that gallery2 can return the image
dimensions with the page (php has these functions build in; you do not even require GD or something
like that...
______________________
I made a theme for G2, try it :)

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Tue, 2005-10-11 07:19

*accidentally pressed post comment*

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Tue, 2005-10-11 22:01

Thanks RwD, that Slideshow solution works well. I'll keep the sub-album issue in mind.
Currently working thru the possible solution to the onLoad problem.
How did you get a tiger-print rabbit? (Album in your G2 theme)

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Wed, 2005-10-12 04:44

norv,
There was a guy in the neighbourhood who had a tiger printed female. It wasn't sure
that her offspring would get them too because the father was a plain grey rabbit. But
some of them where the right color but blank, and some where grey. I bought a blank
one and the stripes appeared later on. Where they come from exactly I don't know.
Perhaps a rabbit came too close to a tiger on a sunny afternoon??
______________________
I made a theme for G2, try it :)

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Wed, 2005-10-12 07:35

lol..
I checked out the window.open page you mentioned and tried out a solution..
this is how my theme_photo.tpl looks now

{literal}
  
    <script language="javascript" type="text/javascript"/>
    <!-- hide script from older browsers
   var NS = (navigator.appName=="Netscape")?true:false;
     
   function initFitPic() {
       // quit if this function has already been called
       if (arguments.callee.done) return;

       // flag this function so we don't do the same thing twice
       arguments.callee.done = true;
       
       iWidth = (NS)?window.innerWidth:document.body.clientWidth;
       iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       iWidth = (document.images[0].width - iWidth) + 15;
       iHeight = (document.images[0].height - iHeight) + 20;
       window.resizeBy(iWidth, iHeight);
       self.focus();
   };

   /* for Mozilla */
   if (document.addEventListener) {
       document.addEventListener("DOMContentLoaded", initFitPic, null);
   }

   /* for other browsers */
   window.onload = initFitPic;
   
    // end hiding script from older browsers -->
    </script>

  <style type="text/css">
   /* for Internet Explorer */
   body {behavior: url(loaded.htc);}
  </style>
  
  {/literal}


  </head>
  <body class="gallery">

and loaded.htc simply contains

<component lightweight="true">
<attach event="ondocumentready" onevent="window.initFitPic()">
</component>

but the behaviour is the same as before. Working on it.

 
norv

Joined: 2004-03-12
Posts: 13
Posted: Wed, 2005-10-12 23:50

I've tried testing for focus as in

            if (self.focus()) {
                        alert("self.focus");
                } else {
                        alert("no self.focus");
                }
                if (oNewWindow.focus()) {
                        alert("oNW focus");
                } else {
                        alert("no oNW focus");
                }

                if (window.focus('myPopup')) {
                        alert("myPopup focus");
                } else {
                        alert("no myPopup focus");
                }

no matter where i put the alerts I can't seem to get focus anywhere.

 
Ave

Joined: 2003-05-11
Posts: 19
Posted: Fri, 2005-11-04 14:21

After a happy month with my galley showing popups I was asked to install another gallery with same features in another site. Same server, same PHP, same MySQL, of course. But I installed Gallery 2.0.1, the new version.
Not happens and javascript not appears with 'view source code'. I'm working with this for 7 days. I downloaded all Matrix files from old gallery and uploaded for the new site. I cleaned template cache every time I changed something. I don't have any new idea!!!
The old site: www.lidioparente.fot.br/gallery2
The new site: www.marcelogargaglioneeluismaffei.com/gallery2

 
Darryl Morgan

Joined: 2005-11-10
Posts: 6
Posted: Thu, 2005-11-10 08:54

I've been searching the forums and so far I haven't found a workaround/patch/hack that fits my needs. So I think I'm going to take on what I've found from these various posts and make my own. Basically want the album thumbnail to open up the image at smallest resize. Smallest resize should be clickable (eg. a href) to the fullsize image but this is laoded up in another window. Also the drop down and the fullsize link should open up a new window. It'd be also nice to be able to have in this new window a dropdown that allows you to change the popup image size (eg. alla smugmug style).

 
mstookey

Joined: 2004-10-09
Posts: 4
Posted: Tue, 2005-11-29 18:08

hi,
any luck on this? would love to open large photo in popup.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2005-12-03 17:09

Any particular reason why this doesn't work http://gallery.menalto.com/node/31184#comment-123929
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
markwaldhoff

Joined: 2006-01-26
Posts: 4
Posted: Thu, 2006-01-26 15:29
nivekiam wrote:
Any particular reason why this doesn't work http://gallery.menalto.com/node/31184#comment-123929
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

I tried this, but it doesn't work for me...
please take a look at my site:

http://www.toyotayaris.de/cmsmadesimple/index.php?page=Gallerie2

If you go into the Album:Celica you see some thumbnails and if you click on a thumbnail, the image DON'T open in a new window ! Only if you click on this large image (which don't fit into my frame), a new Window will be opened !
...one Step too late... ;o)

The New Windows should appear if i click on the thumbnail ! how do i get that ?

 
markwaldhoff

Joined: 2006-01-26
Posts: 4
Posted: Fri, 2006-01-27 08:37
Ave wrote:
After a happy month with my galley showing popups I was asked to install another gallery with same features in another site. Same server, same PHP, same MySQL, of course. But I installed Gallery 2.0.1, the new version.
Not happens and javascript not appears with 'view source code'. I'm working with this for 7 days. I downloaded all Matrix files from old gallery and uploaded for the new site. I cleaned template cache every time I changed something. I don't have any new idea!!!
The old site: www.lidioparente.fot.br/gallery2
The new site: www.marcelogargaglioneeluismaffei.com/gallery2

I want it like you did in the old site ! That's fantastic !
What Version of Gallery was the Old one ???
I have Version 2.0.2 and i have the same problem, that javascript does not work (see posting above)...

 
MichielM

Joined: 2004-08-16
Posts: 15
Posted: Fri, 2006-02-24 23:15

Hi! I have the same problem, the javascript does not work anymore with 2.0.2...
I would also still like to have icons that allow you to navigate to the next/previous image.

 
MichielM

Joined: 2004-08-16
Posts: 15
Posted: Sun, 2006-02-26 17:44

Just found out that you can vote to get this feature:
http://gallery.menalto.com/sfvote/all
The ID is 647528: [G2] Individual Images in Pop-up Window

 
lampster

Joined: 2006-11-16
Posts: 36
Posted: Wed, 2007-01-31 02:20

I'm using the Carbon template. The above doesn't seem to apply. Is there a solution for Carbon?

I've looked at the album.tpl and have attempted to change the following with "taget=blank"

<div>
{if isset($theme.params.$frameType) && isset($child.thumbnail)}
{g->container type="imageframe.ImageFrame" frame=$theme.params.$frameType
width=$child.thumbnail.width height=$child.thumbnail.height}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}">
{g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail"}
</a>
{/g->container}
{elseif isset($child.thumbnail)}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" target="blank">
{g->image item=$child image=$child.thumbnail class="giThumbnail"}
</a>
{else}
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}" class="giMissingThumbnail" target="blank">
{g->text text="no thumbnail"}
</a>
{/if}
</div>

Gallery version = 2.1.2 core 1.1.0.2
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 Ope