Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

ImgPopUp

Summary: Extension to image uploading
Version: 1.2.7 (2005-10-02)
Prerequisites: Requires at least PmWiki version: 2beta; last tested on PmWiki version: 2b55
Status:
Maintainer:
Categories: Images

Goal

  • Scale down the view of images wider than certain width
  • Open the scaled down image in a new window
  • Provide an upload link for already uploaded images
  • No new markup or clutter by additionaly generated (thumbnail) files

Install

  1. download imgpopup.phpΔ
  2. in your config file include the imgpopup.php:
    include_once("$FarmD/cookbook/imgpopup.php");

Under the scaled images is a link to the the pop up window. You can also add a magnifier image by putting magnifier.png into pub/cookbook/imgpopup. You can download magnifier.png and test this cookbook here.

Optional Parameters

$ImgPopUpMaxImgWidth = 200
sets the max. image width in pixel
$ImgPopUpSkinDirUrl = "cookbook/imgpopup"
sets the directory for the magnifier image to "/pub/cookbook/imgpopup"
$ImgPopUpProvideUploadLink = true
sets if a upload link should be provided in the popup
$ImgPopUpNoZoomLink = false
sets if a Zoom Image link is shown under the scaled down image
$ImgPopUpIgnoreUnscaledImages = false
sets if unscaled images get a link to a popup window
$ImgPopUpSameWindow = false
sets if the zoomed image is shown in a new or the same window
$ImgPopUpShowZoomLinkTreshold = 1.0
sets a treshold before a zoom link is provided to prevent images only a few pixels larger than $ImgPopUpImgWidth to get zoomed. This value is multiplied with $ImgPopUpMaxImgWidth.

Usage

You can use (:ImgPopUpNoZoomLink:) to hide the Zoom Image links on a side.

Notes

Note: The preview of the images are only scaled down by CSS. So you have to load the full image. That increases load times on pages with many/huge images or if you on a slow internet connection. On the over hand your browser has cached the image allready when you want to view it in full size.

Known Problems/Bugs

Development

imgpopup_archive.zipΔ

Comments

Hello, I like the idea behind this recipe, but the result is not good. When I click on a attached and uploaded image, the result is that I'm asked to upload the image again; i don't get to see the big image. It seems to me that for the link to the image the pageURL is used instead of the uploadURL. Grtz, Han, sept 30 at 20.48 CET

Can you give some more informations? It should work out of the box with PmWiki. First try to outcomment (step by step) other cookbooks you included to make shure that no other cookbook script is interfering. If it does not work please tell me if you use a special $UploadPrefixFmt and provide a link to your wiki if possible. -- Schlaefer October 01, 2005, at 01:48 AM

1 oktober, 17.55CET Other cookbook recipes are not the problem. I use $UploadPrefixFmt = '/$FullName'; and $WikiDir = new PageStore('wiki.d/$Group/$FullName');. This stores uploads in a directory per page, not per group. I have changed $UploadPrefixFmt to '/$FullName' in Imagepopup.php. But the result is: zero.

The link I get on the image in the pop-up window is http://julian.local/palimpsest/index.php/Site/WikiSandbox?action=download&upname=jazz.jpg. Sorry, it is an intranet site. Thanks, Han

I can't see the problem at the moment. The link seems correct and if there is a picture at http://julian.local/palimpsest/index.php/Site/WikiSandbox?action=download&upname=jazz.jpg it should be shown by PmWiki. -- Schlaefer October 02, 2005, at 07:05 AM

In the popup window the image displays but with the same size as in the original page (200px wide). Han, 2 okt, 22.59 CEST

Can you confirm that the browser URL is http://julian.local/palimpsest/index.php/Site/WikiSandbox?action=imgpopup?image=jazz.jpg or http://julian.local/palimpsest/index.php/Site/WikiSandbox?action=imgpopup&image=jazz.jpg -- Schlaefer October 02, 2005, at 04:47 PM

Yes the URL is correct. I think the problem is in the HTML styles. My masthead is in the popup window also reduced to 200px wide. I have experimented quit a bit, but haven't located the cause of the problem (so far). Thanks, Han 3 okt 10.54 CEST

I encountered the same Problems. When I press the "Zoom Image" Button, a new Window popps up but only a link gets displayed: http://tinyglobe.homelinux.com/pmwiki/pmwiki.php?n=Main.WikiSandbox?action=imgpopup&image=background.gif(approve links) anny suggestions? It would be nice, cause I realy like this plugin! Greetings, Rene 05.10.2006

See Also

Contributors

Edit - History - Print - Recent Changes - Search
Page last modified on March 28, 2008, at 05:57 AM