All Projects → justb3a → processwire-imageextra

justb3a / processwire-imageextra

Licence: MIT license
This module allows you to add additional informations to an image (for example: title, description, link, orientation and any field you may need).

Projects that are alternatives of or similar to processwire-imageextra

MetaCPP
C++ Reflection & Serialization using Clang's LibTooling
Stars: ✭ 44 (+120%)
Mutual labels:  metadata
database-metadata-bind
A library for binding information from java.sql.DatabaseMetadata
Stars: ✭ 17 (-15%)
Mutual labels:  metadata
Islandora-Metadata-Interest-Group
The purpose of the Islandora Metadata Interest Group (IMIG) is to investigate and provide metadata solutions that help improve metadata creation, maintenance and enhancement in Islandora.
Stars: ✭ 29 (+45%)
Mutual labels:  metadata
dirdf
R package: dirdf - Extracts Metadata from Directory and File Names
Stars: ✭ 57 (+185%)
Mutual labels:  metadata
ome-types
native Python dataclasses for the OME data model
Stars: ✭ 28 (+40%)
Mutual labels:  metadata
Crema
Meta data server & client tools for game development
Stars: ✭ 61 (+205%)
Mutual labels:  metadata
js-coalaip
Javascript implementation for COALA IP
Stars: ✭ 18 (-10%)
Mutual labels:  metadata
wheelfile
🔪🧀 API for creating and inspecting Python .whl files (wheels).
Stars: ✭ 22 (+10%)
Mutual labels:  metadata
ProcessGraphQL
GraphQL for ProcessWire
Stars: ✭ 97 (+385%)
Mutual labels:  processwire
sqllineage
SQL Lineage Analysis Tool powered by Python
Stars: ✭ 348 (+1640%)
Mutual labels:  metadata
metadata-xml-tool
CLI tool for processing Salesforce Metadata XML files
Stars: ✭ 14 (-30%)
Mutual labels:  metadata
nts
NTS Radio downloader and metadata parser
Stars: ✭ 58 (+190%)
Mutual labels:  metadata
graphql-ts
Graphql implementation in Typescript using decorator
Stars: ✭ 63 (+215%)
Mutual labels:  metadata
pyexiv2
Read/Write metadata(including EXIF, IPTC, XMP), comment and ICC Profile embedded in digital images.
Stars: ✭ 120 (+500%)
Mutual labels:  metadata
oblivion
The Oblivion masterlist.
Stars: ✭ 16 (-20%)
Mutual labels:  metadata
roda-in
Tool to create Submission Information Packages (SIP)
Stars: ✭ 18 (-10%)
Mutual labels:  metadata
oge
Page metadata as a service
Stars: ✭ 22 (+10%)
Mutual labels:  metadata
metamapper
Metamapper is a data discovery and documentation platform for improving how teams understand and interact with their data.
Stars: ✭ 60 (+200%)
Mutual labels:  metadata
metadata-standards-description-language
Service Design & Assurance Metadata Standards: A language to describe spreadsheets and an implementation that extracts and validates the data.
Stars: ✭ 13 (-35%)
Mutual labels:  metadata
react-native-xaml
A React Native Windows library to use XAML / WinUI controls
Stars: ✭ 55 (+175%)
Mutual labels:  metadata

WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

ProcessWire ImageExtra

Designed for use with ProcessWire 3.x

About

This module allows you to add additional informations to an image (for example: title, description, link, orientation and any field you may need).

Usage

For each instance of an image field the field settings will be extended. Navigate to Admin > Setup > Fields and edit the desired field. Click on the Input Tab and click on the "Image Extra Fields ..." area. It extends downwards and reveals a form to set up additional custom fields.

The following fields are available by default:

  • description - image description (core)
  • disable multi language description
  • orientation - image orientation
  • orientation values - values to use as class names or identifiers for different image orientations
  • link - image link to internal pages
  • other fields - here you can add any other field by writing it (separated by comma)

For each of the activated custom fields an own column in the specific table will be created.
As soon as you added any custom field(s), a table containing all fields appears below. You can set here a textformatter (e.g. Markdown, Paragraph Stripper, ..) as well as a label text (multi-language) for each field - if you want to. The textformatters have to be installed before.

Caution: Just removing a custom field will not erase it, due to data persistence. If you really don't need it anymore you have to delete the column manually.

After having added some custom fields to an image field, edit a page which has a template containing this field. Below each image you get some additional config fields - and for sure it provides multi language support.

Accessing the values

This is no different than accessing the value of any other field.

$image = $page->image->getRandom();
echo $image->caption;
echo $image->location;
echo $pages->get($image->link)->url;
echo $image->getExtraLabel('location') . ': ' . $image->location;

Get extra field label

// outputs something like: "Location: Munich"
echo $image->getExtraLabel('location') . ': ' . $image->location;

// outputs something like: "Ort: München"
echo $image->getExtraLabel('location', 'de') . ': ' . $image->location;

Setting the values

From the API side you can set the values like this:

$page->setOutputFormatting(false);
$page->images->trackChange('title');
$image = $page->images->getRandom(); // or whatever image you want
$image->title = 'Title in default language';
$image->title($languages->get('fi'), 'Title in Finish');
$image->title($languages->get('de'), 'Title in German');
$page->save();
$page->setOutputFormatting(true);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].