Great Ocean Media
website design - editorial & pr services - freelance journalism

adi_image_tab – Enhanced image tab

This plugin provides enhancements to the standard TXP Image Edit tab as well as some new tags.

Additional image information displayed

Navigation

Dropdown menus are provided to help speed up access to images:

Tab behaviour

Tab behaviour is changed so that:

Functionality

Additional functionality in the Image Edit tab:

Keywords

The plugin provides a new field for keywords. Enter a comma-separated list of keywords which can be utilised by new tags adi_image_keywords & adi_image_if_keywords.

Tags

To go with the new keywords field some extra tags are provided, as well as some tags to display additional image information. See below.

Image resize

The plugin enables you to resize images (dimensions and/or file size) during the upload process. This saves having to adjust image dimensions or file size locally on your computer before uploading.

To enable this functionality, go to adi_image_tab options in the Plugins tab and set the Enable image resize preference to “Yes”. Once this is done, you’ll be nagged to create a new writable directory (adi_image_tab/originals/) in the website images directory. Create the directory and click “Refresh page” to make sure the warnings disappear.

In the “Image Resize” tab under Extensions, a number of image resize sets can be specified. Enter a name, a maximum dimension (in px) and/or a maximum file size (in KB). On installation, an example Image resize set called “Gallery” is provided. This defines a maximum dimension of 640px and a maximum file size of 50KB.

When images are uploaded, the user is now prompted to select a resize set:

Image dimension and file size are optional in a resize set, although at least one must be provided.

Images can be re-resized from the Image Edit tab by clicking the Resize image button. If you want to restore the image to it’s original unchanged state, select “Restore original image”.

Notes & limitations:

Tags

Some new tags are available, all of which should be used within <txp:images /> container tags.

adi_image_keywords

This displays a simple comma separated list of keywords associated with the current image. No attributes.

adi_image_if_keywords

This is a conditional tag to detect whether the image has keywords or not.

<txp:adi_image_if_keywords>
	IMAGE HAS KEYWORDS
<txp:else />
	NO KEYWORDS FOR IMAGE
</txp:adi_image_if_keywords>
<txp:adi_image_if_keywords keywords="key1">
	IMAGE HAS KEYWORD KEY1
</txp:adi_image_if_keywords>

adi_image_if_keywords – attributes

keywords="keyword list"

- comma separated list of keywords to be checked. Default = “” (any keyword).

This tag generates a direct download link for the current image. By default the link text is the image name. Use the tag in container mode for custom link text. No attributes.

<txp:adi_image_download_link />
<txp:adi_image_download_link>my link text</txp:adi_image_download_link>

adi_image_filesize

This displays the size of the original image file, associated with current image. If the image hasn’t been resized, the size output will be for the database linked image. No attributes.

adi_image_imagesize

By default, this displays the dimensions of the original image file. Use original="0" to display resized image dimensions.

ORIGINAL IMAGE DIMENSIONS <txp:adi_image_imagesize />, RESIZED TO <txp:adi_image_imagesize original="0" />

adi_image_imagesize – attributes

original="boolean"

- choose original or resized version. Default = “1” (original version).

Usage

After installing & activating the plugin, select the image you wish to edit from the Images list tab as normal. Image resize functionality can be switched on in the plugin Options tab.

Installation notes

Plugin options

Textpack

To install the Textpack, go to the plugin’s Options tab and click on “Install textpack”. This will copy & install it from a remote server. The number of language strings installed for your language will be displayed.

If the Textpack installation fails (possibly due to an error accessing the remote site), the alternative is to click the Textpack also available online link. This will take you to a website where the Textpack can be manually copied & pasted into the TXP Admin – Language tab.

Additions and corrections to the Textpack are welcome – please use the Textpack feedback form.

Additional information

Support and further information can be obtained from the Textpattern support forum. A copy of this help is also available online. More adi_plugins can be found here.


adi_image_tabv0.4.2Download (Uncompressed) Textpack SupportTXP 4.7+

Other versions available: 0.2 (TXP 4.5 only)