dd/evolutioncms-plugins-managermanager-mm_widget_showimagetvs

There is no license information available for the latest version (1.3.0) of this package.

A widget for ManagerManager plugin that allows the preview of images chosen in image TVs to be shown on the document editing page.

1.3.0 2020-11-01 11:43 UTC

This package is auto-updated.

Last update: 2024-05-09 23:28:49 UTC


README

A widget for ManagerManager plugin that allows the preview of images chosen in image TVs to be shown on the document editing page.

Emulates the ShowImageTVs plugin, which is not compatible with ManagerManager.

Requires

Documentation

Installation

To install you must unzip the archive to /assets/plungins/managermanager/widgets/showimagetvs/.

You may also read this documentation:

Parameters description

  • $params

    • Desctription: Parameters, the pass-by-name style is used.
    • Valid values:
      • stdClass
      • arrayAssociative
    • Default value: []
  • $params->fields

    • Desctription: The names of TVs for which the widget is applied.
    • Valid values:
      • stringCommaSeparated
      • '' — empty value means the widget is applying to all TVs
    • Default value: ''
  • $params->maxWidth

    • Desctription: Preferred maximum width of the preview.
    • Valid values: integer
    • Default value: 300
  • $params->maxHeight

    • Desctription: Preferred maximum height of the preview.
    • Valid values: integer
    • Default value: 100
  • $params->thumbnailerUrl

    • Desctription: If you have PHPThumb installed (for example through Maxigallery or phpthumb plugins/snippets), use this to make thumbnails rather than resizing the image previews via CSS.
      Particularly useful if you are using very large pictures, which would take a long time to download.
    • Valid values: string
    • Default value: —
  • $params->roles

    • Desctription: The CMS user roles that the widget is applied to.
    • Valid values:
      • stringCommaSeparated
      • '' — when this parameter is empty then widget is applied to the all roles
    • Default value: ''
  • $params->roles[i]

    • Desctription: CMS user role.
    • Valid values: integer
    • Required
  • $params->templates

    • Desctription: Document templates IDs for which the widget is applying to.
    • Valid values:
      • stringCommaSeparated
      • '' — empty value means the widget is applying to all templates
    • Default value: ''
  • $params->templates[i]

    • Desctription: Templates ID.
    • Valid values: integer
    • Required

CMS events

  • OnDocFormPrerender
  • OnDocFormRender

Examples

Add an image preview to every image-type template variable

mm_widget_showimagetvs();

Add a 150 × 150 px image preview to every image-type template variable

mm_widget_showimagetvs([
	'maxWidth' => 150,
	'maxHeight' => 150
]);

Add an image preview to the mypic template variables in template 2, resized to 300 × 200 px using phpthumb at the URL supplied

mm_widget_showimagetvs([
	'fields' => 'mypic',
	'maxWidth' => 300,
	'maxHeight' => 200,
	'thumbnailerUrl' => '/assets/snippets/phpthumb/phpThumb.php',
	'templates' => '2'
]);

Links