dd / evolutioncms-plugins-managermanager-mm_widget_showimagetvs
A widget for ManagerManager plugin that allows the preview of images chosen in image TVs to be shown on the document editing page.
Maintainers
Details
github.com/DivanDesign/EvolutionCMS.plugins.ManagerManager.mm_widget_showimagetvs
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 1
Language:JavaScript
Requires
- php: >=5.4.0
- dd/evolutioncms-plugins-managermanager: >=0.7.0
This package is auto-updated.
Last update: 2024-12-06 07:18:30 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
- PHP >= 5.4
- (MODX)EvolutionCMS.plugins.ManagerManager >= 0.7
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: —
- 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.
-
$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' ]);