From 1ef1b7be6513a96f6db206a15562e78a9efadaed Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Fri, 13 Oct 2023 12:09:48 +0300 Subject: [PATCH 01/12] Added `{folder_id}` variable and parameter for subfolder support in `exp:file:entries` tag --- docs/add-ons/file.md | 10 ++++++++++ docs/fieldtypes/file.md | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/docs/add-ons/file.md b/docs/add-ons/file.md index be76318c4..916038805 100755 --- a/docs/add-ons/file.md +++ b/docs/add-ons/file.md @@ -122,6 +122,12 @@ The file display engine sets some parameters dynamically, based on what is in th You can hard code the file entries tag to show specific files. You may also specify multiple files by separating them with the pipe character. This parameter takes precedence over any entry specified in the url. +### `folder_id=` + + folder_id="34" + +If you want to display only the files that are in certain folder within Upload Directory, specify folder ID using this parameter. + ### `limit=` limit="30" @@ -219,6 +225,10 @@ If you have defined any [image manipulations](control-panel/file-manager/upload- The URL to the file. +### `{folder_id}` + +If the file is in a subfolder, will return ID of the folder. If the file is in root or upload directory, will return 0. + ### `{height}` The height (in pixels) of the full-size image. (Empty for non-image files.) diff --git a/docs/fieldtypes/file.md b/docs/fieldtypes/file.md index 3f7d62c48..aaf4f8301 100755 --- a/docs/fieldtypes/file.md +++ b/docs/fieldtypes/file.md @@ -126,6 +126,10 @@ If you have defined any [image manipulations](control-panel/file-manager/upload- {file_size:small:human} {file_size:small:human_long} +### `{folder_id}` + +If the file is in a subfolder, will return ID of the folder. If the file is in root or upload directory, will return 0. + ### `{height}` The height of the image (in pixels) if applicable. From a271f0dd772d51e40b530f8946c1adcaf74a8092 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Tue, 11 Jun 2024 16:00:28 -0400 Subject: [PATCH 02/12] Added CLI error troubleshooting --- docs/troubleshooting/error-messages.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/troubleshooting/error-messages.md b/docs/troubleshooting/error-messages.md index a154285a7..8d7f9f819 100755 --- a/docs/troubleshooting/error-messages.md +++ b/docs/troubleshooting/error-messages.md @@ -109,6 +109,29 @@ This error happens when ExpressionEngine tries to save content with an emoji to This happens when the query has a syntax error. However, if you can't see an obvious syntax error and the query runs in other environments, it may be a server configuration issue. Make certain MySQL is not running with [ANSI_QUOTES](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes) on. +## PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] + +This may happen when attempting to use the CLI when the ExpressionEngine intallation is running on [MAMP](https://www.mamp.info/). + +### Troubleshooting + +Change the following configuration values in config.php: hostname, port. See example: + +```php +$config['database'] = array( + 'expressionengine' => array( + 'hostname' => '127.0.0.1', + 'database' => 'EEdb', + 'username' => 'root', + 'password' => 'root', + 'dbprefix' => 'exp_', + 'char_set' => 'utf8mb4', + 'dbcollat' => 'utf8mb4_unicode_ci', + 'port' => '8889' + ) +); +``` + ## Missing Encryption Keys ExpressionEngine displays the error: **You do not have value set for \[encryption_key/session_crypt_key\] in your config.php. This may leave your install open to security vulnerabilities. Restore the keys or see this troubleshooting article in the user guide for help.** From b1837b3912cc702d15265dd38e8da6649f6c2688 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Tue, 11 Jun 2024 17:07:22 -0400 Subject: [PATCH 03/12] TTT Using Mathematic Operators in Conditionals And fixed some bad links. --- docs/add-ons/pro-search/development/anatomy.md | 4 ++-- docs/add-ons/pro-search/development/functions.md | 2 +- docs/add-ons/pro-search/examples.md | 4 ++-- docs/add-ons/pro-search/overview.md | 10 +++++----- docs/add-ons/pro-search/tags.md | 4 ++-- docs/add-ons/pro-variables/tags.md | 2 +- docs/add-ons/pro-variables/type.md | 6 +++--- docs/templates/conditionals.md | 5 +++++ 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/docs/add-ons/pro-search/development/anatomy.md b/docs/add-ons/pro-search/development/anatomy.md index a6d25f405..1b2096a7a 100644 --- a/docs/add-ons/pro-search/development/anatomy.md +++ b/docs/add-ons/pro-search/development/anatomy.md @@ -69,7 +69,7 @@ An array of entry IDs, an empty array (no results), or `NULL` (if given and your ### fixed_order -Should return `TRUE` or `FALSE` depending on whether the entry IDs returned by [the filter method](#filter-method) are in the order they should appear in the [Results tag](/add-ons/pro-search/tags.md#results-tag). Defaults to `FALSE`. +Should return `TRUE` or `FALSE` depending on whether the entry IDs returned by [the filter method](#filter) are in the order they should appear in the [Results tag](/add-ons/pro-search/tags.md#exppro_searchresults). Defaults to `FALSE`. #### Returns @@ -85,7 +85,7 @@ Should return an array of entry IDs that should be _excluded_ from the search re ### results -This method is called before displaying the search results in the [Results tag](/add-ons/pro-search/tags.md#results-tag) so you can add your own custom variables to the search results. It basically piggy-backs on the [channel_entries_query_result](/development/extension_hooks/module/channel/index.md#channel-entries-query-result) extension hook. +This method is called before displaying the search results in the [Results tag](/add-ons/pro-search/tags.md#exppro_searchresults) so you can add your own custom variables to the search results. It basically piggy-backs on the [channel_entries_query_result](/development/extension-hooks/module/channel.md#channel_entries_query_resultthis-query_result) extension hook. #### Arguments diff --git a/docs/add-ons/pro-search/development/functions.md b/docs/add-ons/pro-search/development/functions.md index 7676a1010..9736b3783 100644 --- a/docs/add-ons/pro-search/development/functions.md +++ b/docs/add-ons/pro-search/development/functions.md @@ -97,7 +97,7 @@ Checks if given value is present in given parameter. ### prep -Modifies a parameter value to EE syntax based on the presence of the parameter name in other parameters like [require_all](./parameters#inclusive-values) or [exclude](./parameters#exclude-values). +Modifies a parameter value to EE syntax based on the presence of the parameter name in other parameters like [require_all](/add-ons/pro-search/parameters.md#inclusive-values) or [exclude](/add-ons/pro-search/parameters.md#exclude-values). #### Arguments diff --git a/docs/add-ons/pro-search/examples.md b/docs/add-ons/pro-search/examples.md index 4c1923eb8..330935542 100644 --- a/docs/add-ons/pro-search/examples.md +++ b/docs/add-ons/pro-search/examples.md @@ -8,7 +8,7 @@ --> # Examples -Have you read the docs on [Parameters](/add-ons/pro-search/parameter.md)? Good. Are you familiar with the custom [Filters](/add-ons/pro-search/filters.md)? Excellent. Taken a look at the [Template Tags](/add-ons/pro-search/tags.md)? Perfect. Then here are some examples that illustrate how these three are combined. +Have you read the docs on [Parameters](/add-ons/pro-search/parameters.md)? Good. Are you familiar with the custom [Filters](/add-ons/pro-search/filters.md)? Excellent. Taken a look at the [Template Tags](/add-ons/pro-search/tags.md)? Perfect. Then here are some examples that illustrate how these three are combined. [TOC] @@ -503,7 +503,7 @@ Below are two lists of tags. You can select multiple tags per list. Entries that ## Other & Native -In addition to what all the [filters](/add-ons/pro-search/filters.md) bring to the party, you can also filter by native ExpressionEngine parameters, as well as some [little extras](/add-ons/pro-search/tags.md/results-tag). +In addition to what all the [filters](/add-ons/pro-search/filters.md) bring to the party, you can also filter by native ExpressionEngine parameters, as well as some [little extras](/add-ons/pro-search/tags.md#results-tag). ### Orderby and sort in one go diff --git a/docs/add-ons/pro-search/overview.md b/docs/add-ons/pro-search/overview.md index 36218c108..1990ccac2 100644 --- a/docs/add-ons/pro-search/overview.md +++ b/docs/add-ons/pro-search/overview.md @@ -26,11 +26,11 @@ Apart from the powerful [keywords filter](/add-ons/pro-search/filters.md#keyword Other features include: -- Keyword [suggestions](/add-ons/pro-search/tags.md#suggestions-tag) based on your own [lexicon](/add-ons/pro-search/lexicon.md); -- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywords-inflect) or [word stems](/add-ons/pro-search/filters.md#keywords-stem); -- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics) keyword searches; +- Keyword [suggestions](/add-ons/pro-search/tags.md#exppro_searchsuggestions) based on your own [lexicon](/add-ons/pro-search/lexicon.md); +- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywordsinflect) or [word stems](/add-ons/pro-search/filters.md#keywordsstem); +- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics-and-foreign-characters) keyword searches; - Multiple site search; - Search [shortcuts](/add-ons/pro-search/shortcuts.md) for custom search queries and URLs; - An exportable search log; -- A super powerful [Find & Replace utility](/add-ons/pro-search/find-replace.md); -- A [custom filter API](/add-ons/pro-search/development/create.md), [fieldtype API](/add-ons/pro-search/development/api.md), and [extension hooks](/add-ons/pro-search/development/hooks.md) for developers. \ No newline at end of file +- A super powerful [Find & Replace utility](/add-ons/pro-search/find-and-replace.md); +- A [custom filter API](/add-ons/pro-search/development/create.md), [fieldtype API](/add-ons/pro-search/development/api.md), and [extension hooks](/add-ons/pro-search/development/hooks.md) for developers. diff --git a/docs/add-ons/pro-search/tags.md b/docs/add-ons/pro-search/tags.md index ef9aaef64..d77a64782 100644 --- a/docs/add-ons/pro-search/tags.md +++ b/docs/add-ons/pro-search/tags.md @@ -91,7 +91,7 @@ Name of the shortcut to use for the search query #### {pro_search_*query_parameter*} -To output the value of an existing [query parameter](parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`. +To output the value of an existing [query parameter](/add-ons/pro-search/parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`. #### {collections}{/collections} @@ -273,7 +273,7 @@ Name of the shortcut to use for the search query. #### {pro_search_*query_parameter*} -To output the value of an existing [query parameter](parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`. +To output the value of an existing [query parameter](/add-ons/pro-search/parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`. NOTE: **Note:** This is not used to output the content from a matching result. It outputs the value of an existing search parameter i.e. *Your search for "cowboy hats" in size "Large" returned 19 results.* diff --git a/docs/add-ons/pro-variables/tags.md b/docs/add-ons/pro-variables/tags.md index 50a284829..d1c45c2bb 100644 --- a/docs/add-ons/pro-variables/tags.md +++ b/docs/add-ons/pro-variables/tags.md @@ -68,7 +68,7 @@ Total of iterations of the loop. If you’re displaying a 3rd party field type, you can use all variables you would normally use inside the field channel variable pair. -NOTE: **Note:** the `{_my_var_:…}` variables are _only_ available when using the Parse tag pair or Pair tag pair, _and_ if the variable type allows multiple items to be selected. For more options on the native variable types, [check their properties](/add-ons/pro-variables/types.md). +NOTE: **Note:** the `{_my_var_:…}` variables are _only_ available when using the Parse tag pair or Pair tag pair, _and_ if the variable type allows multiple items to be selected. For more options on the native variable types, [check their properties](/add-ons/pro-variables/type.md). {exp:pro_variables:parse var="my_site:my_var"} diff --git a/docs/add-ons/pro-variables/type.md b/docs/add-ons/pro-variables/type.md index 5b90c3af4..438b193b8 100644 --- a/docs/add-ons/pro-variables/type.md +++ b/docs/add-ons/pro-variables/type.md @@ -56,11 +56,11 @@ Uses the native [File field](/fieldtypes/file.md). To output the variable, alway #### `modifier` -Allows applying modifiers, which, among other, are used to apply [on-the-fly image manipulations](/fieldtypes/grid.md#on-the-fly-image-manipulations) to files +Allows applying modifiers, which, among other, are used to apply [on-the-fly image manipulations](/fieldtypes/file.md#on-the-fly-image-manipulations) to files ## Grid -Uses the native [Grid field](/fieldtypes/grid.md). All native types are available, _except for Relationships and Members_. To output the variable, use the `{exp:pro_variables:pair}` or `{exp:pro_variables:single}` tag where appropriate. You can use any of Grid’s [parameters](/fieldtypes/grid.md#parameters) and [variables](/fieldtypes/grid.ms#variables) using these tags. Additionally, one more parameter is available: +Uses the native [Grid field](/fieldtypes/grid.md). All native types are available, _except for Relationships and Members_. To output the variable, use the `{exp:pro_variables:pair}` or `{exp:pro_variables:single}` tag where appropriate. You can use any of Grid’s [parameters](/fieldtypes/grid.md#parameters) and [variables](/fieldtypes/grid.md#variables) using these tags. Additionally, one more parameter is available: ### Parameters @@ -355,7 +355,7 @@ To be used in combination with `format`. Possible values: `none`, `safe` or `all #### `preparse:_my_var_` -If the variable content contains variables that need to be parsed before it is put in the template, you can use this parameter, similar to [embed variables](/templates/embedding.md#embed-variables-for-the-embedded-template). For example: setting the parameter `preparse:foo="bar"` will replace the variable `{preparse:foo}` with `bar` in the variable content. +If the variable content contains variables that need to be parsed before it is put in the template, you can use this parameter, similar to [embed variables](/templates/embedding.md#embedding-variables). For example: setting the parameter `preparse:foo="bar"` will replace the variable `{preparse:foo}` with `bar` in the variable content. #### `preparse_prefix` diff --git a/docs/templates/conditionals.md b/docs/templates/conditionals.md index a28ccc1af..d785ca282 100755 --- a/docs/templates/conditionals.md +++ b/docs/templates/conditionals.md @@ -160,6 +160,11 @@ The NOT operator (`!`) also can be used at the beginning of the statement to neg ### Mathematic Operators +Tip: Using Mathematic Operators in Conditionals +
+ +
+ You can use the following mathematical operators to compute values: | Operator | Name | From d76c763ded7012cb0b148f4f76df9849db82ab24 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Wed, 26 Jun 2024 17:26:49 -0400 Subject: [PATCH 04/12] Added a couple of references to coilpack This came up in slack- it would be really nice to find some reference to Twig and Blade if you search the EE docs and so now there is one. --- docs/advanced-usage/coilpack/overview.md | 26 +++++++++++++++++++++++ docs/templates/language.md | 2 ++ docs/toc_sections/_advanced_usage_toc.yml | 6 ++++++ 3 files changed, 34 insertions(+) create mode 100644 docs/advanced-usage/coilpack/overview.md diff --git a/docs/advanced-usage/coilpack/overview.md b/docs/advanced-usage/coilpack/overview.md new file mode 100644 index 000000000..05944163a --- /dev/null +++ b/docs/advanced-usage/coilpack/overview.md @@ -0,0 +1,26 @@ + + +# ExpressionEngine + Laravel + + +[Coilpack](https://github.com/ExpressionEngine/Coilpack) is a composer package that provides a flexible and decoupled architecture that seamlessly integrates with the [Laravel PHP framework's](https://laravel.com/) ecosystem. For developers already familiar with Laravel, it provides a simple way to drop ExpressionEngine into a standard Laravel application and access many core services. + +Using Coilpack to integrate ExpressionEngine into a Laravel applications provides immediate access to: + +- **[Twig Template Engine](https://twig.symfony.com/)** on a per template basis +- **[Blade Template Engine](https://laravel.com/docs/11.x/blade)** on a per template basis +- **[GraphQL](https://graphql.org/)** +- **Ability to access ExpressionEngine content from within the Laravel application** + + +Check out our video introduction to Coilpack! +
+ +
diff --git a/docs/templates/language.md b/docs/templates/language.md index 7be8b699f..437333c1f 100644 --- a/docs/templates/language.md +++ b/docs/templates/language.md @@ -17,6 +17,8 @@ lang: ee ExpressionEngine has its own template language which allows you to retrieve and display information dynamically. +[Twig](https://twig.symfony.com/) and [Blade](https://laravel.com/docs/11.x/blade) templating engines are available when using the [Coilpack package](https://github.com/ExpressionEngine/Coilpack) on the [Laravel Framework](https://laravel.com/). + ## Single Variables Single Variables output a single piece of content. Some variables are intended to be used within Template Tags (as in the examples below), others are available globally wherever you would like to put them in your templates. diff --git a/docs/toc_sections/_advanced_usage_toc.yml b/docs/toc_sections/_advanced_usage_toc.yml index 3e01f19d3..0e6fb9dfe 100644 --- a/docs/toc_sections/_advanced_usage_toc.yml +++ b/docs/toc_sections/_advanced_usage_toc.yml @@ -714,3 +714,9 @@ href: msm/overview.md - name: Variables and Parameter href: msm/code.md + +- name: ExpressionEngine + Laravel + items: + - name: Overview + href: advanced-usage/coilpack/overview.md + From 16f922cb75d4d2ec6d0278c268d3a86a09d03aa4 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Thu, 27 Jun 2024 16:26:53 -0400 Subject: [PATCH 05/12] Tweaked for accuracy --- docs/troubleshooting/error-messages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/troubleshooting/error-messages.md b/docs/troubleshooting/error-messages.md index 8d7f9f819..e49ac1cc2 100755 --- a/docs/troubleshooting/error-messages.md +++ b/docs/troubleshooting/error-messages.md @@ -115,7 +115,7 @@ This may happen when attempting to use the CLI when the ExpressionEngine intalla ### Troubleshooting -Change the following configuration values in config.php: hostname, port. See example: +Check following configuration values in config.php: hostname, port. Hostname may need to be ```127.0.0.1``` instead of ``localhost`` and the port may differ from the default 3306. You can check the port used in the MAMP MySQL settings. For example: ```php $config['database'] = array( From fa40b64fa4e3eebd03bb6744661d403fc5ad0adf Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 19:41:11 -0500 Subject: [PATCH 06/12] Update entries.md Rearranged conditionals, small wording changes. --- docs/comment/entries.md | 44 ++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/docs/comment/entries.md b/docs/comment/entries.md index a25766b8e..c4aacf2eb 100755 --- a/docs/comment/entries.md +++ b/docs/comment/entries.md @@ -22,7 +22,7 @@ Here is a basic example showing how you might use the comment tag:

By {name} on {comment_date format="%Y %m %d"}

{/exp:comment:entries} -NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. +NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. If you do, the outer tag will parse and resolve many of these variables and conditionals before the Comment Entries tag has the chance to do so. ## Parameters @@ -158,12 +158,6 @@ This variable will always display the absolute total number of results that are The _opposite_ of `{absolute_count}`, in that it displays the entry count position counting backwards from the absolute total. Works across pagination, so the fifth entry in a list of fifteen entries would display "10". -### `{allow_comments}` - - {if allow_comments} - -TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional. - ### `{author}` The comment author's screen name, if a member; otherwise, this variable will display the name submitted with the comment. @@ -196,10 +190,6 @@ The URL to the avatar image associated with the entry's author. Typically used a {if avatar} {author}'s avatar {/if} -### `{if can_moderate_comment}` - -TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). - ### `{channel_id}` The ID number of the channel that the comment belongs to. @@ -289,12 +279,6 @@ If five entries are being displayed per page, then for the fourth entry on the p The date on which the comment was edited. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information. -### `{editable}` - - {if editable}Show Edit{/if} - -This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles). - ### `{email}` The comment author's email address, if specified. @@ -453,7 +437,15 @@ These are totally dynamic in that any profile field you create for your members [TOC=3] -The following special conditionals are available: +The following special conditionals are available. + +NOTE: **Important:** Avoid using Template Caching on any Template containing these conditional that are user-specific. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it gets cached will have their conditionals applied to every subsequent visitor until the cache expires. + +### `{if allow_comments}` + + {if allow_comments} content {/if} + +TRUE / FALSE, Whether or not the entry being displayed allows comments. Typically used as a conditional. ### `{if avatar}` @@ -463,20 +455,32 @@ This special conditional lets you conditionally display content if the current e {if avatar} {author}'s avatar {/if} +### `{if can_moderate_comment}` + +TRUE / FALSE, Whether a member has permission to edit a given comment AND/OR close that comment. Used in conjunction with [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). + ### `{if comments_expired}` + {if comments_expired} content {/if} + If commenting has expired (and expiration is not set to be [overridden by moderation](comment/control-panel.md)), the contents of this conditional will be displayed. NOTE: **Note:** `{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated. ### `{if comments_disabled}` - {if comments_disabled} + {if comments_disabled} content {/if} If commenting has been disabled, the contents of this conditional will be displayed. NOTE: **Note:** `{if no_results}` has precedence over this conditional. If there are no comments, this conditional is not evaluated. +### `{if editable}` + + {if editable} Show Edit Form {/if} + +TRUE / FALSE, This variable will be used in a conditional to allow [comment editing](comment/form.md#allowing-members-to-edit-comments-on-the-front-end). It indicates whether a member has [permission to edit a given comment](control-panel/member-manager.md#createedit-all-member-roles). + ### `{if is_ignored}` {if is_ignored} content {/if} @@ -509,7 +513,7 @@ Or you can use Javascript to allow the user to read the comment if they wish:
{comment}
{/exp:comment:entries} -NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you do not avoid caching, then data will not be dynamic for each user. Instead, whoever happens to load the page when it is cached will have their ignore list applied to everyone until the cache expires. +NOTE: **Important:** Avoid using Template Caching on any Template containing this conditional. If you cache this, whoever happens to load the page when it is first cached will have their ignore list applied to everyone until the cache is cleared. ### `{if no_results}` From 57f4867f5a432d3bdc99986cc645d012cc45438c Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 19:47:32 -0500 Subject: [PATCH 07/12] Update form.md Improvement to wording of comment editing --- docs/comment/form.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/comment/form.md b/docs/comment/form.md index 5fe92dd40..f75bea4be 100755 --- a/docs/comment/form.md +++ b/docs/comment/form.md @@ -74,7 +74,7 @@ This is a **required** parameter if you are using comment previews indicating wh You can hard code the comment for tag to display a comment form for a specific channel entry by its URL title. -NOTE: **Note:** This parameter takes precedence over any entry specified dynamically in the URL, so when using this parameter you will want to make sure it is clear to the user which entry the displayed comment form belong to. +NOTE: **Note:** This parameter takes precedence over any entry specified dynamically in the URL, so when using this parameter you will want to make sure it is clear to the user which entry the displayed comment form belongs to. #### `channel=` @@ -174,7 +174,7 @@ The following conditionals are available: ## Allowing Members to Edit Comments on the Front End -The available tags and variables allow you to write your own client side code for implementing comment editing. The following is a simplified example using jQuery. +The available tags and variables allow you to write your own client-side code for implementing comment editing. The following is a simplified example using jQuery. ### Example Code @@ -227,13 +227,13 @@ A request for an edit will return a response array. In the case of an error, an ### Editing Permissions -The {if editable} conditional in the Comment Entries tag outputs content when the viewing member has permission to edit the comment indicated while the {if can_moderate_comment} outputs content if they have permission to close the comment. +By using the [{if editable}](/comment/entries.html#if-editable) conditional in the Comment Entries tag, you can output a link, instructions or a form if the viewing member has permission to edit the comment, and by using the {if can_moderate_comment} you can display whatever is appropriate if the viewing member has permission to moderate (close) the comment. -For regular members, in order to edit comments they must be a logged in member, the author of the comment, and the editing time limit must not have expired. +For default regular members, in order to edit a comment, they must be logged in, the author of the comment, and the editing time limit must not have expired. If a member has a role with permission to edit the comments of any entry, that member will have edit permissions regardless of the editing time limit. -Comment moderators may close the comment. Superadmins will always have {editable} and {can_moderate_comment} permissions on any comment. +Comment moderators may close the comment. The edit time limit does not apply to moderators. -Lastly, if a member is in a group with permission to edit comments in any entry, they will have edit permissions. The edit time limit does not apply to moderators. +Superadmins will always have {editable} and {can_moderate_comment} permissions on any comment. ### Customizing Client-Side Code From f9c942736889c395981eb8ade93326bb6d498814 Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 20:13:53 -0500 Subject: [PATCH 08/12] Update entries.md Made the primary_role_id and role_id options a little clearer From 34e350d5b7b65c72d99aa0f6ce71ed81535e012c Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 20:20:04 -0500 Subject: [PATCH 09/12] Update single-variables.md Improvements to role_id documentation --- docs/templates/globals/single-variables.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/templates/globals/single-variables.md b/docs/templates/globals/single-variables.md index c546322ff..1377b04a3 100755 --- a/docs/templates/globals/single-variables.md +++ b/docs/templates/globals/single-variables.md @@ -33,12 +33,14 @@ This variable will be substituted for the global character set (UTF-8). It is ty ### `{cp_session_id}` -The session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only output for logged-in members who have access to the Control Panel, for instance to build a front-end URL to an add-on in the control panel: +The active session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only made available for logged-in members who have access to the Control Panel. Used to build a URL from the front-end to, for instance, an add-on in the control panel. - {if logged_in_role_id == 1} - • + {if logged_in_primary_role_id == 1} + • CP Link {/if} +NOTE: **Note:** To check non-primary roles, use [exp:member:has_role](/member/member-roles-tags.html#expmemberhas_role) + ### `{cp_url}` The URL to the control panel for this site. Only output for logged-in members who have access to the Control Panel. @@ -313,6 +315,8 @@ The Member ID for the currently logged-in user. The Primary Role ID number for the currently logged-in user. +NOTE: **Note:** To check and display non-primary roles, use [exp:member:has_role](/member/member-roles-tags.html#expmemberhas_role) + ### `{logged_in_primary_role_name}` The title of the Primary Role for the currently logged-in user. From 40583f1a0ead64b82456c1d8b8d985314d649fcc Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 20:24:13 -0500 Subject: [PATCH 10/12] Update entries.md Adding better instructions around role_id --- docs/channels/entries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/channels/entries.md b/docs/channels/entries.md index 55db4c3bd..4a02a4585 100755 --- a/docs/channels/entries.md +++ b/docs/channels/entries.md @@ -893,9 +893,9 @@ The "count" out of the current entries being displayed. If five entries are bein Edit Entry {/if} -The URL of the entry form in the control panel where this entry can be edited. It is recommended you wrap this variable in an `{if logged_in}` conditional to hide your control panel's URL from regular site visitors. If you are running a membership based site, hide it behind an appropriate `logged_in_role_id` conditional. For example, to hide this link from everyone but Super Admins: +The URL of the entry form in the control panel where this entry can be edited. It is recommended you wrap this variable in an `{if logged_in}` conditional to hide your control panel's URL from regular site visitors. If you are running a membership-based site, hide it behind an appropriate `logged_in_primary_role_id` conditional or use [exp:member:has_role](/member/member-roles-tags.html#expmemberhas_role). For example, to hide this link from everyone but Super Admins: - {if logged_in_role_id == 1} + {if logged_in_primary_role_id == 1} Edit Entry {/if} From 1d9c94510c48c039aa7a36842be2746ccc730b09 Mon Sep 17 00:00:00 2001 From: Travis Smith Date: Tue, 2 Jul 2024 22:41:33 -0500 Subject: [PATCH 11/12] Update partials.md Just some gentle re-writing --- docs/templates/partials.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/templates/partials.md b/docs/templates/partials.md index 916f812dd..aaf808215 100755 --- a/docs/templates/partials.md +++ b/docs/templates/partials.md @@ -25,19 +25,23 @@ You can create and edit Template partials at `Developer --> Templates --> Templa NOTE: **Note:** Template partials may not be nested inside other Template partials. -## Template partial vs. Template variable +## Template Partial vs. Template Variable -Template partials are expanded at a very early stage on each template, making it possible for them to hold dynamic content, ExpressionEngine tags, other variables, PHP, etc. (Read more about [the rendering stages of the template engine](templates/engine.md).) They shine when you need to reuse dynamic information but don't need the extra overhead of access control or separate preferences of an embedded template. [Template variables](templates/variable.md) are the polar opposites, expanded during one of the final rendering stages of the template engine, and should be used for static text, HTML, JavaScript, and other static content that would not affect other tags and variables on the template. +Template partials are expanded at an early stage in each template, which makes it possible for them to hold and control dynamic content, ExpressionEngine tags, other variables, PHP, etc. (Read more about [the rendering stages of the template engine](templates/engine.md).) They shine most when you need to reuse dynamic information but don't need the extra overhead of access control or separate preferences of an embedded template. -## Template partial vs. Embedded Template +[Template variables](templates/variable.md) are the polar opposites, expanded during the final rendering stages of the template engine, and they should be used for static text, HTML, JavaScript, and other static content that would not affect other tags and variables in the template. -Template partials can be considered to actually be part of the template that they are used on, with their expanded contents parsed simultaneous to other tags and variables on the template. [Embedded templates](templates/embedding.md) are separate templates, with their own preferences (caching, PHP parsing, access, etc.), and are parsed individually. Put another way, embedded templates are not _included_ in the parent template, but rather _added to them_ after the fact, using a separate query and full page parsing resources for each template. +## Template Partial vs. Embedded Template + +Template partials behave as a natural part of the template that calls them, with their expanded contents inserted early and parsed simultaneously to other tags and variables in that template. They interact fully with the logic and data in the calling template. + +[Embedded templates](templates/embedding.md) are more like sub-templates, with their own preferences (caching, PHP parsing, access, etc.). Embedded templates are processed individually after most of the calling template's parsing has happened. Put another way, embedded templates are not _included_ in the parent template, but rather _added to them_ after the parent template is mostly built, using a separate set of queries and using full page-parsing resources for each embedded template. ## Multiple Site Manager TIP: **Tip:** If you are using the Multiple Site Manager, you'll notice that you have a new preference when editing each Template partial: make it available to all your MSM sites or this site only. To easily identify the difference when reading your templates, consider prefixing your Template partial names with the site's short name or, for Template partials available to all sites, _global_: - {ellislab_date_formatting} + {packettide_date_formatting} {expressionengine_date_formatting} From 977a9344aa95c0ab30a091f1134d5678edecffbe Mon Sep 17 00:00:00 2001 From: robinsowell Date: Fri, 26 Jul 2024 16:00:20 -0400 Subject: [PATCH 12/12] Small tweaks to existing prs not waiting for 7..5 --- docs/add-ons/file.md | 4 ++-- docs/comment/entries.md | 4 ++-- docs/comment/form.md | 2 +- docs/fieldtypes/file.md | 2 +- docs/templates/globals/single-variables.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/add-ons/file.md b/docs/add-ons/file.md index 916038805..a7bef039b 100755 --- a/docs/add-ons/file.md +++ b/docs/add-ons/file.md @@ -126,7 +126,7 @@ You can hard code the file entries tag to show specific files. You may also spec folder_id="34" -If you want to display only the files that are in certain folder within Upload Directory, specify folder ID using this parameter. +If you want to display only the files that are in certain folder within an Upload Directory, specify the folder ID using this parameter. ### `limit=` @@ -227,7 +227,7 @@ The URL to the file. ### `{folder_id}` -If the file is in a subfolder, will return ID of the folder. If the file is in root or upload directory, will return 0. +The ID of the folder the file is in. If the file is in the top level folder of the upload directory, it will return 0. ### `{height}` diff --git a/docs/comment/entries.md b/docs/comment/entries.md index c4aacf2eb..59a4c6794 100755 --- a/docs/comment/entries.md +++ b/docs/comment/entries.md @@ -22,7 +22,7 @@ Here is a basic example showing how you might use the comment tag:

By {name} on {comment_date format="%Y %m %d"}

{/exp:comment:entries} -NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. If you do, the outer tag will parse and resolve many of these variables and conditionals before the Comment Entries tag has the chance to do so. +NOTE: **Important:** The Comment Entries tag should **not** be nested inside of a standard {exp:channel:entries} tag. If you do, the outer tag will replace many of these variables and conditionals before the Comment Entries tag has the chance to do so. ## Parameters @@ -485,7 +485,7 @@ TRUE / FALSE, This variable will be used in a conditional to allow [comment edit {if is_ignored} content {/if} -This conditionals allows you to show (or hide) specific content if the comment was made by a member on the logged-in user's ignore list. A simplified example of how this might be used is: +This conditional allows you to show (or hide) specific content if the comment was made by a member on the logged-in user's ignore list. A simplified example of how this might be used is: {exp:comment:entries} {if is_ignored}You are ignoring {author}.{/if} diff --git a/docs/comment/form.md b/docs/comment/form.md index f75bea4be..6b7c13751 100755 --- a/docs/comment/form.md +++ b/docs/comment/form.md @@ -229,7 +229,7 @@ A request for an edit will return a response array. In the case of an error, an By using the [{if editable}](/comment/entries.html#if-editable) conditional in the Comment Entries tag, you can output a link, instructions or a form if the viewing member has permission to edit the comment, and by using the {if can_moderate_comment} you can display whatever is appropriate if the viewing member has permission to moderate (close) the comment. -For default regular members, in order to edit a comment, they must be logged in, the author of the comment, and the editing time limit must not have expired. If a member has a role with permission to edit the comments of any entry, that member will have edit permissions regardless of the editing time limit. +For members without administrative access, in order to edit a comment they must be logged in, the author of the comment, and the editing time limit must not have expired. If a member has a role with permission to edit the comments of any entry, that member will have edit permissions regardless of the editing time limit. Comment moderators may close the comment. The edit time limit does not apply to moderators. diff --git a/docs/fieldtypes/file.md b/docs/fieldtypes/file.md index be20e189e..1fc2bbb2e 100755 --- a/docs/fieldtypes/file.md +++ b/docs/fieldtypes/file.md @@ -134,7 +134,7 @@ If you have defined any [image manipulations](control-panel/file-manager/upload- ### `{folder_id}` -If the file is in a subfolder, will return ID of the folder. If the file is in root or upload directory, will return 0. +The ID of the folder the file is in. If the file is in the top level folder of the upload directory, it will return 0. ### `{height}` diff --git a/docs/templates/globals/single-variables.md b/docs/templates/globals/single-variables.md index 1377b04a3..47660fc0f 100755 --- a/docs/templates/globals/single-variables.md +++ b/docs/templates/globals/single-variables.md @@ -33,7 +33,7 @@ This variable will be substituted for the global character set (UTF-8). It is ty ### `{cp_session_id}` -The active session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only made available for logged-in members who have access to the Control Panel. Used to build a URL from the front-end to, for instance, an add-on in the control panel. +The active session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only made available for logged-in members who have access to the Control Panel. Used to build a URL from the front-end to, for instance, an add-on in the control panel. If sessions are not required for control panel login, this variable returns 0. {if logged_in_primary_role_id == 1} • CP Link