MODX 3 component

Gallery3x

Image, video and file galleries for MODX 3 resources

22 pages6 sections55 min in total

Contents

Snippets5

05Gallery3xThe [[!Gallery3x]] snippet outputs gallery images. It does not create thumbnails — it uses the ready URLs, so it is fast.06Gallery3xVideosA snippet for video galleries from various services: Rutube, YouTube, VK, Vimeo, Dailymotion, Coub, OK.ru, Yandex Dzen, Kinescope.07Gallery3xMixedThe [[!Gallery3xMixed]] snippet outputs the images and videos of one resource together — as one list or by group. The default chunk is written in…08Gallery3xFilesA snippet that outputs a resource's file attachments on the front end. It shows files uploaded in the “Files G3x” tab of the MODX resource editor.…09Gallery3xEmbedsStarting with version 3.2.1, Gallery3x ships the [[!Gallery3xEmbeds]] snippet, which outputs embedded objects (embeds) on site pages — maps, widgets,…

Examples4

11LightgalleryTwo lightGallery 2.x views are included: an inline carousel and simple thumbnails.12FancyboxReady-made chunks for Fancybox (loaded from a CDN). Live examples are on the demo site demog3x.ivan345.com.13pdoResourcesA list of resources (a catalogue, articles) with the first gallery image of each. The image is joined in the pdoResources query, and the g3xGetImage…14Collections integrationHere is how to show a thumbnail of the first Gallery3x image right in the child resources grid of the Collections component.

Command line (CLI)3

15regenerate.phpGallery3x console scripts are run over SSH from the site root (next to the core folder). They are not available over HTTP (403).16import_ms2gallery.phpThe script moves images from ms2Gallery (MODX 2) to Gallery3x. The ms2Gallery package may already be removed — only its <prefix>ms2_resource_files…17clear_by_template.phpThe script deletes all Gallery3x content of all resources with the given template: images with thumbnails, file attachments, videos with covers,…

For developers3

18Database structureFour tables; the xPDO classes are in the Gallery3x\Model namespace. The component loads the package itself, so in your code…19Groups (tags) for imagesStarting with version 3.0.17, Gallery3x supports grouping images with groups (tags). One image can have several groups at once, which lets you…20Custom groups processorThe list of groups in the edit windows (images, videos, files, embeds) and in the editor insert window comes from the processor set in…

API integrations1

21API VK.comVK no longer grants API access to new applications. The integration is kept for sites that already have access.

Gallery3x: galleries in the visual editor1

22Inserting galleries in the visual editorGallery3x adds an “Insert from gallery” button to the MODX visual editor. It opens a window for choosing images of the current resource and inserts a…