diff --git a/docs/_images/cp-channel-new-field.png b/docs/_images/cp-channel-new-field.png new file mode 100644 index 000000000..e7ef96d49 Binary files /dev/null and b/docs/_images/cp-channel-new-field.png differ diff --git a/docs/control-panel/channels.md b/docs/control-panel/channels.md index c5e079300..5b7e813fa 100755 --- a/docs/control-panel/channels.md +++ b/docs/control-panel/channels.md @@ -51,6 +51,8 @@ The Fields tab contains the channel's field and field group assignments. A channel can have any combination of fields and field groups assigned to it. You can also create fields and field groups on this tab, for a smooth workflow. + + --- ### Categories tab diff --git a/docs/control-panel/create.md b/docs/control-panel/create.md index c1e7a7a4e..ddfbddbf5 100755 --- a/docs/control-panel/create.md +++ b/docs/control-panel/create.md @@ -15,7 +15,7 @@ This is the area where you'll create content for your site by publishing new Entries to your Channels. If you have more than one Channel, moving your cursor over the Publish menu will show all of your Channels and allow you to select one. -TIP: **Tip:** Site builders can customize the display of the Publish Page on a per Channel bases by creating a custom layout. Just go to the [Channel manager](control-panel/channels.md) and click 'layouts' to access the [Form layout](control-panel/channels.md#form-layouts). +TIP: **Tip:** Site builders can customize the display of the Publish Page on a per Channel bases by creating a custom layout. Just go to the [Channel manager](control-panel/channels.md) and click 'layouts' to access the [Publish Layouts](control-panel/channels.md#publish-layouts).  @@ -39,15 +39,18 @@ NOTE: **Note:** If you let the system create your URL Title for you it will conv ### Entry Fields -The names and types of entry fields displayed will be determined by what [Fields](control-panel/field-manager/field-manager-settings.md) you have defined for this channel. If an entry field is set to be "hidden" by default, it will have to be expanded by clicking on the field name before content can be entered. +The names and types of entry custom fields displayed will be determined by what [Fields](/fieldtypes/overview.md) you have defined for this channel. -### Save Revision +If an entry field is set to be "hidden" by default, it will have to be expanded by clicking on the field name before content can be entered. -Allows the content editor to force a revision save. +The fields can be [conditionally hidden](control-panel/field-manager/conditional-fields.md). -### Submit +In order for the field to be available when publishing or editing an entry, it needs to be assigned to the channel the entry is in. + +This can be done in two ways: +- assign custom field to a [Field Group](/control-panel/field-manager/field-manager-settings.md#createedit-field-group) which is associated to the Channel +- assign field directly to channel by editing [Channel preferences](control-panel/channels.md#fields-tab) -The Submit button allows you to save the entry and publish it to your site. ## Date Tab diff --git a/docs/development/fieldtypes/enhanced.md b/docs/development/fieldtypes/enhanced.md index ddbe527af..2617bdc5b 100644 --- a/docs/development/fieldtypes/enhanced.md +++ b/docs/development/fieldtypes/enhanced.md @@ -239,6 +239,16 @@ Possible return values are: - `'text'` - shows text input - `'select'` - shows select input populated with the field options (for fieldtypes that extend `OptionFieldtype`) +## File Manager support + +When a file is referenced inside content, it can be in two different forms depending on if the file manager is running in compatibility mode or not. An example of this is when a file is chosen inside an RTE field via the filepicker. If the file manager is not running in [compatibility mode](control-panel/file-manager/file-manager.md#compatibility-mode), the file references in content will contain a file ID (e.g. `{file:123:url}` where 123 is the file ID). The file can also be referenced in content with a directory ID and file name (e.g. `{filedir_2}filename.jpg`) when in compatibility mode. + +To parse both cases correctly, please use the `ee()->file_field->parse_string()` function. + + ee()->load->library('file_field'); + $data = ee()->file_field->parse_string($data); + +If the fieldtype is using custom JavaScript for manipulating the files, be sure to make the code aware of the [`EE.fileManagerCompatibilityMode`](development/control-panel-js/globals.md#filemanagercompatibilitymode) variable. ## Implementing Filepicker for Rich Text Editor diff --git a/docs/development/models/file.md b/docs/development/models/file.md index a442f59c2..f123aff5f 100644 --- a/docs/development/models/file.md +++ b/docs/development/models/file.md @@ -13,29 +13,40 @@ lang: php # File Model -**class `ExpressionEngine\Model\File\File`** +In ExpressionEngine 7 the `File` model is inheriting `FileSystemEntity` model, which is also parent of `Directory` model. They share same properties and most of the methods; different models are being used when there is need to distinguish between file and subfolder. + +We recommend using `FileSystemEntity` when you need everything that is in certain Upload Directory, and use `File` or `Directory` when working specifically with files or folders within Upload Directory. When saving, the exact model (`File` or `Directory`) always needs to be used. + +## `FileSystemEntity` + +**class `ExpressionEngine\Model\File\FileSystemEntity`** [TOC] -## Properties - -- `file_id` Key -- `site_id` -- `title` -- `upload_location_id` -- `mime_type` -- `file_name` -- `file_size` -- `description` -- `credit` -- `location` -- `uploaded_by_member_id` -- `upload_date` -- `modified_by_member_id` -- `modified_date` -- `file_hw_original` - -## Relationships +### Properties + +| Name | Validation | Type | Description | +| ------------------- | -------------------- | ---------- | --------------- | +| `file_id` Key | | | Primary ID of file or subfolder | +| `site_id` | | | MSM site ID, default is 1 | +| `title` | `xss` | | Title (can be different from file name, often used for alt text) | +| `upload_location_id`| | | ID of Upload Directory that the file is in | +| `directory_id` | | | Sobfolder ID, if file is in subfolder | +| `mime_type` | | | Registered MIME type for the file. | +| `file_type` | | | File type. The built-in types are Image / Document / Archive / Audio / Video | +| `file_name` | | | Name of file on filesystem | +| `file_size` | | | File size | +| `description` | `xss` | | Description | +| `credit` | `xss` | | Credits | +| `location` | `xss` | | Location where the photo was made | +| `uploaded_by_member_id`| | | ID of member who initially uploaded the file | +| `upload_date` | | | Date when file was initially uploaded | +| `modified_by_member_id`| | | ID of member who made last modification to the file | +| `modified_date` | | | Date when file was modified last time | +| `file_hw_original` | | | Height and width of the file when it was originally uploaded | +| `total_records` | | | Number of times the file is being used in entries & categories | + +### Relationships #### `UploadDestination` @@ -57,23 +68,130 @@ Selected categories the file has. The site the file is apart of. +#### `FileCategories` + +Categories that are using this file as category image + +#### `FileEntries` + +Entries that are using this file + ## Methods -- `isImage` -- `isEditableImage` -- `isSVG` -- `getAbsolutePath` -- `getAbsoluteThumbnailPath` -- `getAbsoluteURL` -- `getAbsoluteThumbnailURL` -- `memberHasAccess` -- `exists` -- `isWritable` -- `setCategoriesFromPost` +#### `isFile()` + +Returns `true` is entity is `File`, `false` otherwise + +#### `isDirectory()` + +Returns `true` is entity is `Directory` (subfolder), `false` otherwise + +#### `isImage()` + +Uses the file's mime-type to determine if the file is an image or not. + +#### `isEditableImage()` + +Uses the file's mime-type to determine if the file is an editable image or not. + +#### `isSVG()` + +Uses the file's mime-type to determine if the file is an SVG or not. + +#### `getFilesystem()` + +Get Filesystem object for the file's Upload Directory + +#### `getSubfoldersPath()` + +Get the subfolder path to the given file + +#### `getBaseServerPath()` + +Get base server path for file's upload location + +#### `getBaseUrl()` + +Get base url for upload location and folder + +#### `getAbsolutePath()` + +Get abolute path to the file on the filesystem + +#### `getAbsoluteManipulationPath($manipulation = 'thumbs')` + +Get absolute path to the file's pre-manipulated version on the filesystem. Accepts manipulation name as parameter + +#### `getAbsoluteThumbnailPath()` + +Uses the file's upload destination's server path to compute the absolute thumbnail path of the file -## Events +#### `getAbsoluteURL()` + +Uses the file's upload destination's url to compute the absolute URL of the file + +#### `getAbsoluteManipulationURL($manipulation = 'thumbs')` + +Get URL for pre-manupuilated file version. Accepts manipulation name as parameter + +#### `getAbsoluteThumbnailURL()` + +Get URL of file's thumbnail + +#### `getThumbnailUrl()` + +Alias of `getAbsoluteThumbnailURL` + +#### `deleteOriginalFile()` + +Deletes the original file + +#### `deleteGeneratedFiles()` + +Deletes the file's manipulated versions + +#### `deleteAllFiles()` + +Deletes the original file and all of its manipulated versions + +#### `memberHasAccess(Member $member)` + +Determines if the member has access permission to file's upload destination. + +#### `exists()` + +Determines if the file exists + +#### `isWritable()` + +Determines if the file or subfolder is writable + +#### `getChildIds()` + +Get an array of IDs for files and folders that belong to this `FileSystemEntity` + +#### `actLocally(callable $callback)` + +Perform some action on the file in a local context + +### Events - `beforeDelete` +- `beforeInsert` +- `beforeSave` + +## `File` + +**class `ExpressionEngine\Model\File\File`** + +Represents a file. Child of `FileSystemEntity` and is sharing all of it's properties and methods. +Defines some extra necessary + +## `Directory` + +**class `ExpressionEngine\Model\File\Directory`** + +Represents a folder. Child of `FileSystemEntity` and is sharing all of it's properties and methods. Has extra ## Examples diff --git a/docs/fieldtypes/grid.md b/docs/fieldtypes/grid.md index 6d63ad106..c9f27d9e4 100755 --- a/docs/fieldtypes/grid.md +++ b/docs/fieldtypes/grid.md @@ -33,11 +33,13 @@ Specifies the maximum number of rows this Grid can have. For example, if you ent Enables moving the Grid rows with drag & drop to change the order -#### Always use a vertical grid layout? +#### Grid layout -The fields within the grid will be always stacked vertically on the publish form. +**Auto (default)** - the fields within the grid will be placed in a horizontal row on bigger screens, and stacked vertically on smaller screens or when there is not enough space on the page. -When turned off, the fields within the grid will be placed in a horizontal row next to each other in bigger screens, and stacked vertically on smaller screens. +**Vertical layout** - The fields within the grid will always be stack vertically on the publish form. + +**Horizontal layout** - The fields within the grid will always be stacked horizontally on the publish form. ### Grid Fields diff --git a/docs/fieldtypes/overview.md b/docs/fieldtypes/overview.md index 406d63a21..a0467835e 100755 --- a/docs/fieldtypes/overview.md +++ b/docs/fieldtypes/overview.md @@ -37,3 +37,5 @@ ExpressionEngine has the following built-in fieldtypes: - [Value Slider](/fieldtypes/value-slider.md) - [Toggle](/fieldtypes/toggle.md) - [URL](/fieldtypes/url.md) + +Additionally, more fieldtypes are available in [ExpressionEngine Add-on Store](https://expressionengine.com/add-ons) as add-ons that can be [installed](add-ons/overview.md#installing-add-ons) \ No newline at end of file diff --git a/docs/installation/changelog.md b/docs/installation/changelog.md index a5555c166..1cf7959a9 100755 --- a/docs/installation/changelog.md +++ b/docs/installation/changelog.md @@ -8,6 +8,36 @@ --> # ExpressionEngine v7 Change Log +## Version 7.2.11 +(Release: March 6, 2023) + +- **Contributors** 🙌 +
Yulya Lebed
Yuri Salimovskiy