NP_PopupImageNetPBM.php

This plugin works like the original PopupImage plugin: it creates inline images with an automatically generated thumbnail and a popup link to the full version. Thumbnails will automatically be stored in the media directory of your blog. If deleted, they will be regenerated the next time somebody tries to look at an item containing an image. You can force an update of your thumbnails simply deleting them.

I've assembled this modification of PopupImage plugin of Till Gerken. While the original plugin use ImageMagick this one works with the NetPBM library, a GPL package that convert from one graphics format to another and do simple editing and analysis of images. The NetPBM library can be installed in any Virtual Host because you don't need to be root for install the precompiled package. Precompiled NetPBM library for many systems are available at the website of Gallery, the famouse image gallery software.

Since 0.8, a new Image (note _I_) skinVar mode is added (by admun). This provides a non-intrusive thumbnail function (against build-in image and popup skinVar). A admin menu is also added to flush the thumbnail.

General Plugin info
Current Version: v0.12
Download: here or here
Code: n/a
Demo: n/a
Forum Thread: here

Install Procedures

  • Install netpbm
  • Download and install plugin
  • Change the plugin options (must at least change “Path to NetPBM” and “URL to media dir”)
  • Change template (if Image mode is not used)

See the following sessions for each step

Installing the NetPBM package

Download precompiled NetPBM library for your system.

Extract and upload in a directory of your webspace at least this eight subset of precompiled NetPBM library:

  1. jpegtopnm
  2. pnmscale
  3. ppmtojpeg
  4. giftopnm
  5. ppmtogif
  6. pngtopnm
  7. ppmquant
  8. pnmtopng

Simply upload these files in your root_dir or in any other dir available from the webserver.

Installing the plugin

  1. Download the package (see above)
  2. Extract the zip file called
  3. Upload all files to the plugin directory of your Nucleus installation.
  4. From Admin Control Panel switch to the plugins section and at the end of the page choose to install the plugin

Modify Template (Not needed for Image skinVar)

For the popup links to be rendered correctly, you need to change the following settings in your templates (both templates for main page and item page):

Popup Link Code:

<a href="<%rawpopuplink%>" onclick="<%popupcode%>">

Inline Image Code:

<%image%></a>

How to use the plugin

If Image mode is disable (and the template has changed), all <%image%> will be rewrite as a thumbnail with thumbnail.

If Image skinvar mode is used, in order to insert an image in a post:

  • add the image as inline as before
  • change the “image” skinvar to “Image” manually after insert the image.

The skinvar has the following format: <%Image(filename|popupX|popupY|thumbX|thumbY|comment)%>, left the parameter blank if no value is provided. ie <%Image(file.jpg|1024|768|||my pic)%> (use default thumbnail size)

Tips and Tricks

For advance user only, see the plugin code header for info how to automatically insert the Image tag (need modify to core code…)

Credits

PopupImagenetPBM is based on:

– Roberto, mod by Edmond Hui (admun)

Alternative Plugins

Plugin review

NP_PopupImageNetPBM version 0.12 works with Nucleus CMS 3.31 - 2007-10-29 admun

popupimagenetpbm.txt · Last modified: 2007/10/29 16:42 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki