Skip to content

Commit 96ebf69

Browse files
authored
Merge branch '7.dev' into nep-patch-captcha
2 parents 3ea1fd9 + 2f91eaf commit 96ebf69

File tree

26 files changed

+518
-125
lines changed

26 files changed

+518
-125
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ To build the theme assets, run `npm run buildAssets`. You can also dynamically r
3232

3333
### Viewing local changes
3434

35-
Manually load `/build/index.html` in your browser to view your local build. For example, `file:///Users/<username>/Documents/ExpressionEngine-User-Guide/build/index.html`. You can use the side navigation to navigate to different local files, but the search functionality always takes you to the live version at docs.expressionengine.com.
35+
There are 2 options for viewing your local changes.
36+
37+
1. Run `npx http-server -o` which should make the site available at [http://127.0.0.1:8080/build/](http://127.0.0.1:8080/build/).
38+
2. Manually view any HTML file in `/build/` in your browser. For example, `file:///Users/<username>/Documents/ExpressionEngine-User-Guide/build/index.html` to view the home page.
39+
40+
You can use the side navigation to navigate to different local files, but the search functionality takes you to the live version at [https://docs.expressionengine.com](https://docs.expressionengine.com) unless you follow the steps at [Using DocSearch Locally](#using-docsearch-locally).
3641

3742
## Using DocSearch Locally
3843

docs/_images/cp_comments.png

51.2 KB
Loading

docs/_images/overview.png

-71.1 KB
Loading

docs/add-ons/search/simple.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The Template_Group/Template where you would like the search results to be shown.
9797

9898
results="20"
9999

100-
The number of results to show per page on the search results.
100+
The number of results to show per page. The maximum value of `results` is 255. This means one page of results can't have more than 255 items, though you can have more than 255 results once you paginate the results.
101101

102102
### `search_in=`
103103

docs/advanced-usage/env-support.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-->
99
# ENV File Support
1010

11-
Config files can also be configured using [PHP Environment variables ($_ENV)](https://www.php.net/manual/en/reserved.variables.environment.php). To utilize this, create a file named `.env.php` in the root of your ExpressionEngine install.
11+
Config files can also be configured using [PHP Environment variables ($_ENV)](https://www.php.net/manual/en/reserved.variables.environment.php). To utilize this, create a file named `.env.php` in the root of your ExpressionEngine install.
1212

1313
NOTE: The `.env.php` file must be placed in same directory as the `system` directory. If you move the `system` directory above the webroot you must also move `.env.php`.
1414

@@ -31,19 +31,20 @@ This variable can now be used in your `/system/user/config.php` as illustrated b
3131
Here is an example of what it might look like to manage all your database connection settings, and Base URL in `.env.php`
3232

3333
```
34-
// .env.php
35-
36-
// URLs
34+
#.env.php
35+
#URLs
3736
BASE_URL=http://mysite.test/
3837
39-
// DATABASE SETTINGS
38+
#DATABASE SETTINGS
4039
DB_HOSTNAME=db
4140
DB_DATABASE=db
4241
DB_USERNAME=db
4342
DB_PASSWORD=db
4443
DB_PORT=3306
4544
```
4645

46+
NOTE: You must use `#` for comments within `.env.php`. Using `//` will result in your `.env.php` being unable to be read.
47+
4748
```
4849
// system/user/config.php
4950
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
@@ -53,7 +54,7 @@ $config['save_tmpl_files'] = 'y';
5354
$config['base_url'] = $_ENV['BASE_URL'];
5455
$config['site_url'] = $config['base_url'];
5556
56-
$config['app_version'] = '7.2.0';
57+
$config['app_version'] = '7.5.8';
5758
$config['encryption_key'] = 'bb748b72de235352315122d00';
5859
$config['session_crypt_key'] = '985796e4444444563463e2c80242';
5960
@@ -83,15 +84,15 @@ The site short name can be accessed in the code using `$GLOBALS['assign_to_confi
8384
The below example demonstrates this approach, assuming you have 2 MSM sites with short names of `default_site` and `second_site`
8485

8586
```
86-
// .env.php
87-
// SITE-SPECIFIC SETTINGS
87+
#.env.php
88+
#SITE-SPECIFIC SETTINGS
8889
default_site.BASE_PATH=/home/sites/mysite.test/
8990
default_site.BASE_URL=http://mysite.test/
9091
9192
second_site.BASE_PATH=/home/sites/anothersite.test/
9293
second_site.BASE_URL=http://anothersite.test/
9394
94-
// DATABASE SETTINGS
95+
#DATABASE SETTINGS
9596
DB_HOSTNAME=db
9697
DB_DATABASE=db
9798
DB_USERNAME=db
@@ -110,7 +111,7 @@ $config['base_url'] = $_ENV[$GLOBALS['assign_to_config']['site_name'] . '.' . 'B
110111
111112
$config['site_url'] = $config['base_url'];
112113
113-
$config['app_version'] = '7.2.0';
114+
$config['app_version'] = '7.5.8';
114115
$config['encryption_key'] = 'bb748b72de235352315122d00';
115116
$config['session_crypt_key'] = '985796e4444444563463e2c80242';
116117

docs/channels/channel-form/overview.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ The Channel Form tag will automatically load jQuery for you. If you prefer to in
4646

4747
### Allowing Guests to Post Entries
4848

49-
Allowing guest posts is controlled in the Channel Form settings at `Developer --> Channels` in the channel's **Settings** tab.
49+
Allowing guest posts is controlled in the Channel Form settings in `Channels` in the channel's **Settings** tab.
5050

51-
To allow guests to post in a certain channel, locate the options for "Allow Guest Posts" next to the channel you want to allow guest posts for, and choose "Yes".
51+
You can optionally choose an author that entries entered as guests appear as authored by in the Guest Author field.
5252

53-
You can optionally require the guest to pass a captcha before they submit the Channel Form by choosing "Yes" under "Guest Captcha".
53+
Requirements regarding use of a captcha for guest posting are controlled in `Settings --> CAPTCHA`.
5454

55-
Finally, you can optionally choose an author that entries entered as guests appear as authored by under Guest Author.
5655

5756
### Form Validation
5857

docs/channels/entries.md

+8
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ If five entries are being displayed per page, then for the fourth entry on the s
789789

790790
**BONUS:** Since the Search module utilizes channel variables, {absolute_count} is also available to the Search Results tag.
791791

792+
### `{absolute_index}`
793+
794+
Similar to `absolute_count` but starts at 0 instead of 1. So the first entry will have value of "0" and the second entry will have a value of "1" etc.
795+
792796
### `{absolute_results}`
793797

794798
This variable will always display the absolute total number of results that are returned by the tag, regardless of pagination.
@@ -963,6 +967,10 @@ The date the entry was submitted in GMT. This variable is **not** localized for
963967

964968
The date on which the entry was last edited in GMT. This variable is **not** localized for each user's date settings. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information.
965969

970+
### `{index}`
971+
972+
Similar to `count` but starts at 0 instead of 1. So the first entry will have value of "0" and the second entry will have a value of "1" etc.
973+
966974
### `{ip_address}`
967975

968976
The IP address of the author when they posted the entry.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `sync:upload-directory`
2+
3+
This command updates old file format data to the modern format and synchronizes the file usage records in the database. File usage data for a given file in the file manager can be viewed in the [File Editor](control-panel/file-manager/file-edit.md). This functionality is also available through [Utilities - File Usage](control-panel/utilities/data-operations.md#update-file-usage-information).
4+
5+
## Example:
6+
7+
`php eecli.php sync:file-usage`

docs/cli/intro.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ By default the CLI is located `system/ee/eecli.php` .
2929
- [migrate:rollback - Rolls back most recent migration group](cli/built-in-commands/migrate.md)
3030
- Sync
3131
- [sync:conditional-fields - Sync channel entry conditional logic](cli/built-in-commands/sync-conditional-fields.md)
32+
- [sync:file-usage - Sync files usage](cli/built-in-commands/sync-file-usage.md)
3233
- [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md)
3334
- [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md)
3435
- [Update ExpressionEngine](cli/built-in-commands/update.md)

docs/config/config-files.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In addition to `config.php` ExpressionEngine has a number of other configuration
1313

1414
As a general rule, the values provided in those config files (located in `system/ee/ExpressionEngine/Config` folder) are good for most sites, however there might be cases where certain setup would need to override some of the values.
1515

16-
In order to do that, simply copy the corresponding file to `system/user/config` folder and change or add the values that are needed. There is no need to keep the full copy of config file, just keep the properties that need to be changed and remove the ones that you are fine with - the default values will be used for those.
16+
In order to do that, simply copy the corresponding file to `system/user/config` folder and change or add the values that are needed.
1717

1818
[TOC=4]
1919

@@ -33,15 +33,20 @@ This file contains an array of foreign characters for transliteration conversion
3333

3434
`valid_form_attributes.php`
3535

36-
A list of HTML attributes that are allowed to be passed via EE template tag parameters to the `form` tag when creating forms with `ee()->functions->form_declaration()`. Additionally, attributes prefixed with `data-` and `aria-` can be used.
36+
A list of HTML attributes that are allowed to be passed via EE template tag parameters to the `form` tag when creating forms with `ee()->functions->form_declaration()`. Additionally, attributes prefixed with `data-` and `aria-` can be used without being specified in the config settings.
3737

3838
#### Allowed Mime Types
3939

4040
`mimes.php`
4141

42-
These are the mime types that are allowed to be uploaded using the upload class. For security reasons the list is kept as small as possible. If you need to upload types that are not in the list you can add them.
42+
This file sets the mime types that are allowed to be uploaded using the upload class. For security reasons the list is kept as small as possible. The `mimes.php` file in your `system/user/config` folder will override the system `mimes.php` entirely. If you need to upload mime types that are not in the list you can add them. If you want to disallow a mime type that is allowed by default, you can remove it from your mimes.php file and it will be disallowed.
4343

44-
The mime types are grouped by file type. You can add the allowed mime types directly or you can add new file types containing multiple mimes.
44+
The mime types are grouped by file type. These file types make up the 'Allowed File Types' options in the [upload directory](control-panel/file-manager/upload-directories.md#allowed-file-types) settings. You can add new mimes to an existing file type or create a new file type and add to that. Your new file type will be included as an option in the file upload preferrence file types.
45+
46+
Tip: Customizing Allowed File Types in ExpressionEngine
47+
<div class="video-wrapper">
48+
<iframe src="https://www.youtube.com/embed/W6-NEmd7Urk" width="1920" height="1080" title="Customizing Allowed File Types in ExpressionEngine" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
49+
</div>
4550

4651
#### Reverse Proxy IP addresses
4752

docs/control-panel/overview.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,27 @@
1111

1212
**Control Panel Location: `Home`**
1313

14-
The overview page is shown when a member has logged into the control panel, or has clicked the Home icon next to the name of the site in the top navigation bar. The overview page provides a quick glance at site statistics, and provides convenient links to relevant action items. Here's an overview of all the sections that can be visible based on member permissions on the overview page.
14+
The Overview page is the first screen a member sees upon logging into the control panel or clicking the "Overview" link in the navigation. It provides a quick snapshot of key site information and convenient links to relevant actions. Below is a breakdown of the sections that may appear based on member permissions.
1515

1616
![](_images/overview.png)
1717

18-
## Comments
18+
## Release Notes
1919

20-
If you have comments enabled, this box will appear on the overview page to show you how many new comments have been left since your last visit to the control panel, as well as let you know if any comments are awaiting your moderation. You then have the option to review and/or approve those new comments.
20+
This section appears after each update until dismissed. It highlights new features and improvements introduced in the latest version of ExpressionEngine. A Release Notes link is also included, directing users to the full changelog for detailed information on recent updates.
2121

22-
## Channels
22+
## Recent Entries
2323

24-
If a member has access to Channels, they will see a Channels box with quick access a channels listing, as well as a link to existing field groups. An action button will let them create a new Channel.
24+
For members with Channel access, this section displays the seven most recently created entries, providing quick access to editing or viewing them. A View All link leads to the [Entry Manager](/control-panel/entry-manager.md) or managing all entries.
2525

2626
## Members
2727

28-
The members section gives a glance at the total number of members and banned members, along with links to manage them. An action button will allow members with proper permissions to create a new member.
28+
This section shows the most recent member logins, along with links to manage user accounts. A View All link directs users to the [Member Management](/control-panel/member-manager.md)) section for full member administration.
29+
30+
## ExpressionEngine Support
2931

30-
## Content
32+
A quick-access box linking to official ExpressionEngine support, ensuring help is always within reach.
33+
34+
## Comments
3135

32-
The content section provides quick statistics on Channel entries with links to a list of the sites entries available to manage. The action button in the upper right will allow members to jump to the publish form of a particular Channel to create a new entry.
36+
![](_images/cp_comments.png)
37+
If comments are enabled, this section displays the number of new comments since the user's last visit, as well as any pending moderation tasks. Users can quickly review and approve comments directly from this section.

docs/development/add-on-update-file.md

+66-54
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Add-on Update File
1111

12+
[TOC]
13+
1214
## Overview
1315

1416
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install an add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
@@ -63,8 +65,8 @@ class Amazing_add_on_upd extends Installer
6365
The first thing you will notice in our `Amazing_add_on_upd` class is a list of properties that describe some specifics of our add-on to ExpressionEngine. There are two required properties to declare here:
6466

6567
```
66-
public $has_cp_backend = 'y'; // Shows the option to see addon’s settings.
67-
public $has_publish_fields = 'n'; // Whether module provides tab for entry edit page
68+
public $has_cp_backend = 'y'; // Shows the option to see addon’s settings.
69+
public $has_publish_fields = 'n'; // Whether module provides tab for entry edit page
6870
```
6971

7072
## Install Your Add-On (`install()`)
@@ -77,23 +79,25 @@ The CLI automatically generates our install method. This method will ensure that
7779

7880

7981
```
80-
public function install()
81-
{
82-
parent::install();
82+
public function install()
83+
{
84+
parent::install();
8385
84-
// create a database table
85-
// notify mission control
86-
// add publish tabs
86+
// create a database table
87+
// notify mission control
88+
// add publish tabs
8789
88-
return true;
89-
}
90+
return true;
91+
}
9092
```
9193

9294
### Adding Publish Tabs
9395
Optionally add the publish page tab fields to any saved publish layouts. This is ONLY used if the module adds a tab to the publish page and it requires the [`tabs()` function](#add-publish-tabs-with-your-add-on-tabs):
9496

95-
ee()->load->library('layout');
96-
ee()->layout->add_layout_tabs($this->tabs(), 'module_name');
97+
```
98+
ee()->load->library('layout');
99+
ee()->layout->add_layout_tabs($this->tabs(), 'module_name');
100+
```
97101

98102

99103
## Add Publish Tabs With Your Add-on (`tabs()`)
@@ -104,25 +108,27 @@ Optionally add the publish page tab fields to any saved publish layouts. This is
104108

105109
An optional function included only if your add-on adds a tab to the publish page. This function should return a multidimensional associative array: the top array key consisting of the tab name, followed by any field names, with each field having a variety of default settings. Note that when the fields are added to the publish page, they are namespaced to prevent variable collisions:
106110

107-
function tabs()
108-
{
109-
$tabs['tab_name'] = array(
110-
'field_name_one'=> array(
111-
'visible' => 'true',
112-
'collapse' => 'false',
113-
'htmlbuttons' => 'true',
114-
'width' => '100%'
115-
),
116-
'field_name_two'=> array(
117-
'visible' => 'true',
118-
'collapse' => 'false',
119-
'htmlbuttons' => 'true',
120-
'width' => '100%'
121-
),
122-
);
123-
124-
return $tabs;
125-
}
111+
```
112+
function tabs()
113+
{
114+
$tabs['tab_name'] = array(
115+
'field_name_one'=> array(
116+
'visible' => 'true',
117+
'collapse' => 'false',
118+
'htmlbuttons' => 'true',
119+
'width' => '100%'
120+
),
121+
'field_name_two'=> array(
122+
'visible' => 'true',
123+
'collapse' => 'false',
124+
'htmlbuttons' => 'true',
125+
'width' => '100%'
126+
),
127+
);
128+
129+
return $tabs;
130+
}
131+
```
126132

127133
Be sure that you also update your [`install()` function](#adding-publish-tabs) to add your specified tabs.
128134

@@ -138,22 +144,24 @@ The `update` method will run code when a user installs an update to our add-on.
138144
| \$current | `string` | The last recorded version of the module in the `exp_modules` table |
139145
| Returns | `Boolean` | `FALSE` if no update is needed, `TRUE` otherwise
140146

141-
public function update($current = '')
142-
{
143-
// Runs migrations
144-
parent::update($current);
147+
```
148+
public function update($current = '')
149+
{
150+
// Runs migrations
151+
parent::update($current);
145152
146-
// only run the update if the user is currently running a version less than 2.0
147-
if (version_compare($current, '2.0', '<'))
148-
{
149-
// Do your update code here
150-
// update database
151-
// notify mission control of the update
152-
}
153+
// only run the update if the user is currently running a version less than 2.0
154+
if (version_compare($current, '2.0', '<'))
155+
{
156+
// Do your update code here
157+
// update database
158+
// notify mission control of the update
159+
}
153160
154161
155-
return true;
156-
}
162+
return true;
163+
}
164+
```
157165

158166
## Uninstall Your Add-On (`uninstall()`)
159167
The CLI automatically generates our uninstall method. This method will ensure that all extensions and actions declared above will be properly uninstalled. Similarly to installation, if you just need to ensure your actions and extensions are uninstalled, you can leave this method as is. However, you added custom functionality in the `install()` method, then you need to also ensure you clean up after yourself here.
@@ -162,19 +170,23 @@ The CLI automatically generates our uninstall method. This method will ensure th
162170
| --------- | --------- | ------------------------------------------------------------ |
163171
| Returns | `Boolean` | `TRUE` if everything uninstalled properly, `FALSE` otherwise |
164172

165-
public function uninstall()
166-
{
167-
parent::uninstall();
173+
```
174+
public function uninstall()
175+
{
176+
parent::uninstall();
168177
169-
// remove my database tables
170-
// remove any publish tabs
171-
// turn off the lights
178+
// remove my database tables
179+
// remove any publish tabs
180+
// turn off the lights
172181
173-
return true;
174-
}
182+
return true;
183+
}
184+
```
175185

176186
### Removing Tabs
177187
Optionally delete any publish page tab fields saved in publish layouts. This is ONLY used if the module adds a tab to the publish page and it requires the `tabs()` function:
178188

179-
ee()->load->library('layout');
180-
ee()->layout->delete_layout_tabs($this->tabs(), 'module_name');
189+
```
190+
ee()->load->library('layout');
191+
ee()->layout->delete_layout_tabs($this->tabs(), 'module_name');
192+
```

0 commit comments

Comments
 (0)