Skip to content
  1. Extras
  2. mixedImage

mixedImage

Adds a new TV type: mixed file upload.

  • Pick file from file manager
  • Pick file from computer, bypassing file manager
  • Image and video preview (HTML5 video player)
  • Physical file deletion when clearing the field
  • Resize via phpthumb on image upload
  • Upload by URL
  • Drag-and-drop

mixedImage

System settings

NameDefaultDescription
Upload only when editingYesAllow uploads only when editing the resource
File transliterationNoAvoid issues with Cyrillic file names on some hosts
{rand} placeholder length6Used when TV field uses {rand} as filename prefix

TV field settings

SettingDefaultDescription
Save path-Subfolder path (relative to media source root)
Filename prefix-Prefix when saving. Options: {id}, {pid}, {alias}, {context}, {tid}, {uid}, {rand}, {t}, {y}, {m}, {d}, {h}, {i}, {s}. Multiple allowed
Accepted MIME types-Restrict by MIME, e.g. image/jpeg, image/png, application/pdf
Use prefix as filenameNoReplace uploaded filename with prefix
Show previewYesThumbnail for images, video player for mp4
Delete fileNoPhysically delete file when clearing the field
Image resize params-Phpthumb params on upload, e.g. w=200&h=200&zc=1. Watermark: fltr=wmt|Hello|60|C|ff0000| or fltr=wmi|/assets/wt.png|C|
Button listclear,manager,pcValues: clear, manager, pc, url

Buttons

NameDescription
clearClear field. If Delete file is Yes, file is removed from server
managerPick file from media manager
pcPick file from user's computer, bypassing MODX file manager
urlUpload file by URL

Placeholders

NameDescription
{id}Resource ID
{pid}Parent resource ID
{alias}Resource alias
{palias}Parent alias
{context}Context key
{tid}TV ID
{uid}User ID
{rand}Random string (length in system settings)
{t}Timestamp
{y}Year
{m}Month
{d}Day
{h}Hour
{i}Minute
{s}Second