Would it be possible to make it so you can open the original image in a popup window or by itself in a new window?
im sure its an easy fix.

Reason i ask is because im trying to keep all images within the site theme a certain size, if they select original it just explodes outside the webpage limits. Looks bad.

Thanks! Neg

Comments

Bèr Kessels’s picture

Component: Code » image.module

This should be done in your theme, definately not in the image module.

judah’s picture

I have a need for this too, theme problems aside. Is there a reason it can't be added in the module?

I'm thinking of an option that when enabled wraps the image in a <a href='%myimage' target='%target' >image goes here<a/>

As long as I'm wishing, enabling for certain paths would be a nice complimentary feature.
And a href override that launches a javascript call href="javascrpt:openWindow('%image', params...)".

Please don't close this. I think that if it is not done I will get to it eventually.

jhriggs’s picture

Note that the target attribute is not xhtml-compliant.

Anonymous’s picture

judah: The old bloated image.module has been replaced by a new compact version written by walkah. AFAIK, the old image.module (4.5 and earlier) is no longer being developed.

The sort of functionality you are suggesting should be implemented as a plug-in module for the new image.module. It SHOULD NOT be added to the image.module itself. The goal is to keep a small module with minimal functionality so that site admins can enable a series of modules that reflect the exact functionality they need.

That said, this wouldn't be a difficult add-on module to build.

Bèr Kessels’s picture

again: this must be done in your theme.

Its really easy to do so, and very correct.
Themes are there to help you solve (little) presentational issues. Site specific issues. Yours definately is site specific.

Please close this issue again (?!)

judah’s picture

Ber: I see what you are saying. This are saying I see that it should be in an add on module or theme change. I do not like hardcoding this into my theme so we will probably be seeing this feature in an add on module. Cheerio my good chaps.

mgifford’s picture

Status: Closed (fixed) » Active

Hi Bèr,

Although I do believe you in that there is a trivial way to do this. I can't seem to find any documentation for it.

If it's trivial in 4.6 (note that the references above are for 4.5) please include a link, or sample code to stick into some theme to produce the desired results.

My guess would be that in node.tpl.php you'd insert your javascript somewhere here:

But $links has text like this:
view original

Just kinda annoying that a simple solution isn't posted before this item is closed.

Mike

Bèr Kessels’s picture

Status: Active » Closed (fixed)

If you re-open an issue, please provide either correct information (version, etc) and a good reason for doing so. Simply stating that "there is no solution posted" is not enough.
Especially if there are solutions posted.

electronicsunset’s picture

Has the issue of how to get an original image size into a pop-up window been worked on or a solution found?

At the moment it appears there no option for clicking on a small image and seeing a user specified (or original image file) in a popup window. this surely seriously limits alot of people that are displaying image content?

Is this the right place to ask too (new here)

cheers

K

benthere’s picture

Create a template.php file in your theme, then copy theme_image_gallery from image_gallery.module (in the contrib folder of Image module), and rename the function "phptemplate_image_gallery" and paste it in template.php. Comment out the code that I did below, and add the rest of it. That should be close to what you want. Add some JS if you want.


/* $content .= '<h3>'.l($image->title, 'node/'.$image->nid)."</h3>"; */
$attributes['target'] = '_blank';
$content .= l(image_display($image, 'thumbnail'), file_create_url($image->images['_original']), $attributes, NULL, NULL, FALSE, TRUE);

benthere’s picture

Actually, you don't need to comment that out.

Just change this line (260 in image_gallery.module) in your template.php.


$content.= l(image_display($gallery->latest, 'thumbnail'), 'image/tid/'.$gallery->tid, array(), NULL, NULL, FALSE, TRUE);