diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..538b1b856 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build Docs + +on: + push: + branches: + - 7.x + - 7.dev + +jobs: + build: + name: Build Documentation HTML + runs-on: ubuntu-latest + outputs: + DOCSEARCH_INDEX: ${{ steps.setup_vars.outputs.DOCSEARCH_INDEX }} + DOCS_URL: ${{ steps.setup_vars.outputs.DOCS_URL }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Variables + id: setup_vars + run: | + if [[ "${{github.base_ref}}" == "7.x" || "${{github.ref}}" == "refs/heads/7.x" ]]; then + echo "DOCSEARCH_INDEX=expressionengine7" >> "$GITHUB_OUTPUT" + else + echo "DOCSEARCH_INDEX=expressionengine7_staging" >> "$GITHUB_OUTPUT" + fi + + - name: Update Docsearch Index + uses: richardrigutins/replace-in-files@v2 + with: + search-text: "docsearch_index: 'expressionengine'" + replacement-text: "docsearch_index: '${{steps.setup_vars.outputs.DOCSEARCH_INDEX}}'" + files: ./config.yml + + - name: Install NPM and build + run: | + npm install + npm run build + + - name: Archive Build files + uses: actions/upload-artifact@v4 + with: + name: EEDocs7.latest + path: build \ No newline at end of file diff --git a/.github/workflows/search.yml b/.github/workflows/search.yml new file mode 100644 index 000000000..314856d97 --- /dev/null +++ b/.github/workflows/search.yml @@ -0,0 +1,48 @@ +name: Update Search + +on: + workflow_dispatch: + +jobs: + search: + name: Build Search Index + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Variables + run: | + if [[ "${{github.base_ref}}" == "7.x" || "${{github.ref}}" == "refs/heads/7.x" ]]; then + echo "DOCSEARCH_INDEX=expressionengine7" >> "$GITHUB_ENV" + echo "DOCS_URL=https://docs.expressionengine.com/latest" >> "$GITHUB_ENV" + else + echo "DOCSEARCH_INDEX=expressionengine7_staging" >> "$GITHUB_ENV" + echo "::add-mask::${{secrets.STAGING_DOCS_DOMAIN}}" + echo "DOCS_URL=${{secrets.STAGING_DOCS_URL}}" >> "$GITHUB_ENV" + fi + + - name: Configure Docsearch Index + uses: richardrigutins/replace-in-files@v2 + with: + search-text: "\"index_uid\": \"expressionengine\"" + replacement-text: "\"index_uid\": \"${{ env.DOCSEARCH_INDEX }}\"" + files: ./search.config.json + + - name: Configure Docs Url + uses: richardrigutins/replace-in-files@v2 + with: + search-text: "https://docs.expressionengine.com/latest" + replacement-text: ${{ env.DOCS_URL }} + files: ./search.config.json + + - name: Scrape Docs + env: + HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }} + API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} + run: | + docker run -t --rm \ + -e MEILISEARCH_HOST_URL=$HOST_URL \ + -e MEILISEARCH_API_KEY=$API_KEY \ + -v ./search.config.json:/docs-scraper/search.config.json \ + getmeili/docs-scraper:latest pipenv run ./docs_scraper search.config.json diff --git a/.gitignore b/.gitignore index ddf720f0c..8f212b3a6 100755 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ build/ node_modules/ .vscode/ +.ddev/ +.ddev diff --git a/.mailmap b/.mailmap index 0e82aac83..eb0b51694 100644 --- a/.mailmap +++ b/.mailmap @@ -1,8 +1,10 @@ Aaron Gustafson +Andy McCormick <55093827+ops-andy@users.noreply.github.com> Dan Decker Dan Decker Daniel Bingham Greg Aker +Geof Cowan Geoff Cowan Jordan Ellis Kevin Cupp Kevin Cupp @@ -21,6 +23,7 @@ Rob Sanchez Robin Sowell Seth Croston Barber Simon Job +Tom Jaeger Wes Baker Wes Baker 🤖 (bots/scripts/importers) diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..b00f5981f --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 18.0.0 diff --git a/AUTHORS.md b/AUTHORS.md index 09559c2be..3cc48d3e1 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -4,24 +4,36 @@ If an entry is incorrect or duplicated, add or correct the entry in `.mailmap` i - Aaron Gustafson - Adrienne L. Travis +- Alberto Priore - Alex MacDonald - Andy McCormick +- Bhavin9898 +- Brad - Brandon Jones - Brian Litzinger +- Colby Hill - Dan Decker - Daniel Bingham - Derek Jones +- Doug Black Jr - Douglas Black +- Eric Swierczek <2423727+swierczek@users.noreply.github.com> - Erwin Romkes - Gareth Davies +- Gavin * JCOGS - Geof Cowan +- George Whiting +- Gordon Naldrett - Greg Aker +- Jace Richardson - Jace Richardson - Jack McDade - James Mathias - Jason Matar - Jordan Ellis <18269476+Jordan-Ellis@users.noreply.github.com> - Jordan Ellis +- Josh Conner +- Kenan Fallon - Kevin Cupp - Kevin Smith - Kyle Cotter @@ -30,19 +42,38 @@ If an entry is incorrect or duplicated, add or correct the entry in `.mailmap` i - Matt Johnson - Nathan van Bakel - Neil Mac +- Oliver Cannell <36453035+ic360-com@users.noreply.github.com> - Pascal Kriete +- Paul Cripps - Quinn Chrzan +- River Kelly <65210753+RK311y@users.noreply.github.com> - Rob Sanchez - Robin Sowell +- Robson Sobral - Seth Croston Barber - Shane Eckert - Simon Job - Stefan Rechsteiner +- Stephen G <45797159+stephengalbraith@users.noreply.github.com> +- zdravvy <45797159+zdravvy@users.noreply.github.com> +- Terry Leigh Britton +- Tom Jaeger +- TomJaeger - Travis Smith +- Tyler Martin +- Vipin Gautam - Wes Baker +- Yuri Salimovskiy +- andy +- andy - dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> +- jeradsdesign +- robinsowell +- silenz88 +- skookie000 +- stephengalbraith <45797159+stephengalbraith@users.noreply.github.com> -![](https://www.gravatar.com/avatar/323311bb4cc5af1a4b2c5c26b4cfc5a3.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/28fd78ec7f39c9667c57ddcda6b83351.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/59dbcce3920cc5b199e2c44807010465.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/02553319e74f65aefabb110a9d83b121.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/44ef19fe2f0d9f5047279a585663fd67.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/069965463531f082c67fa8087eff0b05.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/3e9d57bf5c8481eca26817339b1a3bd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/29abcce86d2506d61ac673588eb8a7d1.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/bcf753700280546563d4a604e3a71060.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5ca14d9704b3eee3260127bfcc6ecf42.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/91b623a1ab555390e8929b9be687f4c7.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/91d827f8f25f63b8112790de73a1d938.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/f210d8404df5251a228ddd1704c7e776.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/06fa48390d4d830b110af14955586a93.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5113a79fa6bfde5c7e37186b530de617.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/d97bb7470a585d1f835e0830c01f0b20.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/5cd8a4f8e479da78fc66fbb2367399d4.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/437961e2d136fff00e34ac97951e2044.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/deca48a51c0d0773715ad951c0440756.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/aa4bb05aae17dee79b899506017a39ee.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/b3aee19cfd195316fa300ba8e57e6fd2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/135073ed48a5ff8fb6fcda84df0b5723.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/52b49de838ac68b9b5f7c9694a03bc2b.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/290aa1ca755c66ec25bb4906939329f3.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/7f90f19e42cbaa5d9a2fe07c22f471cb.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9628e9a39607342152d295ff42d4a415.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9e595a12c0f91ec69ce04db281b2eb8f.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/6dca8a36642550738e6eeb5c9a815e3c.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/1d157c5426bdf80e829b92446c930291.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/18b650e3eb0eb19d390b600b89c54a08.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/92508cc5ce3ed75dd47b4d508b0de8bd.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/9950bab22f7c1baaf19484f54cec5717.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/ec72c77b2a1e31882eaafa9c888c84eb.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/b7ad958da63fe6a6182f47391899d90c.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/218cd1d6a12024750e65a274b4932b42.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/df98acc8477e362af5f77be10c2edeac.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/abe6907032a1123faa49707bfb662ae2.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/94260e052fa9c0df9e87428d07c2966a.jpg?r=pg&d=robohash )![](https://www.gravatar.com/avatar/48ea49be76d0c68403a7f3df87e3487d.jpg?r=pg&d=robohash ) +![](https://www.gravatar.com/avatar/323311bb4cc5af1a4b2c5c26b4cfc5a3.jpg?r=pg&d=robohash ) Additionally, the following contributed content prior to 2011 when this repository was created: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aab12fd84..f7e669032 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ If you're an ExpressionEngine user, then you have something to add. There is alw ## Contributing to the Documentation -All of the source files exist under `docs/` and is where you will add new documentation or modify existing documentation. We recommend working from feature branches and making pull requests to the `stability` branch of this repo. +All of the source files exist under `docs/` and is where you will add new documentation or modify existing documentation. We recommend working from feature branches and making pull requests to the `#.dev` branch of this repo (See Branches below). Suggesting a change is easy and there is no way you'll mess up the public repo. @@ -18,6 +18,19 @@ Push your changes to your fork of the repository, and when you're done, [send us We'll take a look at your pull request, make sure everything looks alright, ask for any needed changes, and then merge it into the main code. +### Branches + +| Branch | Purpose | +| ------ | ------- | +| #.x | Currently released and published version. +| #.dev | Updates for the next version of ExpressionEngine (current version is the default branch). Does not exist for previous versions. | +** replace `#` with the current version of ExpressionEngine or version you wish to target. + +Recommended branch names are namespaced and unique, e.g.: + +- `feature/my-feature-slug` +- `bug/bug-description-slug` + ## Style Guide Please read the [style guide](https://docs.expressionengine.com/latest/style-guide.html) for samples and convention standards used in the ExpressionEngine user guide. diff --git a/README.md b/README.md index d3ad62951..65a71d986 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The ExpressionEngine user guide is written in human-readable Markdown and uses a ### Prerequisites -Building the docs requires Node and npm. +Building the docs requires Node and npm (latest stable version). In the root of the repository, install all the dependencies: @@ -30,14 +30,41 @@ The documentation css and js files are located under `theme/assets-src`. To build the theme assets, run `npm run buildAssets`. You can also dynamically rebuild the assets when a file changes: `npm run watchAssets`. +### Viewing local changes + +There are 2 options for viewing your local changes. + +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/). +2. Manually view any HTML file in `/build/` in your browser. For example, `file:///Users//Documents/ExpressionEngine-User-Guide/build/index.html` to view the home page. + +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). + +## Using DocSearch Locally + +First you will need to choose a docsearch index name to use for your local testing and set that in `config.yml` + +Then you will need to build the docs and serve a local copy. For simplicity's sake we recommend using the node http-server like this `npx http-server -o` + +Next you will need to update all the urls in `search.config.json` to point at your local copy of the documentation. Do a find/replace on `https://docs.expressionengine.com/latest` => `http://localhost:8080`. You will also need to update the `allowed_domains` array to include this new url. (If you are on a mac you may need to use `http://host.docker.internal:8080` instead so that the scraper container can connect to the docs on your local http-server.) + +Finally you can scrape your local docs with the following docker command + +``` +docker run -t --rm --network=host \ + -e MEILISEARCH_HOST_URL=https://docsearch.expressionengine.com \ + -e MEILISEARCH_API_KEY={{ SECRET_KEY }} \ + -v ./search.config.json:/docs-scraper/search.config.json \ + getmeili/docs-scraper:latest pipenv run ./docs_scraper search.config.json +``` + ## Contributing See something that needs fixing? Want to improve the user guide or make it more helpful? Great! Check out [CONTRIBUTING.md](CONTRIBUTING.md) for details. ## Copyright / License Notice -The ExpressionEngine project is copyright (c) 2003-2019 EllisLab Corp. ([https://ellislab.com](https://ellislab.com)) and is licensed under Apache License, Version 2.0. This project contains subcomponents with separate copyright and license terms, all of which are fully FOSS and compatible with Apache-2.0. +The ExpressionEngine project is copyright (c) 2003-2021 Packet Tide, LLC. ([https://packettide.com](https://packettide.com)) and is licensed under Apache License, Version 2.0. This project contains subcomponents with separate copyright and license terms, all of which are fully FOSS and compatible with Apache-2.0. Complete license terms and copyright information can be found in [LICENSE.txt](LICENSE.txt) in the root of this repository. -"ExpressionEngine" is a registered trademark of EllisLab, Inc. in the United States and around the world. Refer to EllisLab's [Trademark Use Policy](https://ellislab.com/trademark-use-policy) for access to logos and acceptable use. +"ExpressionEngine" is a registered trademark of Packet Tide, LLC. in the United States and around the world. Refer to ExpressionEngine's [Trademark Use Policy](https://expressionengine.com/about/trademark-use-policy) for access to logos and acceptable use. diff --git a/config.yml b/config.yml index f62d5499b..5b1d8b778 100644 --- a/config.yml +++ b/config.yml @@ -6,6 +6,7 @@ outputDir: build themeDir: theme customVariables: - current_version: '5.3.1' - current_year: 2020 - + current_version: '7' + current_year: 2024 + docsearch_index: 'expressionengine' + docsearch_public_key: '7d283b55c1d7c0e5f340c71b5dfc751d8dc625708f29e582134f7643bc95dbd7' diff --git a/docs/_downloads/EE6_Index_Admin.zip b/docs/_downloads/EE6_Index_Admin.zip new file mode 100644 index 000000000..b83f2fda4 Binary files /dev/null and b/docs/_downloads/EE6_Index_Admin.zip differ diff --git a/docs/_downloads/sample-atom.txt b/docs/_downloads/sample-atom.txt index 5555152a4..7539c8380 100755 --- a/docs/_downloads/sample-atom.txt +++ b/docs/_downloads/sample-atom.txt @@ -12,7 +12,7 @@ {gmt_edit_date format='%Y-%m-%dT%H:%i:%sZ'} Copyright (c) {gmt_date format="%Y"}, {author} - ExpressionEngine + ExpressionEngine tag:{trimmed_url},{gmt_date format="%Y:%m:%d"} {exp:channel:entries channel="{master_channel_name}" limit="15" dynamic_start="on" disable="member_data|pagination"} @@ -39,4 +39,4 @@ -{/exp:rss:feed} \ No newline at end of file +{/exp:rss:feed} diff --git a/docs/_downloads/sample-rss.txt b/docs/_downloads/sample-rss.txt index b1c5ac66b..e30bdd6f6 100755 --- a/docs/_downloads/sample-rss.txt +++ b/docs/_downloads/sample-rss.txt @@ -3,11 +3,11 @@ + xmlns:rdf="https://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:content="https://purl.org/rss/1.0/modules/content/"> @@ -18,7 +18,7 @@ {email} Copyright {gmt_date format="%Y"} {gmt_date format="%Y-%m-%dT%H:%i:%s%Q"} - + {exp:channel:entries channel="{master_channel_name}" limit="10" dynamic_start="on" disable="member_data|pagination"} diff --git a/docs/_images/2fa-cp-setup.png b/docs/_images/2fa-cp-setup.png new file mode 100644 index 000000000..ec50a5552 Binary files /dev/null and b/docs/_images/2fa-cp-setup.png differ diff --git a/docs/_images/2fa-cp-toggle.png b/docs/_images/2fa-cp-toggle.png new file mode 100644 index 000000000..191dcd929 Binary files /dev/null and b/docs/_images/2fa-cp-toggle.png differ diff --git a/docs/_images/6-1_cli.png b/docs/_images/6-1_cli.png new file mode 100644 index 000000000..7f9c9e713 Binary files /dev/null and b/docs/_images/6-1_cli.png differ diff --git a/docs/_images/add-on-html-string.png b/docs/_images/add-on-html-string.png new file mode 100644 index 000000000..da3ae9777 Binary files /dev/null and b/docs/_images/add-on-html-string.png differ diff --git a/docs/_images/add-on-main-body.png b/docs/_images/add-on-main-body.png new file mode 100644 index 000000000..891c1225d Binary files /dev/null and b/docs/_images/add-on-main-body.png differ diff --git a/docs/_images/add-on-mcp.png b/docs/_images/add-on-mcp.png new file mode 100644 index 000000000..8e3e3c816 Binary files /dev/null and b/docs/_images/add-on-mcp.png differ diff --git a/docs/_images/add-on-simple-view.png b/docs/_images/add-on-simple-view.png new file mode 100644 index 000000000..b88668335 Binary files /dev/null and b/docs/_images/add-on-simple-view.png differ diff --git a/docs/_images/add-on-view.png b/docs/_images/add-on-view.png new file mode 100644 index 000000000..94eced60b Binary files /dev/null and b/docs/_images/add-on-view.png differ diff --git a/docs/_images/addon_breadcrumbs.png b/docs/_images/addon_breadcrumbs.png new file mode 100644 index 000000000..9645d6ce8 Binary files /dev/null and b/docs/_images/addon_breadcrumbs.png differ diff --git a/docs/_images/addon_page.png b/docs/_images/addon_page.png new file mode 100644 index 000000000..26591962e Binary files /dev/null and b/docs/_images/addon_page.png differ diff --git a/docs/_images/addon_sidebar_start.png b/docs/_images/addon_sidebar_start.png new file mode 100644 index 000000000..484cde78a Binary files /dev/null and b/docs/_images/addon_sidebar_start.png differ diff --git a/docs/_images/addon_toolbar.png b/docs/_images/addon_toolbar.png new file mode 100644 index 000000000..57df8c454 Binary files /dev/null and b/docs/_images/addon_toolbar.png differ diff --git a/docs/_images/addons_text_formatting.png b/docs/_images/addons_text_formatting.png new file mode 100644 index 000000000..740a1722b Binary files /dev/null and b/docs/_images/addons_text_formatting.png differ diff --git a/docs/_images/admin-access-modal.png b/docs/_images/admin-access-modal.png new file mode 100644 index 000000000..1e022b3a2 Binary files /dev/null and b/docs/_images/admin-access-modal.png differ diff --git a/docs/_images/advanced-conditional.gif b/docs/_images/advanced-conditional.gif new file mode 100644 index 000000000..ba0efa740 Binary files /dev/null and b/docs/_images/advanced-conditional.gif differ diff --git a/docs/_images/advanced-conditional.png b/docs/_images/advanced-conditional.png new file mode 100644 index 000000000..6cdad9007 Binary files /dev/null and b/docs/_images/advanced-conditional.png differ diff --git a/docs/_images/all-conditions.png b/docs/_images/all-conditions.png new file mode 100644 index 000000000..569722774 Binary files /dev/null and b/docs/_images/all-conditions.png differ diff --git a/docs/_images/any-conditions.png b/docs/_images/any-conditions.png new file mode 100644 index 000000000..dfacd89cb Binary files /dev/null and b/docs/_images/any-conditions.png differ diff --git a/docs/_images/channel-publish-layouts.png b/docs/_images/channel-publish-layouts.png new file mode 100644 index 000000000..b49a38e51 Binary files /dev/null and b/docs/_images/channel-publish-layouts.png differ diff --git a/docs/_images/condition-example-1.png b/docs/_images/condition-example-1.png new file mode 100644 index 000000000..8b6dbed1a Binary files /dev/null and b/docs/_images/condition-example-1.png differ diff --git a/docs/_images/consent_log_setting.png b/docs/_images/consent_log_setting.png new file mode 100644 index 000000000..1e83e4e50 Binary files /dev/null and b/docs/_images/consent_log_setting.png differ diff --git a/docs/_images/cp-category-manager.png b/docs/_images/cp-category-manager.png old mode 100755 new mode 100644 index 003e9cbf7..9b8e4bdb0 Binary files a/docs/_images/cp-category-manager.png and b/docs/_images/cp-category-manager.png differ diff --git a/docs/_images/cp-channel-categories-tab.png b/docs/_images/cp-channel-categories-tab.png new file mode 100644 index 000000000..8743a2fd8 Binary files /dev/null and b/docs/_images/cp-channel-categories-tab.png differ diff --git a/docs/_images/cp-channel-manager.png b/docs/_images/cp-channel-manager.png old mode 100755 new mode 100644 index 4a8668030..d94b62689 Binary files a/docs/_images/cp-channel-manager.png and b/docs/_images/cp-channel-manager.png differ 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/_images/cp-collapse.gif b/docs/_images/cp-collapse.gif new file mode 100644 index 000000000..76b69b97d Binary files /dev/null and b/docs/_images/cp-collapse.gif differ diff --git a/docs/_images/cp-create.png b/docs/_images/cp-create.png old mode 100755 new mode 100644 index aae89565c..18b13e2d4 Binary files a/docs/_images/cp-create.png and b/docs/_images/cp-create.png differ diff --git a/docs/_images/cp-edit.png b/docs/_images/cp-edit.png index 650994536..9cda2ca0c 100755 Binary files a/docs/_images/cp-edit.png and b/docs/_images/cp-edit.png differ diff --git a/docs/_images/cp-entry-categories-tab.png b/docs/_images/cp-entry-categories-tab.png new file mode 100644 index 000000000..daee52bce Binary files /dev/null and b/docs/_images/cp-entry-categories-tab.png differ diff --git a/docs/_images/cp-entry-form-buttons.png b/docs/_images/cp-entry-form-buttons.png new file mode 100644 index 000000000..1bceb9f19 Binary files /dev/null and b/docs/_images/cp-entry-form-buttons.png differ diff --git a/docs/_images/cp-field-manager.png b/docs/_images/cp-field-manager.png old mode 100755 new mode 100644 index a24bb3782..c75478945 Binary files a/docs/_images/cp-field-manager.png and b/docs/_images/cp-field-manager.png differ diff --git a/docs/_images/cp-field-multiselect.png b/docs/_images/cp-field-multiselect.png new file mode 100644 index 000000000..d628a42c1 Binary files /dev/null and b/docs/_images/cp-field-multiselect.png differ diff --git a/docs/_images/cp-field-radio.png b/docs/_images/cp-field-radio.png new file mode 100644 index 000000000..aa99cf10e Binary files /dev/null and b/docs/_images/cp-field-radio.png differ diff --git a/docs/_images/cp-field-selectable.png b/docs/_images/cp-field-selectable.png new file mode 100644 index 000000000..2168a2c53 Binary files /dev/null and b/docs/_images/cp-field-selectable.png differ diff --git a/docs/_images/cp-fieldtype-value-slider.png b/docs/_images/cp-fieldtype-value-slider.png new file mode 100644 index 000000000..91770db44 Binary files /dev/null and b/docs/_images/cp-fieldtype-value-slider.png differ diff --git a/docs/_images/cp-file-manager-bulk-actions.png b/docs/_images/cp-file-manager-bulk-actions.png new file mode 100644 index 000000000..3c962bb96 Binary files /dev/null and b/docs/_images/cp-file-manager-bulk-actions.png differ diff --git a/docs/_images/cp-file-manager-delete-file.png b/docs/_images/cp-file-manager-delete-file.png new file mode 100644 index 000000000..361f6d263 Binary files /dev/null and b/docs/_images/cp-file-manager-delete-file.png differ diff --git a/docs/_images/cp-file-manager-edit.png b/docs/_images/cp-file-manager-edit.png new file mode 100644 index 000000000..e33908c01 Binary files /dev/null and b/docs/_images/cp-file-manager-edit.png differ diff --git a/docs/_images/cp-file-manager-filters.png b/docs/_images/cp-file-manager-filters.png new file mode 100644 index 000000000..c7cd36d82 Binary files /dev/null and b/docs/_images/cp-file-manager-filters.png differ diff --git a/docs/_images/cp-file-manager-move-file.png b/docs/_images/cp-file-manager-move-file.png new file mode 100644 index 000000000..db877ad5e Binary files /dev/null and b/docs/_images/cp-file-manager-move-file.png differ diff --git a/docs/_images/cp-file-manager-new-folder.png b/docs/_images/cp-file-manager-new-folder.png new file mode 100644 index 000000000..3a8bb11d5 Binary files /dev/null and b/docs/_images/cp-file-manager-new-folder.png differ diff --git a/docs/_images/cp-file-manager-thumb-view.png b/docs/_images/cp-file-manager-thumb-view.png new file mode 100644 index 000000000..3f879f971 Binary files /dev/null and b/docs/_images/cp-file-manager-thumb-view.png differ diff --git a/docs/_images/cp-file-manager-upload-directory.png b/docs/_images/cp-file-manager-upload-directory.png new file mode 100644 index 000000000..f28b8ebb3 Binary files /dev/null and b/docs/_images/cp-file-manager-upload-directory.png differ diff --git a/docs/_images/cp-file-manager.png b/docs/_images/cp-file-manager.png old mode 100755 new mode 100644 index a581a5e20..ff36badc2 Binary files a/docs/_images/cp-file-manager.png and b/docs/_images/cp-file-manager.png differ diff --git a/docs/_images/cp-general-settings.png b/docs/_images/cp-general-settings.png old mode 100755 new mode 100644 index 02a35fca0..fa06b8c0e Binary files a/docs/_images/cp-general-settings.png and b/docs/_images/cp-general-settings.png differ diff --git a/docs/_images/cp-members.png b/docs/_images/cp-members.png old mode 100755 new mode 100644 index f400fee4c..3d4a07684 Binary files a/docs/_images/cp-members.png and b/docs/_images/cp-members.png differ diff --git a/docs/_images/cp-select-channel.png b/docs/_images/cp-select-channel.png new file mode 100644 index 000000000..6e8e0bf1d Binary files /dev/null and b/docs/_images/cp-select-channel.png differ diff --git a/docs/_images/cp-select-manual.png b/docs/_images/cp-select-manual.png new file mode 100644 index 000000000..ce10f16bc Binary files /dev/null and b/docs/_images/cp-select-manual.png differ diff --git a/docs/_images/cp-template-generators.png b/docs/_images/cp-template-generators.png new file mode 100644 index 000000000..cb3b33ee1 Binary files /dev/null and b/docs/_images/cp-template-generators.png differ diff --git a/docs/_images/cp-template-manager.png b/docs/_images/cp-template-manager.png old mode 100755 new mode 100644 index df0b34770..8f1484a7c Binary files a/docs/_images/cp-template-manager.png and b/docs/_images/cp-template-manager.png differ diff --git a/docs/_images/cp-version-information.png b/docs/_images/cp-version-information.png new file mode 100644 index 000000000..5e218d469 Binary files /dev/null and b/docs/_images/cp-version-information.png differ diff --git a/docs/_images/cp_collapse_arrow.png b/docs/_images/cp_collapse_arrow.png new file mode 100644 index 000000000..832cab415 Binary files /dev/null and b/docs/_images/cp_collapse_arrow.png differ diff --git a/docs/_images/cp_comments.png b/docs/_images/cp_comments.png new file mode 100644 index 000000000..c11299392 Binary files /dev/null and b/docs/_images/cp_comments.png differ diff --git a/docs/_images/cp_fields_edit.png b/docs/_images/cp_fields_edit.png new file mode 100644 index 000000000..6fbd95ea3 Binary files /dev/null and b/docs/_images/cp_fields_edit.png differ diff --git a/docs/_images/cp_file-manager-filters.png b/docs/_images/cp_file-manager-filters.png new file mode 100644 index 000000000..8ca7454a8 Binary files /dev/null and b/docs/_images/cp_file-manager-filters.png differ diff --git a/docs/_images/cp_file-manager-listing.png b/docs/_images/cp_file-manager-listing.png new file mode 100644 index 000000000..323ca4e76 Binary files /dev/null and b/docs/_images/cp_file-manager-listing.png differ diff --git a/docs/_images/cp_file_manager_grid-view.png b/docs/_images/cp_file_manager_grid-view.png new file mode 100644 index 000000000..b33c5546b Binary files /dev/null and b/docs/_images/cp_file_manager_grid-view.png differ diff --git a/docs/_images/cp_file_manager_list-view.png b/docs/_images/cp_file_manager_list-view.png new file mode 100644 index 000000000..366d232cd Binary files /dev/null and b/docs/_images/cp_file_manager_list-view.png differ diff --git a/docs/_images/cp_file_manager_sidebar.png b/docs/_images/cp_file_manager_sidebar.png new file mode 100644 index 000000000..e5477eb9f Binary files /dev/null and b/docs/_images/cp_file_manager_sidebar.png differ diff --git a/docs/_images/cp_file_manager_sorting.png b/docs/_images/cp_file_manager_sorting.png new file mode 100644 index 000000000..24a8ac1df Binary files /dev/null and b/docs/_images/cp_file_manager_sorting.png differ diff --git a/docs/_images/cp_file_manager_utility_action.png b/docs/_images/cp_file_manager_utility_action.png new file mode 100644 index 000000000..72c6e9835 Binary files /dev/null and b/docs/_images/cp_file_manager_utility_action.png differ diff --git a/docs/_images/dashboard_gear_icon.png b/docs/_images/dashboard_gear_icon.png new file mode 100644 index 000000000..380349f4d Binary files /dev/null and b/docs/_images/dashboard_gear_icon.png differ diff --git a/docs/_images/dashboard_widget_example.png b/docs/_images/dashboard_widget_example.png new file mode 100644 index 000000000..84d269fff Binary files /dev/null and b/docs/_images/dashboard_widget_example.png differ diff --git a/docs/_images/ee-pro-dock-close.png b/docs/_images/ee-pro-dock-close.png new file mode 100644 index 000000000..bfcd0d765 Binary files /dev/null and b/docs/_images/ee-pro-dock-close.png differ diff --git a/docs/_images/ee-pro-dock-cp.png b/docs/_images/ee-pro-dock-cp.png new file mode 100644 index 000000000..b1fa91850 Binary files /dev/null and b/docs/_images/ee-pro-dock-cp.png differ diff --git a/docs/_images/ee-pro-dock-drag.png b/docs/_images/ee-pro-dock-drag.png new file mode 100644 index 000000000..a187f0314 Binary files /dev/null and b/docs/_images/ee-pro-dock-drag.png differ diff --git a/docs/_images/ee-pro-dock-entries.png b/docs/_images/ee-pro-dock-entries.png new file mode 100644 index 000000000..7ccb9d834 Binary files /dev/null and b/docs/_images/ee-pro-dock-entries.png differ diff --git a/docs/_images/ee-pro-dock-prolets.png b/docs/_images/ee-pro-dock-prolets.png new file mode 100644 index 000000000..6d25ff35b Binary files /dev/null and b/docs/_images/ee-pro-dock-prolets.png differ diff --git a/docs/_images/ee-pro-dock-tile.png b/docs/_images/ee-pro-dock-tile.png new file mode 100644 index 000000000..6ef61083a Binary files /dev/null and b/docs/_images/ee-pro-dock-tile.png differ diff --git a/docs/_images/ee-pro-dock-toggle.png b/docs/_images/ee-pro-dock-toggle.png new file mode 100644 index 000000000..53e565fd2 Binary files /dev/null and b/docs/_images/ee-pro-dock-toggle.png differ diff --git a/docs/_images/ee-pro-dock.png b/docs/_images/ee-pro-dock.png new file mode 100644 index 000000000..7635f9f29 Binary files /dev/null and b/docs/_images/ee-pro-dock.png differ diff --git a/docs/_images/ee-pro-license-error.png b/docs/_images/ee-pro-license-error.png new file mode 100644 index 000000000..906d3c98f Binary files /dev/null and b/docs/_images/ee-pro-license-error.png differ diff --git a/docs/_images/ee-pro-purchase-pro-cp.png b/docs/_images/ee-pro-purchase-pro-cp.png new file mode 100644 index 000000000..7b8bfe955 Binary files /dev/null and b/docs/_images/ee-pro-purchase-pro-cp.png differ diff --git a/docs/_images/ee-pro-save-reload.png b/docs/_images/ee-pro-save-reload.png new file mode 100644 index 000000000..16b4c75cc Binary files /dev/null and b/docs/_images/ee-pro-save-reload.png differ diff --git a/docs/_images/ee-pro-save.png b/docs/_images/ee-pro-save.png new file mode 100644 index 000000000..22230037b Binary files /dev/null and b/docs/_images/ee-pro-save.png differ diff --git a/docs/_images/ee-pro-site-license-key.png b/docs/_images/ee-pro-site-license-key.png new file mode 100644 index 000000000..e57d8ff73 Binary files /dev/null and b/docs/_images/ee-pro-site-license-key.png differ diff --git a/docs/_images/ee-pro-trial.png b/docs/_images/ee-pro-trial.png new file mode 100644 index 000000000..a6b119aca Binary files /dev/null and b/docs/_images/ee-pro-trial.png differ diff --git a/docs/_images/ee-pro-uninstall.png b/docs/_images/ee-pro-uninstall.png new file mode 100644 index 000000000..6d94aed47 Binary files /dev/null and b/docs/_images/ee-pro-uninstall.png differ diff --git a/docs/_images/ee-pro-valid-install.png b/docs/_images/ee-pro-valid-install.png new file mode 100644 index 000000000..7f723e09d Binary files /dev/null and b/docs/_images/ee-pro-valid-install.png differ diff --git a/docs/_images/ee-pro-window.png b/docs/_images/ee-pro-window.png new file mode 100644 index 000000000..9e08ddd4d Binary files /dev/null and b/docs/_images/ee-pro-window.png differ diff --git a/docs/_images/ee-role-channel-access.png b/docs/_images/ee-role-channel-access.png new file mode 100644 index 000000000..1faf77eda Binary files /dev/null and b/docs/_images/ee-role-channel-access.png differ diff --git a/docs/_images/ee5-offline.png b/docs/_images/ee5-offline.png new file mode 100644 index 000000000..e0bf0d948 Binary files /dev/null and b/docs/_images/ee5-offline.png differ diff --git a/docs/_images/ee6-404-settings.png b/docs/_images/ee6-404-settings.png new file mode 100644 index 000000000..3eb596103 Binary files /dev/null and b/docs/_images/ee6-404-settings.png differ diff --git a/docs/_images/ee6-new-entry.png b/docs/_images/ee6-new-entry.png new file mode 100644 index 000000000..28a067e04 Binary files /dev/null and b/docs/_images/ee6-new-entry.png differ diff --git a/docs/_images/ee6-offline.png b/docs/_images/ee6-offline.png new file mode 100644 index 000000000..4aa8ffd81 Binary files /dev/null and b/docs/_images/ee6-offline.png differ diff --git a/docs/_images/ee73-relationship-status.png b/docs/_images/ee73-relationship-status.png new file mode 100644 index 000000000..fa8a981b3 Binary files /dev/null and b/docs/_images/ee73-relationship-status.png differ diff --git a/docs/_images/ee_file_picker_populated.png b/docs/_images/ee_file_picker_populated.png new file mode 100644 index 000000000..cfa24f602 Binary files /dev/null and b/docs/_images/ee_file_picker_populated.png differ diff --git a/docs/_images/ee_file_picker_unpopulated.png b/docs/_images/ee_file_picker_unpopulated.png new file mode 100644 index 000000000..761e132d7 Binary files /dev/null and b/docs/_images/ee_file_picker_unpopulated.png differ diff --git a/docs/_images/eeu-logo-white.svg b/docs/_images/eeu-logo-white.svg new file mode 100644 index 000000000..a69d5ed81 --- /dev/null +++ b/docs/_images/eeu-logo-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/_images/entry_cloning_animation.gif b/docs/_images/entry_cloning_animation.gif new file mode 100644 index 000000000..d414e447e Binary files /dev/null and b/docs/_images/entry_cloning_animation.gif differ diff --git a/docs/_images/entry_cloning_global.png b/docs/_images/entry_cloning_global.png new file mode 100644 index 000000000..000897f44 Binary files /dev/null and b/docs/_images/entry_cloning_global.png differ diff --git a/docs/_images/entry_cloning_menu.png b/docs/_images/entry_cloning_menu.png new file mode 100644 index 000000000..325675fd1 Binary files /dev/null and b/docs/_images/entry_cloning_menu.png differ diff --git a/docs/_images/entry_cloning_setting.png b/docs/_images/entry_cloning_setting.png new file mode 100644 index 000000000..aea6cf826 Binary files /dev/null and b/docs/_images/entry_cloning_setting.png differ diff --git a/docs/_images/example-conditional-1.gif b/docs/_images/example-conditional-1.gif new file mode 100644 index 000000000..74a4640e2 Binary files /dev/null and b/docs/_images/example-conditional-1.gif differ diff --git a/docs/_images/export_templates.png b/docs/_images/export_templates.png new file mode 100644 index 000000000..cff0bfbf0 Binary files /dev/null and b/docs/_images/export_templates.png differ diff --git a/docs/_images/field-conditional-toggle.gif b/docs/_images/field-conditional-toggle.gif new file mode 100644 index 000000000..c447e6202 Binary files /dev/null and b/docs/_images/field-conditional-toggle.gif differ diff --git a/docs/_images/field_color_picker.png b/docs/_images/field_color_picker.png new file mode 100644 index 000000000..a7f230a41 Binary files /dev/null and b/docs/_images/field_color_picker.png differ diff --git a/docs/_images/field_date.png b/docs/_images/field_date.png new file mode 100644 index 000000000..6eea490ab Binary files /dev/null and b/docs/_images/field_date.png differ diff --git a/docs/_images/field_duration.png b/docs/_images/field_duration.png new file mode 100644 index 000000000..944c14e74 Binary files /dev/null and b/docs/_images/field_duration.png differ diff --git a/docs/_images/field_email.png b/docs/_images/field_email.png new file mode 100644 index 000000000..13dfb6340 Binary files /dev/null and b/docs/_images/field_email.png differ diff --git a/docs/_images/field_file.png b/docs/_images/field_file.png new file mode 100644 index 000000000..b56def094 Binary files /dev/null and b/docs/_images/field_file.png differ diff --git a/docs/_images/field_file_file.png b/docs/_images/field_file_file.png new file mode 100644 index 000000000..d605958d1 Binary files /dev/null and b/docs/_images/field_file_file.png differ diff --git a/docs/_images/field_file_grid.png b/docs/_images/field_file_grid.png new file mode 100644 index 000000000..c8af58379 Binary files /dev/null and b/docs/_images/field_file_grid.png differ diff --git a/docs/_images/field_fluid.png b/docs/_images/field_fluid.png new file mode 100644 index 000000000..322048791 Binary files /dev/null and b/docs/_images/field_fluid.png differ diff --git a/docs/_images/field_grid.png b/docs/_images/field_grid.png new file mode 100644 index 000000000..193e5b177 Binary files /dev/null and b/docs/_images/field_grid.png differ diff --git a/docs/_images/field_members.png b/docs/_images/field_members.png new file mode 100644 index 000000000..ef0933aba Binary files /dev/null and b/docs/_images/field_members.png differ diff --git a/docs/_images/field_number.png b/docs/_images/field_number.png new file mode 100644 index 000000000..3e6ee1b6f Binary files /dev/null and b/docs/_images/field_number.png differ diff --git a/docs/_images/field_rte.png b/docs/_images/field_rte.png new file mode 100644 index 000000000..dc28edea7 Binary files /dev/null and b/docs/_images/field_rte.png differ diff --git a/docs/_images/field_select.png b/docs/_images/field_select.png new file mode 100644 index 000000000..c71ed5744 Binary files /dev/null and b/docs/_images/field_select.png differ diff --git a/docs/_images/field_selectable_buttons.png b/docs/_images/field_selectable_buttons.png new file mode 100644 index 000000000..da1c309ca Binary files /dev/null and b/docs/_images/field_selectable_buttons.png differ diff --git a/docs/_images/field_short_name.png b/docs/_images/field_short_name.png new file mode 100644 index 000000000..b050d0d10 Binary files /dev/null and b/docs/_images/field_short_name.png differ diff --git a/docs/_images/field_slider.png b/docs/_images/field_slider.png new file mode 100644 index 000000000..13792ae52 Binary files /dev/null and b/docs/_images/field_slider.png differ diff --git a/docs/_images/field_text.png b/docs/_images/field_text.png new file mode 100644 index 000000000..cced759ad Binary files /dev/null and b/docs/_images/field_text.png differ diff --git a/docs/_images/field_textarea.png b/docs/_images/field_textarea.png new file mode 100644 index 000000000..418fbbaff Binary files /dev/null and b/docs/_images/field_textarea.png differ diff --git a/docs/_images/field_toggle.png b/docs/_images/field_toggle.png new file mode 100644 index 000000000..75ffd05ba Binary files /dev/null and b/docs/_images/field_toggle.png differ diff --git a/docs/_images/field_url.png b/docs/_images/field_url.png new file mode 100644 index 000000000..49ddc6e5f Binary files /dev/null and b/docs/_images/field_url.png differ diff --git a/docs/_images/file_manager_sync.png b/docs/_images/file_manager_sync.png new file mode 100644 index 000000000..ddff0797f Binary files /dev/null and b/docs/_images/file_manager_sync.png differ diff --git a/docs/_images/file_manager_sync_page.png b/docs/_images/file_manager_sync_page.png new file mode 100644 index 000000000..2d23bad9b Binary files /dev/null and b/docs/_images/file_manager_sync_page.png differ diff --git a/docs/_images/filed_relationships.png b/docs/_images/filed_relationships.png new file mode 100644 index 000000000..8cc1a9d0e Binary files /dev/null and b/docs/_images/filed_relationships.png differ diff --git a/docs/_images/gear_icon.png b/docs/_images/gear_icon.png new file mode 100644 index 000000000..9145169d0 Binary files /dev/null and b/docs/_images/gear_icon.png differ diff --git a/docs/_images/icon_edit.png b/docs/_images/icon_edit.png new file mode 100644 index 000000000..ec421f13f Binary files /dev/null and b/docs/_images/icon_edit.png differ diff --git a/docs/_images/icon_edit_meta.png b/docs/_images/icon_edit_meta.png new file mode 100644 index 000000000..7dd68aa4a Binary files /dev/null and b/docs/_images/icon_edit_meta.png differ diff --git a/docs/_images/icon_remove.png b/docs/_images/icon_remove.png new file mode 100644 index 000000000..be400d33e Binary files /dev/null and b/docs/_images/icon_remove.png differ diff --git a/docs/_images/left.png b/docs/_images/left.png new file mode 100755 index 000000000..5d2947392 Binary files /dev/null and b/docs/_images/left.png differ diff --git a/docs/_images/member_new_notifications.png b/docs/_images/member_new_notifications.png new file mode 100644 index 000000000..56d44a167 Binary files /dev/null and b/docs/_images/member_new_notifications.png differ diff --git a/docs/_images/member_notification_recipients.png b/docs/_images/member_notification_recipients.png new file mode 100644 index 000000000..b369a0d07 Binary files /dev/null and b/docs/_images/member_notification_recipients.png differ diff --git a/docs/_images/member_order_by.png b/docs/_images/member_order_by.png new file mode 100644 index 000000000..72310efa8 Binary files /dev/null and b/docs/_images/member_order_by.png differ diff --git a/docs/_images/member_profile_theme.png b/docs/_images/member_profile_theme.png new file mode 100644 index 000000000..65d7f2b1c Binary files /dev/null and b/docs/_images/member_profile_theme.png differ diff --git a/docs/_images/member_sort_by.png b/docs/_images/member_sort_by.png new file mode 100644 index 000000000..e5d7410ab Binary files /dev/null and b/docs/_images/member_sort_by.png differ diff --git a/docs/_images/member_total_results.png b/docs/_images/member_total_results.png new file mode 100644 index 000000000..646ca06cf Binary files /dev/null and b/docs/_images/member_total_results.png differ diff --git a/docs/_images/members_activation_redirect_url.png b/docs/_images/members_activation_redirect_url.png new file mode 100644 index 000000000..3c713c4a3 Binary files /dev/null and b/docs/_images/members_activation_redirect_url.png differ diff --git a/docs/_images/members_activation_type.png b/docs/_images/members_activation_type.png new file mode 100644 index 000000000..e31c0c711 Binary files /dev/null and b/docs/_images/members_activation_type.png differ diff --git a/docs/_images/members_allow_registrations.png b/docs/_images/members_allow_registrations.png new file mode 100644 index 000000000..a9305dfa9 Binary files /dev/null and b/docs/_images/members_allow_registrations.png differ diff --git a/docs/_images/members_auto_login_activation.png b/docs/_images/members_auto_login_activation.png new file mode 100644 index 000000000..902b2d231 Binary files /dev/null and b/docs/_images/members_auto_login_activation.png differ diff --git a/docs/_images/members_default_role.png b/docs/_images/members_default_role.png new file mode 100644 index 000000000..4214e9938 Binary files /dev/null and b/docs/_images/members_default_role.png differ diff --git a/docs/_images/members_notify_approval.png b/docs/_images/members_notify_approval.png new file mode 100644 index 000000000..1203c9a02 Binary files /dev/null and b/docs/_images/members_notify_approval.png differ diff --git a/docs/_images/members_notify_decline.png b/docs/_images/members_notify_decline.png new file mode 100644 index 000000000..6e7977bf5 Binary files /dev/null and b/docs/_images/members_notify_decline.png differ diff --git a/docs/_images/members_require_terms.png b/docs/_images/members_require_terms.png new file mode 100644 index 000000000..8e21ca567 Binary files /dev/null and b/docs/_images/members_require_terms.png differ diff --git a/docs/_images/members_time_prefs.png b/docs/_images/members_time_prefs.png new file mode 100644 index 000000000..7da7f4804 Binary files /dev/null and b/docs/_images/members_time_prefs.png differ diff --git a/docs/_images/msm_color_code_site.png b/docs/_images/msm_color_code_site.png new file mode 100644 index 000000000..0c6170057 Binary files /dev/null and b/docs/_images/msm_color_code_site.png differ diff --git a/docs/_images/msm_new_site.png b/docs/_images/msm_new_site.png new file mode 100644 index 000000000..f6e612cdd Binary files /dev/null and b/docs/_images/msm_new_site.png differ diff --git a/docs/_images/multiple-conditions.gif b/docs/_images/multiple-conditions.gif new file mode 100644 index 000000000..ba6d9a60a Binary files /dev/null and b/docs/_images/multiple-conditions.gif differ diff --git a/docs/_images/multiple-conditions.png b/docs/_images/multiple-conditions.png new file mode 100644 index 000000000..a49a34431 Binary files /dev/null and b/docs/_images/multiple-conditions.png differ diff --git a/docs/_images/navigation-collapse.png b/docs/_images/navigation-collapse.png new file mode 100644 index 000000000..044b73066 Binary files /dev/null and b/docs/_images/navigation-collapse.png differ diff --git a/docs/_images/note-content.png b/docs/_images/note-content.png new file mode 100644 index 000000000..25553c756 Binary files /dev/null and b/docs/_images/note-content.png differ diff --git a/docs/_images/notes.png b/docs/_images/notes.png new file mode 100644 index 000000000..6450332c5 Binary files /dev/null and b/docs/_images/notes.png differ diff --git a/docs/_images/overview.png b/docs/_images/overview.png old mode 100755 new mode 100644 index 074a2400a..d1ee3870f Binary files a/docs/_images/overview.png and b/docs/_images/overview.png differ diff --git a/docs/_images/php-logo.svg b/docs/_images/php-logo.svg new file mode 100644 index 000000000..2046d1bdd --- /dev/null +++ b/docs/_images/php-logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/_images/pro_branding_settings.png b/docs/_images/pro_branding_settings.png new file mode 100644 index 000000000..a3a0fa3b3 Binary files /dev/null and b/docs/_images/pro_branding_settings.png differ diff --git a/docs/_images/pro_consent_export.png b/docs/_images/pro_consent_export.png new file mode 100644 index 000000000..f4f9fd88a Binary files /dev/null and b/docs/_images/pro_consent_export.png differ diff --git a/docs/_images/pro_cookie_settings.png b/docs/_images/pro_cookie_settings.png new file mode 100644 index 000000000..dfe445682 Binary files /dev/null and b/docs/_images/pro_cookie_settings.png differ diff --git a/docs/_images/pro_dashboard_management.gif b/docs/_images/pro_dashboard_management.gif new file mode 100644 index 000000000..34943e6ce Binary files /dev/null and b/docs/_images/pro_dashboard_management.gif differ diff --git a/docs/_images/pro_edit.png b/docs/_images/pro_edit.png new file mode 100644 index 000000000..288b589d4 Binary files /dev/null and b/docs/_images/pro_edit.png differ diff --git a/docs/_images/pro_general_settings.png b/docs/_images/pro_general_settings.png new file mode 100644 index 000000000..d94bbadbc Binary files /dev/null and b/docs/_images/pro_general_settings.png differ diff --git a/docs/_images/pro_grab.png b/docs/_images/pro_grab.png new file mode 100644 index 000000000..4991b59c8 Binary files /dev/null and b/docs/_images/pro_grab.png differ diff --git a/docs/_images/pro_role_access.png b/docs/_images/pro_role_access.png new file mode 100644 index 000000000..93b7dceab Binary files /dev/null and b/docs/_images/pro_role_access.png differ diff --git a/docs/_images/pro_template_settings.png b/docs/_images/pro_template_settings.png new file mode 100644 index 000000000..46fa04e7b Binary files /dev/null and b/docs/_images/pro_template_settings.png differ diff --git a/docs/_images/pro_unsaved_changes.png b/docs/_images/pro_unsaved_changes.png new file mode 100644 index 000000000..c6f7f4739 Binary files /dev/null and b/docs/_images/pro_unsaved_changes.png differ diff --git a/docs/_images/pro_visibility.png b/docs/_images/pro_visibility.png new file mode 100644 index 000000000..d31b0e2ee Binary files /dev/null and b/docs/_images/pro_visibility.png differ diff --git a/docs/_images/prolet_example.png b/docs/_images/prolet_example.png new file mode 100644 index 000000000..99961fe98 Binary files /dev/null and b/docs/_images/prolet_example.png differ diff --git a/docs/_images/relationship-ui.png b/docs/_images/relationship-ui.png new file mode 100644 index 000000000..e0da14698 Binary files /dev/null and b/docs/_images/relationship-ui.png differ diff --git a/docs/_images/ribbon.svg b/docs/_images/ribbon.svg new file mode 100644 index 000000000..c6b074b58 --- /dev/null +++ b/docs/_images/ribbon.svg @@ -0,0 +1,7 @@ + + + Shape + + + + \ No newline at end of file diff --git a/docs/_images/right.png b/docs/_images/right.png new file mode 100755 index 000000000..f4ef9c182 Binary files /dev/null and b/docs/_images/right.png differ diff --git a/docs/_images/rss-parser-readme.png b/docs/_images/rss-parser-readme.png old mode 100755 new mode 100644 index f5d58c388..389567e93 Binary files a/docs/_images/rss-parser-readme.png and b/docs/_images/rss-parser-readme.png differ diff --git a/docs/_images/rte-at-mentions.png b/docs/_images/rte-at-mentions.png new file mode 100644 index 000000000..f1e1c747e Binary files /dev/null and b/docs/_images/rte-at-mentions.png differ diff --git a/docs/_images/rte-buttons.png b/docs/_images/rte-buttons.png new file mode 100644 index 000000000..c75b79a9d Binary files /dev/null and b/docs/_images/rte-buttons.png differ diff --git a/docs/_images/rte_js.gif b/docs/_images/rte_js.gif new file mode 100644 index 000000000..73140d674 Binary files /dev/null and b/docs/_images/rte_js.gif differ diff --git a/docs/_images/shared-form-1.png b/docs/_images/shared-form-1.png old mode 100755 new mode 100644 index 25b261857..ca7826c11 Binary files a/docs/_images/shared-form-1.png and b/docs/_images/shared-form-1.png differ diff --git a/docs/_images/shared-form-2.png b/docs/_images/shared-form-2.png old mode 100755 new mode 100644 index e7e3dcbbf..ede8cfdae Binary files a/docs/_images/shared-form-2.png and b/docs/_images/shared-form-2.png differ diff --git a/docs/_images/softaculous2.png b/docs/_images/softaculous2.png new file mode 100644 index 000000000..2cf46b782 Binary files /dev/null and b/docs/_images/softaculous2.png differ diff --git a/docs/_images/sort-relationship.gif b/docs/_images/sort-relationship.gif new file mode 100644 index 000000000..95c3b6a40 Binary files /dev/null and b/docs/_images/sort-relationship.gif differ diff --git a/docs/_images/structure_tab.png b/docs/_images/structure_tab.png new file mode 100644 index 000000000..c236d3d02 Binary files /dev/null and b/docs/_images/structure_tab.png differ diff --git a/docs/_images/table-service-1.png b/docs/_images/table-service-1.png old mode 100755 new mode 100644 index 4762dd0fd..96e738f17 Binary files a/docs/_images/table-service-1.png and b/docs/_images/table-service-1.png differ diff --git a/docs/_images/table-service-2.png b/docs/_images/table-service-2.png old mode 100755 new mode 100644 index e55994234..9273e6493 Binary files a/docs/_images/table-service-2.png and b/docs/_images/table-service-2.png differ diff --git a/docs/_images/table-service-3.png b/docs/_images/table-service-3.png old mode 100755 new mode 100644 index 8e11a232a..886e4a138 Binary files a/docs/_images/table-service-3.png and b/docs/_images/table-service-3.png differ diff --git a/docs/_images/table-service-4.png b/docs/_images/table-service-4.png old mode 100755 new mode 100644 index b5e1a0d17..179ab37c1 Binary files a/docs/_images/table-service-4.png and b/docs/_images/table-service-4.png differ diff --git a/docs/_images/template-edit.png b/docs/_images/template-edit.png new file mode 100644 index 000000000..4ce32ea76 Binary files /dev/null and b/docs/_images/template-edit.png differ diff --git a/docs/_images/template-settings.png b/docs/_images/template-settings.png old mode 100755 new mode 100644 index b9663cad4..ea03c750c Binary files a/docs/_images/template-settings.png and b/docs/_images/template-settings.png differ diff --git a/docs/_images/templates-list.png b/docs/_images/templates-list.png new file mode 100644 index 000000000..5537e3d64 Binary files /dev/null and b/docs/_images/templates-list.png differ diff --git a/docs/_images/the-big-picture-channels.png b/docs/_images/the-big-picture-channels.png index c39b95f53..8bdb546fe 100644 Binary files a/docs/_images/the-big-picture-channels.png and b/docs/_images/the-big-picture-channels.png differ diff --git a/docs/_images/the-big-picture-templates.png b/docs/_images/the-big-picture-templates.png index 0820fd5fc..d18dad074 100644 Binary files a/docs/_images/the-big-picture-templates.png and b/docs/_images/the-big-picture-templates.png differ diff --git a/docs/_images/utilities-cache.png b/docs/_images/utilities-cache.png new file mode 100644 index 000000000..a0664baa5 Binary files /dev/null and b/docs/_images/utilities-cache.png differ diff --git a/docs/_images/utilities-communicate.png b/docs/_images/utilities-communicate.png new file mode 100644 index 000000000..da4c61cd4 Binary files /dev/null and b/docs/_images/utilities-communicate.png differ diff --git a/docs/_images/utilities-debug-fieldtypes.png b/docs/_images/utilities-debug-fieldtypes.png new file mode 100644 index 000000000..cb4574e40 Binary files /dev/null and b/docs/_images/utilities-debug-fieldtypes.png differ diff --git a/docs/_images/utilities-debug-tags.png b/docs/_images/utilities-debug-tags.png new file mode 100644 index 000000000..f71d0e7c9 Binary files /dev/null and b/docs/_images/utilities-debug-tags.png differ diff --git a/docs/_images/utilities-extensions.png b/docs/_images/utilities-extensions.png new file mode 100644 index 000000000..55a8d0527 Binary files /dev/null and b/docs/_images/utilities-extensions.png differ diff --git a/docs/_images/utilities-query.png b/docs/_images/utilities-query.png new file mode 100644 index 000000000..9bee8f486 Binary files /dev/null and b/docs/_images/utilities-query.png differ diff --git a/docs/_images/utilities-sandr.png b/docs/_images/utilities-sandr.png new file mode 100644 index 000000000..cac97fae2 Binary files /dev/null and b/docs/_images/utilities-sandr.png differ diff --git a/docs/_images/utilities-sent.png b/docs/_images/utilities-sent.png new file mode 100644 index 000000000..096ccd2d9 Binary files /dev/null and b/docs/_images/utilities-sent.png differ diff --git a/docs/_images/utilities-stats.png b/docs/_images/utilities-stats.png new file mode 100644 index 000000000..de8079a18 Binary files /dev/null and b/docs/_images/utilities-stats.png differ diff --git a/docs/_images/utilities-sync-conditional-fields.png b/docs/_images/utilities-sync-conditional-fields.png new file mode 100644 index 000000000..a5cbb5a7b Binary files /dev/null and b/docs/_images/utilities-sync-conditional-fields.png differ diff --git a/docs/_images/utilities-translation-edit.png b/docs/_images/utilities-translation-edit.png new file mode 100644 index 000000000..8346c5558 Binary files /dev/null and b/docs/_images/utilities-translation-edit.png differ diff --git a/docs/_images/utilities-translation-list.png b/docs/_images/utilities-translation-list.png new file mode 100644 index 000000000..823e31267 Binary files /dev/null and b/docs/_images/utilities-translation-list.png differ diff --git a/docs/_images/valuelabel1.png b/docs/_images/valuelabel1.png old mode 100755 new mode 100644 index d874acd04..5c50cc785 Binary files a/docs/_images/valuelabel1.png and b/docs/_images/valuelabel1.png differ diff --git a/docs/_images/valuelabel2.png b/docs/_images/valuelabel2.png old mode 100755 new mode 100644 index 96f6d5a74..cc97f48d6 Binary files a/docs/_images/valuelabel2.png and b/docs/_images/valuelabel2.png differ diff --git a/docs/_images/waves.svg b/docs/_images/waves.svg new file mode 100755 index 000000000..1ba33aec9 --- /dev/null +++ b/docs/_images/waves.svg @@ -0,0 +1,30 @@ + + + waves + + + + + + \ No newline at end of file diff --git a/docs/_images/welcome-image.svg b/docs/_images/welcome-image.svg new file mode 100644 index 000000000..8c1f16640 --- /dev/null +++ b/docs/_images/welcome-image.svg @@ -0,0 +1,247 @@ + + + illustration-hero-features + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_tips/form-attributes.md b/docs/_tips/form-attributes.md new file mode 100644 index 000000000..c71543ebb --- /dev/null +++ b/docs/_tips/form-attributes.md @@ -0,0 +1 @@ +TIP: Valid HTML Form attributes (as listed in the [config file](config/config-files.md#html-form-attributes)), `data-` and `aria-` attributes passed through ExpressionEngine tag parameters in the template will be included into generated opening form tag. \ No newline at end of file diff --git a/docs/_tips/form-validation.md b/docs/_tips/form-validation.md new file mode 100644 index 000000000..b6936d17c --- /dev/null +++ b/docs/_tips/form-validation.md @@ -0,0 +1 @@ +TIP: **Tip:** This form utilizes template [form validation and error handling](/templates/form-validation.md). Refer to the documentation for additional parameters and variables that are available to this tag. \ No newline at end of file diff --git a/docs/add-ons/blacklist.md b/docs/add-ons/blocklist.md similarity index 62% rename from docs/add-ons/blacklist.md rename to docs/add-ons/blocklist.md index 1ae321797..77ed98c2f 100755 --- a/docs/add-ons/blacklist.md +++ b/docs/add-ons/blocklist.md @@ -3,39 +3,39 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> -# Black/White List +# Block/Allow List [TOC] -**Control Panel Location:** `Developer --> Add-Ons --> Black/White List` +**Control Panel Location:** `Developer --> Add-Ons --> Block/Allow List` -The Blacklist/Whitelist Module is one of ExpressionEngine's native spam prevention systems. It helps prevent spam from occurring in comments, referrers, and other posted information. Used in combination with other [Spam Prevention Features](security/spam-protection.md), the occurrence of spam on your site should be rare. +The Block/Allow Module is one of ExpressionEngine's native spam prevention systems. It helps prevent spam from occurring in comments, referrers, and other posted information. Used in combination with other [Spam Prevention Features](security/spam-protection.md), the occurrence of spam on your site should be rare. -## Blacklist +## Block List -The Blacklist lets you specify content that will trigger ExpressionEngine to deny or delete a comment, referrer, or other posted information. For instance, if you are receiving spam from a particular IP address, then you can place that address into the Blacklist and EE will no longer accept data originating from that IP address. +The Block list lets you specify content that will trigger ExpressionEngine to deny or delete a comment, referrer, or other posted information. For instance, if you are receiving spam from a particular IP address, then you can place that address into the Block list and EE will no longer accept data originating from that IP address. -### Specifying Blacklisted Content +### Specifying Blocked Content -There are three types of content that you can add to the Blacklist: +There are three types of content that you can add to the Block list: 1. **IP Address:** You may place IP addresses on separate lines. For example, you could place 127.255.0.123 in the list. You may also place partial IP addresses, which means that ExpressionEngine will match all of the addresses contained within that submask. For instance, if you specify 127.255.0 then EE will match "127.255.0.0" through "127.255.0.255". 2. **URL:** URLs or URL fragments can be placed here, with each entry on a separate line. For instance, you could specify www.spam-king.com and EE would match any incoming URLs from that domain to block. Likewise, you could specify simply the word spam and EE would match any URL that contained that word, whether it was "www.spam-king.com" or "www.i-eat-spam.com". -3. **User-Agent:** A "user agent" is the actual program or script that accesses your website. This could be a browser, search engine spider, RSS aggregator, or something else. These all identify themselves in some way with a user agent name. You may specify user agents to block/deny here, with each entry on a separate line. For instance, the user agent "Popdexter" is included in the downloadable ExpressionEngine.com Blacklist. As with the other settings, you may specify partial strings and EE will match any user agent that contains that string. +3. **User-Agent:** A "user agent" is the actual program or script that accesses your website. This could be a browser, search engine spider, RSS aggregator, or something else. These all identify themselves in some way with a user agent name. You may specify user agents to block/deny here, with each entry on a separate line. For instance, the user agent "Popdexter" is included in the downloadable ExpressionEngine.com Block list. As with the other settings, you may specify partial strings and EE will match any user agent that contains that string. -NOTE: **Note:** ExpressionEngine does **not** search through existing comments and delete them when new items are added to the Blacklist. Mass deleting of comments via a simple search of a term is not recommended, since it might have unforeseen results and the deleted comments are not retrievable. +NOTE: **Note:** ExpressionEngine does **not** search through existing comments and delete them when new items are added to the Block list. Mass deleting of comments via a simple search of a term is not recommended, since it might have unforeseen results and the deleted comments are not retrievable. -## Whitelist +## Allow List -The Whitelist is effectively the opposite of the Blacklist. It allows you to specify items that you _do_ want to allow. For instance, let's say that you specify the word spam in the "URL" section of the Blacklist. However, you actually really love the food Spam and thus you want to make sure that your friend over at www.i-eat-spam.com can post comments to your site. So, you can add i-eat-spam.com to your Whitelist to make sure that she isn't blocked. +The Allow list is effectively the opposite of the Block list. It allows you to specify items that you _do_ want to allow. For instance, let's say that you specify the word spam in the "URL" section of the Block list. However, you actually really love the food Spam and thus you want to make sure that your friend over at www.i-eat-spam.com can post comments to your site. So, you can add i-eat-spam.com to your Allow list to make sure that she isn't blocked. -### Specifying Whitelisted Content +### Specifying Allowed Content -There are three types of content that you can add to the Whitelist. These are identical to the ones in the Blacklist: +There are three types of content that you can add to the Allow list. These are identical to the ones in the Block list: 1. **IP Address:** You may place IP addresses on separate lines. For example, you could place 127.255.0.123 in the list. You may also place partial IP addresses, which means that ExpressionEngine will match all of the addresses contained within that submask. For instance, if you specify 127.255.0 then EE will match "127.255.0.0" through "127.255.0.255". 2. **URL:** URLs or URL fragments can be placed here, with each entry on a separate line. For instance, you could specify www.spam-king.com and EE would match any incoming URLs from that domain to allow. Likewise, you could specify simply the word spam and EE would allow any URL that contained that word, whether it was "www.spam-king.com" or "www.i-eat-spam.com". @@ -43,17 +43,17 @@ There are three types of content that you can add to the Whitelist. These are id ## Downloading ExpressionEngine.com Lists -EllisLab, Inc. maintains its own Blacklist and Whitelist. These lists are maintained with the help of our users. If you have an IP address, user agent, or URL that you believe should be added to the Blacklist or Whitelist, please email . +Packet Tide, LLC maintains its own Block list and Allow list. These lists are maintained with the help of our users. If you have an IP address, user agent, or URL that you believe should be added to the Block list or Allow list, please email . -To download the Lists, go into the `Developer --> Add-Ons --> Black/White List`. In the main menu for the module are links that you can click to automatically download and add the ExpressionEngine.com Lists to your own. +To download the Lists, go into the `Developer --> Add-Ons --> Block/Allow List`. In the main menu for the module are links that you can click to automatically download and add the ExpressionEngine.com Lists to your own. ExpressionEngine will compare the downloaded list to your local list and add any new entries to the end of your lists. EE will not delete or alter any of your existing items in your lists. -NOTE: **Note:** Downloading the ExpressionEngine.com Blacklist and Whitelist requires that your host have outgoing socket connections enabled on your server and the 'fsockopen()' PHP function available. This configuration is quite common on most web hosts and default server configurations. +NOTE: **Note:** Downloading the ExpressionEngine.com Block and Allow List requires that your host have outgoing socket connections enabled on your server and the 'fsockopen()' PHP function available. This configuration is quite common on most web hosts and default server configurations. -## Writing Blacklist to .htaccess File +## Writing the Block list to .htaccess File -If you are on an Apache-based webserver, you can have ExpressionEngine copy your Blacklist URLs and IP addresses to a .htaccess file so that visitors matching those Blacklist terms are completely blocked from accessing your site. In order to use this feature several things must be done. +If you are on an Apache-based webserver, you can have ExpressionEngine copy your Block list URLs and IP addresses to a .htaccess file so that visitors matching those blocked terms are completely blocked from accessing your site. In order to use this feature several things must be done. 1. You must be on an Apache-based webserver. Further, the server must be set up to allow you to use .htaccess files. If you are unsure whether this applies to you, check with your Host. This method _will not_ work on non-Apache servers such as those using Windows' IIS server. 2. You must have a .htaccess file at your site root. If you do not have one already, create a blank text file and name it .htaccess. If you already have a .htaccess file, don't worry since ExpressionEngine will not overwrite existing content or delete the file; it will only add new content. @@ -64,6 +64,6 @@ If you are on an Apache-based webserver, you can have ExpressionEngine copy your You **must** include the .htaccess filename, so be sure to include it. If you do not know what to use for your full server path, contact your Host or server admin. -5. Press the Save Settings button on the form and ExpressionEngine will add the contents of your Blacklist to the .htaccess file, blocking them from being able to access your site at all. +5. Press the Save Settings button on the form and ExpressionEngine will add the contents of your Block list to the .htaccess file, blocking them from being able to access your site at all. Also note that an "override" is included for any referrers that include your own server name (i.e. example.com) to make sure that there is no chance that you block your own site by accident. In order to include this "override" you need to ensure that your "Cookie Domain" preference is set under `Settings --> Security & Privacy`. diff --git a/docs/add-ons/consent.md b/docs/add-ons/consent.md index ec0ea60cb..73cbe52c4 100755 --- a/docs/add-ons/consent.md +++ b/docs/add-ons/consent.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -36,11 +36,13 @@ Consent Forms allow the visitor to grant or withdraw consent to one or more Cons {/exp:consent:form} -## Parameters +### Consent Form Parameters [TOC=3] -### `consent=` +{{embed:_tips/form-attributes.md}} + +#### `consent=` consent='ee:cookies_functionality' @@ -52,25 +54,25 @@ Or use "not" to exclude entries: consent='not twitter_app' -### `form_class=` +#### `form_class=` form_class='consent_form' Specify the HTML `class=` attribute. -### `form_id=` +#### `form_id=` form_id='consent_form' Specify the HTML `id=` attribute. -### `return=` +#### `return=` return='site/consent' Specify a path to redirect the user to after submission. If not specified, they will be returned to the current page. Unused for Ajax-submitted forms. -### `user_created=` +#### `user_created=` user_created='only' @@ -83,15 +85,15 @@ Filter the consent requests based on whether or not they are user-created (as op | only | Show only user-created consents | -## Variables +### Consent Form Variables [TOC=3] -### `{consents}{/consents}` +#### `{consents}{/consents}` A pair variable used to loop through all of the consent requests you are displaying with this form. It has the following variables: -### `{consent_creation_date}` +#### `{consent_creation_date}` The date the consent was created. @@ -99,7 +101,7 @@ The date the consent was created. The date the request was created. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information. -### `{consent_given_via}` +#### `{consent_given_via}` The method that consent was provided, can be useful for conditionals. Typically `online_form`: @@ -107,7 +109,7 @@ The method that consent was provided, can be useful for conditionals. Typically Consent was granted via an online form. {/if} -### `{consent_grant_url}` +#### `{consent_grant_url}` A URL that when clicked will grant the user's consent for this request. @@ -117,7 +119,7 @@ Optionally accepts a `return=` parameter if the action should redirect somewhere Grant -### `{consent_granted}` +#### `{consent_granted}` A boolean variable for conditionals that returns `TRUE` or `FALSE`. Returns `TRUE` if the user has granted permission to the consent request, `FALSE` otherwise. @@ -125,29 +127,29 @@ A boolean variable for conditionals that returns `TRUE` or `FALSE`. Returns `TRU Set that cookie! {/if} -### `{consent_id}` +#### `{consent_id}` The ID number of the consent. -### `{consent_request}` +#### `{consent_request}` The description of the consent request. -### `{consent_response_date}` +##### `{consent_response_date}` {consent_response_date format='%Y %m %d'} The date that consent was granted or withdrawn. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information. -### `{consent_short_name}` +#### `{consent_short_name}` The short name of the consent. -### `{consent_title}` +#### `{consent_title}` The title of the consent request. -### `{consent_user_created}` +#### `{consent_user_created}` A boolean variable for conditionals that returns `TRUE` or `FALSE`. Returns `TRUE` if this consent request was user-created or not (by a site admin in the control panel). Returns `FALSE` otherwise (app or add-on created consent requests). @@ -155,13 +157,13 @@ A boolean variable for conditionals that returns `TRUE` or `FALSE`. Returns `TRU This consent request is a custom request created by a site administrator. {/if} -### `{consent_version_id}` +#### `{consent_version_id}` The version_id of the consent request. {version_id} -### `{consent_withdraw_url}` +#### `{consent_withdraw_url}` A URL that when clicked will withdraw the user's consent for this request. @@ -171,7 +173,7 @@ Optionally accepts a `return=` parameter if the action should redirect somewhere Grant -### `{if no_results}` +#### `{if no_results}` If this tag would not output any consent requests due to your filters, the contents of this conditional will be displayed instead. @@ -179,9 +181,9 @@ If this tag would not output any consent requests due to your filters, the conte No Consent Requests Available {/if} -## Examples +### Consent Form Examples -### Simple Bulk Consent Form +#### Simple Bulk Consent Form {exp:consent:alert}
@@ -216,7 +218,7 @@ If this tag would not output any consent requests due to your filters, the conte {/exp:consent:form} -### AJAX-Driven Consent Form +#### AJAX-Driven Consent Form @@ -241,7 +243,7 @@ If this tag would not output any consent requests due to your filters, the conte - + +NOTE: **Note:** If you're looking for how to use RTE fields in your channel entries loops, you should look at [the RTE field variable usage documentation](fieldtypes/rte.md) in the channel fields documentation. -NOTE: **Important:** If you're using the [Channel Form](channels/channel-form/overview.md), it's preferable to use the [channel_form_rte_selector](channels/channel-form/overview.md#rte_selector) parameter instead of this module's tag. +**Control Panel Location:** `Developer --> Add-Ons --> Rich Text Editor` -## Parameters +## Tool Sets -### `include_jquery=` +Tool Sets are essentially pre-created configurations that can be used by particular RTE fields. Tool sets includes settings for upload directory, enabled toolbar elements, and initial field height. - include_jquery="no" +Initially RTE installs 4 tool sets: +- **CKEditor Basic:** is based on CKEditor and has buttons for bold, italic, underline, link, and ordered/unordered lists +- **CKEditor Full:** offers full set of CKEditor features +- **RedactorX Basic:** is based on RedactorX and has buttons for bold, italic, underline, link, and ordered/unordered lists +- **RedactorX Full:** offers full set of RedactorX features -The versions of jQuery and jQuery UI that ship with ExpressionEngine are loaded by default since the RTE depends on them. If you are already loading these libraries separately, you may set this to "no". +### Creating a Tool Set -### `selector=` +- Click the **Create New** button and the tool set creation form will appear. +- Enter a tool set name. +- Select tool set type (CKEditor, RedactorX or Redactor) +- Select the toolbar buttons and plugins you wish to have in your new tool set (or use the [Advanced Configuration option](#advanced-configuration)). +- Click **Save Tool Set** to save your changes. - selector=".my-custom-class" +### Editing a Tool Set -The jQuery selector that determines which element(s) the RTE will be applied to. Any valid jQuery selector is acceptable. If this parameter is not specified, it will default to ".rte", selecting all elements having "rte" as a class. +- Click a tool set's name or pencil icon to open the tool set Editor. +- Modify the tool set's name, if desired. +- Change the tool set type, if desired. +- Select the tools you wish to have in this tool set (or use the [Advanced Configuration option](#advanced-configuration)). +- Click **Save Tool Set** to save your changes. -### `toolset_id=` +[TOC=3] - toolset_id="1" +### Toolbar elements -The id of the toolset to use. If this parameter is not specified, the RTE will attempt to load the Toolset preference of the currently logged-in user as chosen in [RTE tool set](control-panel/member-profile.md#publishing-settings). If the user has not chosen a Toolset or is not logged in, the site's [Default Tool Sets](#default-tool-sets) will be used. +#### Editor Type -## Control Panel +Rich Text Editor comes with [CKEditor](https://ckeditor.com/) v5 and [RedactorX](https://imperavi.com/redactorx/). Both are great, pick the one that fits your needs best. [Redactor 3](https://imperavi.com/redactor/) has been deprecated, but is also available. -**Control Panel Location:** `Developer --> Add-Ons --> Rich Text Editor` +#### Upload Directory -This page allows you to configure ExpressionEngine's built-in Rich Text Editor (RTE). +The file management features in RTE field can be allowed to access all upload directories (default) or limited to certain one. -## General Preferences +#### Text direction -### Enable the Rich Text Editor +Choose between "Left to right" and "Right to left" -If "Yes", the Rich Text Editor will be applied to any Channel Fields of the [Textarea (Rich Text)](control-panel/field-manager.md#createedit-field) fieldtype. If "No", the field will appear as a normal textarea instead. +#### Customize the Toolbar -NOTE: **Note:** If using the [Multiple Site Manager](msm/overview.md), this preference is per-site. +![RTE buttons](_images/rte-buttons.png) -### Default Tool Sets +The exact set of buttons that are available is specific to the editor type selected. CKEditor and Redactor have a single toolbar, while RedactorX has multiple toolbars, each configured separately. -Determines which tool set will be shown for any member that has not specifically chosen one in [RTE tool set](control-panel/member-profile.md#publishing-settings). +The buttons / plugins that are enabled are displayed in the order they will appear in the toolbar. You can drag and drop the buttons to change their order. -NOTE: **Note:** If using the [Multiple Site Manager](msm/overview.md), this preference is per-site. +The disabled buttons / plugins are displayed in grey. -## Tool Sets +#### Custom Stylesheet +CSS template with styles to be applied to fields using this tool set. All styles will be automatically prefixed with toolset class, which means that the template should hold rather generic styles for the elements. -This section allows you to create, edit, enable, disable and delete tool sets. Each tool set listed will be available (unless it is disabled) to all members of your ExpressionEngine installation, even across [Multiple Site Manager](msm/overview.md) sites. +#### Minimal height -### Creating a Tool Set +The minimal height for the field in pixels -- Click the **Create New** button and the tool set creation form will appear. -- Enter a tool set name. -- Select the tools you wish to have in your new tool set. -- Click **Save Tool Set** to save your changes. +#### Maximal height -### Editing a Toolset +The maximum height for the field in pixels (RedactorX / Redactor only). -- Click a tool set's name to open the tool set Editor. -- Modify the tool set's name, if desired. -- Select the tools you wish to have in this tool set. -- Click **Save Tool Set** to save your changes. +#### Limit characters + +Limits the number of character that can be entered into the field (Redactor only). + +#### Advanced configuration -### Enabling and Disabling Tool Sets +Add custom formatting styles, buttons, and interactions to your RTE toolset by using advanced configurations. Toggling this button hides the visual constructor toolbar and reveals [advanced configuration](#configuration-json) options. These advanced options allow for editing the configuration directly in JSON format. -To enable or disable a tool set, check the tool set's checkbox in the tool set table listing. Once one or more tool sets are selected, the bulk action control will appear below the table where you can perform bulk actions on the tool sets. Click the drop down to choose enable or disable and then click Submit. +TIP: **{ee:u}** Checkout the [Advanced RTE Configurations](https://u.expressionengine.com/article/advanced-rte-configurations) article on ExpressionEngine University for examples of how to add custom CSS and JavaScript to your RTE configurations. + +#### Configuration JSON + +Allows overriding the visually constructed tool set with a [JSON](https://www.json.org/) object. Remember that all properties need to be quoted. + +WARN: **Advanced users only.** Please be careful with using this feature and check your work. Providing invalid configuration can make the RTE fields inaccessible. + +Initially the field is loaded with the saved configuration of tool set being edited. + +Consult [RedactorX Docs](https://imperavi.com/redactorx/docs/settings/), [Redactor Docs](https://imperavi.com/redactor/docs/settings/) or [CKEDitor Docs](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html) for the list of properties. Note that not all features are supported by the ExpressionEngine implementation. + +#### Extra JavaScript +JavaScript template to be included with fields using this tool set. Typically used to include extra plugins when using advanced configuration with Redactor. + + +### Cloning a Tool Set + +- Click a tool set's clone icon to create copy of tool set and open it for editing +- Modify the tool set's name. +- Select the tools you wish to have in this tool set. +- Click **Save Tool Set** to save your changes. -A disabled tool set will not appear as a choice to members, but can still be referred to by ID. This is useful in combination with the Channel Form's [rte_selector=](channels/channel-form/overview.md#rte_selector) and [rte_toolset_id=](channels/channel-form/overview.md#rte_toolset_id) parameters, for example. ### Deleting a Tool Set To delete a tool set, check the tool set's checkbox in the tool set table listing. Once one or more tool sets are selected, the bulk action control will appear below the table where you can perform bulk actions on the tool sets. Click the drop down to choose delete and then click Submit. -## Tools +## RTE Configuration + +- **Default RTE tool set** - select the tool set that will be selected by default when creating a field. +- **File Browser** - select file browser that will be used when browsing for images and files from RTE fields. ExpressionEngine's FilePicker is used by default, third-party add-ons can provide their own filepickers +- **Use custom CKEditor build** - Allows using custom CKEditor build with extra plugins. If enabled, RTE instances running CKEditor will be built using the script in `themes/user/rte/javascript/` folder. + +NOTE: **Note:** If using the [Multiple Site Manager](msm/overview.md), this preference is per-site. + +## Custom plugins + +### RedactorX + +When using RedactorX or Redactor, the javascript for the plugin can be placed in the template, which then needs to be selected in "Extra JavaScript" field for the tool set. +Then enable extended configuration, add the plugin name to list of plugins and provide plugin config if necessary. +If the plugin needs extra styling, it can be placed in CSS Templates selected in "Custom Stylesheet" field for the tool set. If the CSS is targeting buttons, the selectors need to be prefixed with `.redactor-toolbar`. + +### CKEditor + +Because ExpressionEngine is using custom build of CKEditor, you would need to recompile the editor if you need to add third-party or your own plugin. + +If the plugin needs extra styling, it can be placed in CSS Templates selected in "Custom Stylesheet" field for the tool set. If the CSS is targeting buttons, the selectors need to be prefixed with `.ck-toolbar`. + +NOTE: **Warning** Doing this requires advanced development skills. -This section lists the Tools that are currently installed and allows you to enable or disable them. Disabled Tools will not appear as part of any Toolset. +In order to create custom CKEditor build: + - Clone [GitHub repo](https://github.com/ExpressionEngine/ExpressionEngine/) + - Install NPM packages by running `npm install` + - Follow the installation instructions for the extra CKEditor plugins that you need + - Make your changes to `js-src/ckeditor5-build-classic/src/ckeditor.js` and other files as necessary. + - Run the command `npm run build:ckeditor` + - Copy the files from `themes/ee/asset/javascript/src/fields/rte/ckeditor` to `themes/user/rte/javascript/` folder on your EE installation -See [RTE Tools API](development/rte-tools.md) for information on developing your own Tools. +TIP: Buttons provided by extra plugins might be not availble with visual toolbar builder. You will need to use Advanced Configuration JSON file to add those. \ No newline at end of file diff --git a/docs/add-ons/search/advanced.md b/docs/add-ons/search/advanced.md index 6815a99ad..76207ca6d 100755 --- a/docs/add-ons/search/advanced.md +++ b/docs/add-ons/search/advanced.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -143,6 +143,8 @@ The search results are displayed on the page you specify as the [result_page=](# [TOC=3] +{{embed:_tips/form-attributes.md}} + ### `category=` category="1" @@ -267,6 +269,63 @@ With this parameter, you can specify the css class you want the form to have, en With this parameter, you can specify the css id you want the form to have. +### `orderby=` + + orderby="entry_date" + +The "orderby" parameter sets the display order of the entries. The available values for this property are `entry_date`, `most_comments`, `recent_comment`, `title`, `status`, `entry_id`, `url_title`, `edit_date`, `comment_total`, `expiration_date`, `view_count_one`, `view_count_two`, `view_count_three`, `view_count_four`.` + +If this parameter is not set, it will default to ordering by entry date. + +### `sort=` + + sort="asc" + + sort="desc" + +The sort order can be "asc" (ascending order or "oldest item first") or "desc" (descending order or "newest item first"). If you do not use a sort order the default is desc. + ## Variables -A full discussion of the available variables is not feasible there is a great deal of interdependence between the various form fields, variables, and javascript functions. The Parameters can be used to modify how the search behaves. If you wish to modify the search form itself, simply use the default form as a base and customize it from there. +### `channel_names` + +Pre-populated string containing list of `
+namespace ExpressionengineDeveloper\AmazingAddOn\Extensions; -### Save Settings +use ExpressionEngine\Service\Addon\Controllers\Extension\AbstractRoute; -Lastly, you will need to have a method in your extension's class called `save_settings()`. This function will be called when your `settings_form()` method's form is submitted. Use it to process the data sent and put it into the exp_extensions database table. Remember that the data put into the database is a serialized array, so handle it appropriately. - - /** - * Save Settings - * - * This function provides a little extra processing and validation - * than the generic settings form. - * - * @return void - */ - function save_settings() +class TypographyParseTypeEnd extends AbstractRoute +{ + public function process() { - if (empty($_POST)) - { - show_error(lang('unauthorized_access')); - } - - ee()->lang->loadfile('link_truncator'); - - $len = ee()->input->post('max_link_length'); - - if ( ! is_numeric($len) OR $len <= 0) - { - ee('CP/Alert')->makeInline('link-truncator-save') - ->asIssue() - ->withTitle(lang('message_failure')) - ->addToBody(sprintf(lang('max_link_length_range'), $len)) - ->defer(); - } - else - { - ee('CP/Alert')->makeInline('link-truncator-save') - ->asSuccess() - ->withTitle(lang('message_success')) - ->addToBody(lang('preferences_updated')) - ->defer(); - } - - ee()->functions->redirect(ee('CP/URL')->make('addons/settings/link_truncator')); } +} +``` -## Calling of the Extension - -The following is an example of an ExpressionEngine Extension Hook that is available for use: - - // ------------------------------------------- - // 'typography_parse_type_end' hook. - // - Modify string after all other typography processing - // - if (ee()->extensions->active_hook('typography_parse_type_end') === TRUE) - { - $str = ee()->extensions->call('typography_parse_type_end', $str, $this, $prefs); - } - // - // ------------------------------------------- - -The first parameter of `$this->extensions->call_extension` is the name of the hook, which lets the Extension class know what extensions to call. The other three parameters are variables taken from the function that the hook is embedded within. They provide information and data for the extensions being called for this hook, which allows those extensions to have information about the script that allow them to perform certain actions or manipulate data. When an extension is called, ExpressionEngine loads the extension file, instantiates the extension's class, and then calls the method specified for this extension hook as specified by the extension when it was activated (see above concerning activation). - -When that method is called in the extension's class those other three parameters will be sent to the method automatically. Here is what the method might look like: - - /** - * Shorten Link Text - * - * This function is a callback method for preg_replace_callback in the method below. - * - * @param array array from the preg_match - * @return string Newly truncated Link. - */ - function _shorten_link_text($matches) - { - $link_text = $matches[3]; - $link_text = substr($link_text, strpos($link_text, '://') + 3); - - if (strlen($link_text) >= (int) $this->settings['max_link_length'] ) - { - $l = (int) $this->settings['max_link_length'] / 2; +All the functionality we want to include when our hook is executed needs to go inside our `process()` method. Here we are going to take the string passed in by the `TypographyParseTypeEnd()` core hook, replace all instances of `e` with `EE`, and then return the updated string. - $b_part = substr($link_text, 0, $l); - $e_part = substr($link_text, -$l); +``` +'; - } +use ExpressionEngine\Service\Addon\Controllers\Extension\AbstractRoute; - /** - * Truncate This - * - * This function is the meat & potatoes of the extension, where all - * the work is done. - * - * @see https://expressionengine.com/user-guide/development/extension_hooks/global/typography/index.html#typography-parse-type-end - * - * @param string string to look - * @param object typography object - * @param array array of preferences - * @return string - */ - function truncate_this($str, $obj, $prefs) +class TypographyParseTypeEnd extends AbstractRoute +{ + public function process($str, $obj, $prefs) { - if ($this->settings['truncate_cp_links'] == 'no' && REQ == 'CP') - { - return $str; - } - - if (isset($obj->EE->FRM_CORE) && $this->settings['use_in_forum'] == 'no') - { - return $str; + //check if $str has content, if so replace + //all "e" with "EE" + if(!is_null($str) ){ + $str = str_replace("e","EE",$str); } - - $pattern = "/(]*\s+href\s*=\s*(\042|047)([^\\2]*?)\\2[^>]*>)\\3<\/a>/i"; - - $str = preg_replace_callback($pattern, array(get_class($this), '_shorten_link_text'), $str); - return $str; } +} + +``` + +Now when we render our site using fields like textarea or other fields that use the Typography Library, our users will see how amazing EE is. -The three parameters from the extension hook are mapped straight to the three parameters of the method being called, and so your extension can easily use those parameters and do what it needs to do. The Extension Hook library will have a record of all extension hooks and the parameters available to you, along with a suggestion or two about what can be done with the extension hook. +NOTE:**NOTE:** Although ExpressionEngine is amazing, we do not suggest using the above example in production. ## Multiple Extensions, Same Hook -When an extension hook is called, ExpressionEngine checks the database to see if there are any extensions available for the hook. If there are extensions, then it processes them in order based on their priority level with the lower the priority number the sooner the extension is called. Because of priority, extensions might interfere with each other, so we have provided two variables for helping with that. +When an extension hook is called, ExpressionEngine checks the database to see if there are any extensions available for the hook. If there are extensions, then it processes them in order based on their priority level with the lower the priority number the sooner the extension is called. Because of priority, add-ons that use extensions might interfere with each other, so we have provided two variables for helping with that. -### `$this->extensions->last_call` +### `ee()->extensions->last_call` -There will be rather popular hooks being used by multiple extensions and some hooks will expect you to return data to the extension hook. Because of that, there is a variable available from the Extensions class (`$this->extensions`) that will contain the returned data of any prior extensions for that hook. Say, there is a hook for formatting text and an extension before yours is called. That extension will be returning the text formatted in its own way, but then your extension is called with the original text details being sent. In such an instance of data being returned and possible prior extensions, there is a variable available to retrieve that already formatted text: `$this->extensions->last_call`. This variable will return whatever the last extension returned to this hook. If there was no prior extension, then the value of this variable is `FALSE`. +There will be rather popular hooks being used by multiple extensions and some hooks will expect you to return data to the extension hook. Because of that, there is a variable available from the Extensions class (`ee()->extensions`) that will contain the returned data of any prior extensions for that hook. Say, there is a hook for formatting text and an extension before yours is called. That extension will be returning the text formatted in its own way, but then your extension is called with the original text details being sent. In such an instance of data being returned and possible prior extensions, there is a variable available to retrieve that already formatted text: `ee()->extensions->last_call`. This variable will return whatever the last extension returned to this hook. If there was no prior extension, then the value of this variable is `FALSE`. -### `$this->extensions->end_script` +### `ee()->extensions->end_script` -Many extension hooks exist for the express purpose of totally controlling a page or script in the Control Panel. They are meant for redesigning the appearance of a form or perhaps usurping a script for processing form data. In those instances you want your extension to be the last thing called for that extension hook so that nothing else is processed after that point. The `$this->extensions->end_script` exists solely for that purpose. If you set this value to TRUE, then once your extension is done being processed the execution of the hook is finished, as is the script that the extension hook is contained within. +Many extension hooks exist for the express purpose of totally controlling a page or script in the Control Panel. They are meant for redesigning the appearance of a form or perhaps usurping a script for processing form data. In those instances you want your extension to be the last thing called for that extension hook so that nothing else is processed after that point. The `ee()->extensions->end_script` exists solely for that purpose. If you set this value to TRUE, then once your extension is done being processed the execution of the hook is finished, as is the script that the extension hook is contained within. diff --git a/docs/development/fieldtypes/enhanced.md b/docs/development/fieldtypes/enhanced.md new file mode 100644 index 000000000..0e6c87e6f --- /dev/null +++ b/docs/development/fieldtypes/enhanced.md @@ -0,0 +1,288 @@ +--- +lang: php +--- + + + +# Enhanced Fieldtype Features Development + +[TOC] + +## Working with Live Preview + +In order for your fieldtype to render in a template under live preview, it needs to be able to render using data from the publish form, which is essentially your fieldtype's POST data. You will not access your data from `$_POST`, your fieldtype's data should be sent automatically to your `replace_tag()` method. If you're missing any data, you can access the entry's entire preview data via the [LivePreview service](development/services/live-preview.md). + +This means if your fieldtype does extra processing before your data is saved and your `replace_tag()` method expects data in a different format than what is returned directly from the publish form, you'll need to make accommodations. + +For instance, say your fieldtype has inputs that look like this: + + + + +And your `save()` and `replace_tag()` routines looks like this: + + function save($data) + { + // Concatenate this data to save in the database + return $data['text1'] . $data['text2']; + } + + function replace_tag($data) + { + // Data is preformatted, just return it! + return $data; + } + +You may want to change your `replace_tag()` routine to format its data on the fly: + + function replace_tag($data) + { + // Looks like we're in live preview, reformat our data for presentation + if (ee('LivePreview')->hasEntryData()) + { + return $data['text1'] . $data['text2']; + } + + return $data; + } + +### Live Preview Javascript + +Live Preview automatically refreshes when HTML inputs, selects, and textareas are interacted with. If your fieldtype has other interactions that need to update the live preview, you can use the following JavaScript: + + $(document).trigger('entry:preview'); + +Many fieldtypes do not need to be notified via JavaScript when the Live Preview modal opens and closes, many of your JavaScript bindings should continue to work. But certain libraries such as CKEditor may require some more attention in this area and for that you can listen to the `entry:preview-open` and `entry:preview-closed` events on `$(document)` to do any extra processing you need: + + $(document).on('entry:preview-open', function(event) { + // ... + }); + +## Displaying field data in Entry Manager + +Custom fields can display their data inside the Entry Manager through 3 possible ways: + 1. Declare `public $has_array_data = false;` OR + 2. Add `implements ColumnInterface` to fieldtype class definition. + + use ExpressionEngine\Library\CP\EntryManager\ColumnInterface; + class Google_maps_ft extends EE_Fieldtype implements ColumnInterface { + OR + 3. Declare `public $entry_manager_compatible = true;` and implement `renderTableCell` method + +**Example:** + + class Google_maps_ft extends EE_Fieldtype + { + public $has_array_data = true; + + public $entry_manager_compatible = true; + + /*.....*/ + + /** + * Implements EntryManager\ColumnInterface + */ + public function renderTableCell($data, $field_id, $entry) + { + if (!empty($data)) { + list($latitude, $longitude, $zoom) = explode('|', $data); + return "View on map"; + } + return ''; + } + + /** + * Allows HTML in the column content + */ + public function getTableColumnConfig() + { + return [ + 'encode' => false + ]; + } + + /* .... */ + + } + +## Entry cloning support + +ExpressionEngine has the ability to [clone existing entries](/channels/entry_cloning.md) using the "Clone to New Entry" option on the entry editing page. Most fieldtypes do not need to do anything special to support this feature. + +However, if the fieldtype you are developing saves data to its own database table, you might need to tell it to save the rows as a submission for the new entry and not for the existing one. + +You can do this by adding this check: + + if (defined('CLONING_MODE') && CLONING_MODE === true) { + //this is cloning request, add new rows + } + +## Conditional Fields support + +Unless different specified directly, each fieldtype can be as data source for [Conditional Fields](control-panel/field-manager/conditional-fields.md) via the default evaluation rules set. The default set is different depending on whether the fieldtype can hold text-like data or array-like data. + +If the fiedltype has `has_array_data` property set to `true`, the default rules set is limited `isEmpty` and `isNotEmpty`. + +If `has_array_data` is not set or set to `false`, it is being assumed that the fieldtype holds text data and the rules list is set to following: + + 'equal', 'notEqual', 'isEmpty', 'isNotEmpty', 'contains', 'notContains' + + +If the fieldtype is not designed to be used as the source for conditional field evaluation, it can be excluded by using this code: + + public $supportedEvaluationRules = null; + +If the fieldtype needs to support the list or evaluation rules that is different from default, it can specify `supportedEvaluationRules` property as array of rule name, e.g. + + public $supportedEvaluationRules = ['isEmpty', 'isNotEmpty', 'contains', 'notContains']; + +If certain rule needs to be pre-selected by default when adding new condition to the field, it's name can be specified in `defaultEvaluationRule` property, e.g. + + public $defaultEvaluationRule = 'contains'; + +### Built-in evaluation rules + +#### `contains` +"contains". Evaluates to `true` if the field value contains the expected string. + +#### `equal` +"is". Evaluates to `true` if the field value is exactly same as expected string. + +#### `greaterOrEqualThan` +"greater or equal than". Evaluates to `true` if the numeric field value is greater or equal than expected number. + +#### `greaterThan` +"greater than". Evaluates to `true` if the numeric field value is greater or equal than expected number. + +#### `isEmpty` +"is empty". Evaluates to `true` if the field does not contain any value, or an empty string, or an empty array. + +#### `isNotEmpty` +"is not empty". Evaluates to `true` if the field contains value different from empty string or empty array. + +#### `lessOrEqualThan` +"less or equal than". Evaluates to `true` if the numeric field value is less or equal than expected number. + +#### `lessThan` +"less than". Evaluates to `true` if the numeric field value is less than expected number. + +#### `matches` +"is". Evaluates to `true` if the field data is array, contains only value and the value is exactly same as expected string. + +#### `notContains` +"does not contain". Evaluates to `true` if the field value does not contain the expected string. + +#### `notEqual` +"is not". Evaluates to `true` if the field value is not exactly same as expected string. + +#### `notMatches` +"is not". Designed for array-type of data, evaluates to `true` if the field data array contains more than one value, or the only value is not exactly same as expected string. + +### Creating custom evaluation rules + +The fieldtypes can define their own evaluation rules that would contain the logic specific to this fieldtype. +This is done by creating evaluation rule file and listing its name in the fieldtype property. + +The file needs to be placed in `EvaluationRules` subfolder or the add-on's own directory. Below is the example `TurnedOn.php` file from `toggle` add-on. + + namespace ExpressionEngine\Addons\ToggleField\EvaluationRules; + use ExpressionEngine\Service\ConditionalFields\EvaluationRules\AbstractEvaluationRule; + use ExpressionEngine\Service\ConditionalFields\EvaluationRules\EvaluationRuleInterface; + + class TurnedOn extends AbstractEvaluationRule implements EvaluationRuleInterface + { + public function evaluate($fieldValue, $expectedValue, $fieldSettings) + { + if (is_null($fieldValue)) { + $fieldValue = $fieldSettings['field_default_value']; + } + return get_bool_from_string($fieldValue); + } + + public function getConditionalFieldInputType() + { + return null; + } + } + +The file name should match the class name and will make the rule name by converting first letter to lower case. So for given example, the rule name will be `turnedOn` and to enabled it, the `ft.toggle.php` will have this code: + + public $supportedEvaluationRules = ['turnedOn', 'turnedOff']; + +The evaluation rule class is required to implement `ExpressionEngine\Service\ConditionalFields\EvaluationRules\EvaluationRuleInterface`. +We also recommend to extend `ExpressionEngine\Service\ConditionalFields\EvaluationRules\AbstractEvaluationRule` to avoid writing the code that is not necessary. + +There are 3 available methods, and you are required to implement `evaluate` at the minimum. + +#### `evaluate($fieldValue, $expectedValue, $fieldSettings)` + +Evaluates the rule by comparing the field value (`$fieldValue`) with the `$expectedValue` as entered in the conditional field settings. +`$fieldSettings` is available as array of field settings. + +#### `getLanguageKey()` + +Should return language key for this evaluation rule to be displayed as human readable name in dropdown when setting up conditionals for the field. +Implementation of this method in `AbstractEvaluationRule` will return the rule name as language key. + +#### `getConditionalFieldInputType()` + +Should return the input type for the column in conditional field settings where the expected data to check against will be entered. +Possible return values are: + - `null` - no input is shown + - `'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 + +If your add-on is operating as File Manager, you might want to make it available as file picker for RTE fields. + +In order to achieve that, create file prefixed with `rtefb.` in add-on's main directory, e.g. `rtefb.my_addon.php`. You can refer to the file in Filepicker add-on as an example. + +The file's class needs to implement `ExpressionEngine\Library\Rte\RteFilebrowserInterface`. The easiest way to achieve that is to extend `ExpressionEngine\Library\Rte\AbstractRteFilebrowser` abstract class and add code only for the functions that work differently from + +## Working with Front-End Editing + +Most fieldtypes will work with [Front-end content management](/advanced-usage/front-end/frontend.md) out-of-the-box. + +However there are some parameters that can be set in `ft.` to improve integration. + +### Disabling Front-end Edit Link + + public $disable_frontedit = true; + +Setting `$disable_frontedit` to `true` will disable frontend-editing for the fieldtype and the edit links will never appear. + +### Field Editing Window Size + + public $size = 'large'; + +By default, all fields are being opened for front-end editing in the pop-up window of same size. However if you need larger or smaller window, that can be specified in fieldtype file. + +The available options are: + - large + - small + - footer + +### Making Complex Fieldtypes To Work + +If your fieldtype is representing complex data structures, such as Grid or Fluid field, you will need to tell Pro to be treat this fieldtype in a different way. You can do this by declaring in fieldtype + + public $complex_data_structure = true; diff --git a/docs/development/fieldtypes/example.md b/docs/development/fieldtypes/example.md new file mode 100644 index 000000000..270b535aa --- /dev/null +++ b/docs/development/fieldtypes/example.md @@ -0,0 +1,239 @@ +--- +lang: php +--- + + + +# Fieldtype example (Google Maps) + +The snippets below were truncated for clarity. The full example fieldtype can be [downloaded here](_downloads/google-maps.zip). + +[TOC] + +## Generate Fieldtype File +Start by generating a custom fieldtype for your add-on using the `make:fieldtype` command. + +``` +$ php system/ee/eecli.php make:fieldtype +Let's implement a fieldtype! +What is the fieldtype name? Amazing Fieldtype +What add-on is the fieldtype being added to? [amazing_add_on]: amazing_add_on +Building fieldtype. +Fieldtype created successfully! +``` + +This will create a `ft.amazing__fieldtype.php` in your add-on's folder. + +We'll now update the methods found within our fieldtype's class to provide our functionality: +- `function install()` +- `function display_global_settings()` +- `function save_global_settings()` +- `function display_settings()` +- `function save_settings()` +- `function display_field()` +- `function replace_tag()` +- `function replace_latitude()` +- `function replace_tag_catchall()` + +## Installation - `install()` + +The google maps fieldtype is going to have 3 global settings. Latitude, longitude, and zoom. These will determine what the default map looks like. By returning an array from within our `install()` method we can provide a default set of global settings. + + function install() + { + // Somewhere in Oregon ... + return array( + 'latitude' => '44.06193297865348', + 'longitude' => '-121.27584457397461', + 'zoom' => 13 + ); + } + +## Uninstaller + +The installation method for this fieldtype does not create any additional tables, so no cleanup work needs to be done. The default `uninstall()` method provided by the EE_Fieldtype parent class will suffice. Most fieldtype methods have sensible defaults to help reduce duplicate code. + +## Global - `display_global_settings()` + +The installer sets the default global settings, but currently there is no way to change these from the control panel. We can use the `display_global_settings()` method to return the contents of the settings form. Having this method also enables the global settings link on the overview page. + + function display_global_settings() + { + $val = array_merge($this->settings, $_POST); + + $form = form_label('latitude', 'latitude').NBS.form_input('latitude', $val['latitude']).NBS.NBS.NBS.' '; + $form .= form_label('longitude', 'longitude').NBS.form_input('longitude', $val['longitude']).NBS.NBS.NBS.' '; + $form .= form_label('zoom', 'zoom').NBS.form_dropdown('zoom', range(1, 20), $val['zoom']); + + return $form; + } + +Manually entering longitudes and latitudes is inconvenient so the final method in the example download also adds some JavaScript to let the user choose from a map. + +## Saving Global Settings - `save_global_settings()` + +In most instances saving the global settings is as easy as storing the `$_POST` array. Remember to include existing global settings if not everything can be changed. + + function save_global_settings() + { + return array_merge($this->settings, $_POST); + } + +## Individual Settings - `display_settings()` + +The default map may not always be the desired choice for each map field, so on the regular settings page it will display a similar configuration screen. We will use the familiar [Shared Form View](development/shared-form-view.md) format to display our settings. + + function display_settings() + { + $latitude = isset($data['latitude']) ? $data['latitude'] : $this->settings['latitude']; + $longitude = isset($data['longitude']) ? $data['longitude'] : $this->settings['longitude']; + $zoom = isset($data['zoom']) ? $data['zoom'] : $this->settings['zoom']; + + $settings = array( + array( + 'title' => 'latitude', + 'desc' => 'latitude_desc', + 'fields' => array( + 'latitude' => array( + 'type' => 'text', + 'value' => $latitude, + ) + ) + ), + array( + 'title' => 'longitude', + 'desc' => 'longitude_desc', + 'fields' => array( + 'longitude' => array( + 'type' => 'text', + 'value' => $longitude, + ) + ) + ), + array( + 'title' => 'zoom', + 'desc' => 'zoom_desc', + 'fields' => array( + 'zoom' => array( + 'type' => 'select', + 'choices' => range(1, 20), + 'value' => $zoom, + ) + ) + ), + array( + 'title' => 'preview', + 'desc' => 'preview_desc', + 'wide' => TRUE, + 'fields' => array( + 'preview' => array( + 'type' => 'html', + 'content' => '
' + ) + ) + ) + ); + + // Map preview + $this->_cp_js(); + ee()->javascript->output('$(window).load(gmaps);'); + + return array('field_options_google_maps' => array( + 'label' => 'field_options', + 'group' => 'google_maps', + 'settings' => $settings + )); + } + +## Saving Individual Settings - `save_settings()` + +Saving individual field settings works largely the same as saving global settings. Keep be aware that they are later merged with global settings, so they can override a global setting. + +If your fieldtype needs a wide style on the publish form, like Grid or a Textarea, then be sure to include `'field_wide' => TRUE` in your settings array. + + function save_settings($data) + { + return array( + 'latitude' => ee()->input->post('latitude'), + 'longitude' => ee()->input->post('longitude'), + 'zoom' => ee()->input->post('zoom') + ); + } + +## Displaying the Field On the Publish Page - `display_field()` + +With all the settings set up, it can now be displayed on the publish screen. A key factor when you get to this stage is to decide in what format the data should be stored. Since all three available values in this case are numbers, this field will store them separated by pipes (`lang|lat|zoom`). + + function display_field($data) + { + $data_points = array('latitude', 'longitude', 'zoom'); + + if ($data) + { + list($latitude, $longitude, $zoom) = explode('|', $data); + } + else + { + foreach($data_points as $key) + { + $$key = $this->settings[$key]; + } + } + + $zoom = (int) $zoom; + $options = compact($data_points); + + // some javascript + + $value = implode('|', array_values($options)); + $hidden_input = form_input($this->field_name, $value, 'id="'.$this->field_name.'" style="display: none;"'); + + return $hidden_input.'
'; + } + +## Rendering the Tag - `replace_tag()` + +Finally, the field needs a frontend display. For google maps this will almost exclusively be JavaScript. + + function replace_tag($data, $params = array(), $tagdata = FALSE) + { + static $script_on_page = FALSE; + $ret = ''; + + list($latitude, $longitude, $zoom) = explode('|', $data); + + // google maps javascript ... + + return $ret.'
'; + } + +## Creating Multiple Rendering Options + +Along with parameters a field can also provide tag modifiers to change its output. In the template these are called by adding a colon to the fieldname, followed by the modifier name. For example: `{myfield:latitude}`. The advantage that field modifiers have over parameters is that they can be used in conditionals. + +These methods are not created by the CLI and need to be added as needed to your fieldtype's class. + +Parsing the modifiers is identical to using the regular `replace_tag()` function. The method name must start with `replace_` followed by the modifier name. + + function replace_latitude($data, $params = array(), $tagdata = FALSE) + { + list($latitude, $longitude, $zoom) = explode('|', $data); + return $latitude; + } + +There is also a function to catch ALL modifiers, whose declaration includes the modifier name and looks like this: + + function replace_tag_catchall($file_info, $params = array(), $tagdata = FALSE, $modifier = FALSE) + +You can also use variable pairs to capture tag data for processing in your modifier function. The syntax for using modifiers on variable pairs in your templates is: + + {myfield:option} + Tag data here + {/myfield} diff --git a/docs/development/fieldtypes.md b/docs/development/fieldtypes/fieldtypes.md old mode 100755 new mode 100644 similarity index 67% rename from docs/development/fieldtypes.md rename to docs/development/fieldtypes/fieldtypes.md index fc1ba993b..819a9036f --- a/docs/development/fieldtypes.md +++ b/docs/development/fieldtypes/fieldtypes.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -15,9 +15,40 @@ lang: php [TOC] -## Basic File Structure +## Overview +ExpressionEngine ships with a range of fieldtypes already in place. However, perhaps you want to had your fieldtype that executes functionality differently than the fields that ship with ExpressionEngine. If so, then read below for how to create your own custom fieldtype. -All fieldtypes should be placed into the `system/user/addons` folder in a package and be named after that package name. So in a packaged named google_maps the fieldtype file will be `ft.google_maps.php`. All fieldtypes must inherit from the `EE_Fieldtype` base class and they must provide an \$info array with a name and version number. +TIP: For an overview of what a Fieldtype is, read the [Fieldtype Overview docs](/fieldtypes/overview.md). + +NOTE:Before adding a fieldtype to your add-on, you need to already have an add-on in place. See [Building An Add-On: Getting Started](development/addon-development-overview.md#getting-started) for how to generate the starter files for your add-on. + +## Creating An Amazing Fieldtype + +Adding a custom fieldtype to your add-on is easy with the `make:fieldtype` command. + +``` +$ php system/ee/eecli.php make:fieldtype +Let's implement a fieldtype! +What is the fieldtype name? Amazing Fieldtype +What add-on is the fieldtype being added to? [amazing_add_on]: amazing_add_on +Building fieldype. +Fieldtype created successfully! +``` + +This will create a `ft.[fieldtype_name].php` in your add-on's folder. In the example above, this creates a file named `ft.amazing__fieldtype.php`. + +``` +amazing_add_on + ... +┣ ft.[fieldtype_name].php +┗ ... + ``` + +## Anatomy of A Fieldtype + +[TOC=3] + +All fieldtypes must inherit from the `EE_Fieldtype` base class and they must provide an `$info` array with a name and version number. '44.06193297865348', - 'longitude' => '-121.27584457397461', - 'zoom' => 13 - ); - } - -### Uninstaller - -The installation method for this fieldtype does not create any additional tables, so no cleanup work needs to be done. The default `uninstall()` method provided by the EE_Fieldtype parent class will suffice. Most fieldtype methods have sensible defaults to help reduce duplicate code. - -### Global Settings - -The installer sets the default global settings, but currently there is no way to change these from the control panel. We can use the `display_global_settings()` method to return the contents of the settings form. Having this method also enables the global settings link on the overview page. - - function display_global_settings() - { - $val = array_merge($this->settings, $_POST); - - $form = form_label('latitude', 'latitude').NBS.form_input('latitude', $val['latitude']).NBS.NBS.NBS.' '; - $form .= form_label('longitude', 'longitude').NBS.form_input('longitude', $val['longitude']).NBS.NBS.NBS.' '; - $form .= form_label('zoom', 'zoom').NBS.form_dropdown('zoom', range(1, 20), $val['zoom']); - - return $form; - } - -Manually entering longitudes and latitudes is inconvenient so the final method in the example download also adds some javascript to let the user choose from a map. - -### Saving Global Settings - -In most instances saving the global settings is as easy as storing the `$_POST` array. Remember to include existing global settings if not everything can be changed. - - function save_global_settings() - { - return array_merge($this->settings, $_POST); - } - -### Individual Settings - -The default map may not always be the desired choice for each map field, so on the regular settings page it will display a similar configuration screen. We will use the familiar [Shared Form View](development/shared-form-view.md) format to display our settings. - - function display_settings() - { - $latitude = isset($data['latitude']) ? $data['latitude'] : $this->settings['latitude']; - $longitude = isset($data['longitude']) ? $data['longitude'] : $this->settings['longitude']; - $zoom = isset($data['zoom']) ? $data['zoom'] : $this->settings['zoom']; - - $settings = array( - array( - 'title' => 'latitude', - 'desc' => 'latitude_desc', - 'fields' => array( - 'latitude' => array( - 'type' => 'text', - 'value' => $latitude, - ) - ) - ), - array( - 'title' => 'longitude', - 'desc' => 'longitude_desc', - 'fields' => array( - 'longitude' => array( - 'type' => 'text', - 'value' => $longitude, - ) - ) - ), - array( - 'title' => 'zoom', - 'desc' => 'zoom_desc', - 'fields' => array( - 'zoom' => array( - 'type' => 'select', - 'choices' => range(1, 20), - 'value' => $zoom, - ) - ) - ), - array( - 'title' => 'preview', - 'desc' => 'preview_desc', - 'wide' => TRUE, - 'fields' => array( - 'preview' => array( - 'type' => 'html', - 'content' => '
' - ) - ) - ) - ); - - // Map preview - $this->_cp_js(); - ee()->javascript->output('$(window).load(gmaps);'); - - return array('field_options_google_maps' => array( - 'label' => 'field_options', - 'group' => 'google_maps', - 'settings' => $settings - )); - } - -### Saving Individual Settings - -Saving individual field settings works largely the same as saving global settings. Keep be aware that they are later merged with global settings, so they can override a global setting. - -If your fieldtype needs a wide style on the publish form, like Grid or a Textarea, then be sure to include `'field_wide' => TRUE` in your settings array. - - function save_settings($data) - { - return array( - 'latitude' => ee()->input->post('latitude'), - 'longitude' => ee()->input->post('longitude'), - 'zoom' => ee()->input->post('zoom') - ); - } - -### Displaying the Field (Publish Page) - -With all the settings set up, it can now be displayed on the publish screen. A key factor when you get to this stage is to decide in what format the data should be stored. Since all three available values in this case are numbers, this field will store them separated by pipes (`lang|lat|zoom`). - - function display_field($data) - { - $data_points = array('latitude', 'longitude', 'zoom'); - - if ($data) - { - list($latitude, $longitude, $zoom) = explode('|', $data); - } - else - { - foreach($data_points as $key) - { - $$key = $this->settings[$key]; - } - } - - $zoom = (int) $zoom; - $options = compact($data_points); +NOTE: **Note:** Fieldtypes can declare their compatibility with other Fieldtypes in the `addon.setup.php` file, allowing a site admin to switch an existing field to another compatible type, e.g. _text_ can be switched to _email_ and vice-versa. Please see [Fieldtype Compatibility Options](development/addon-setup-php-file.md#fieldtypes) for more details. - // some javascript +NOTE: We also have [Example fieldtype with annotations](development/fieldtypes/example.md) for your reference. - $value = implode('|', array_values($options)); - $hidden_input = form_input($this->field_name, $value, 'id="'.$this->field_name.'" style="display: none;"'); - return $hidden_input.'
'; - } - -### Rendering the Tag - -Finally, the field needs a frontend display. For google maps this will almost exclusively be javascript. - - function replace_tag($data, $params = array(), $tagdata = FALSE) - { - static $script_on_page = FALSE; - $ret = ''; - - list($latitude, $longitude, $zoom) = explode('|', $data); - - // google maps javascript ... - - return $ret.'
'; - } - -### Creating Multiple Rendering Options - -Along with parameters a field can also provide tag modifiers to change its output. In the template these are called by adding a colon to the fieldname, followed by the modifier name. For example: `{myfield:latitude}`. The advantage that field modifiers have over parameters is that they can be used in conditionals. - -Parsing the modifiers is identical to using the regular `replace_tag()` function. The method name must start with `replace_` followed by the modifier name. - - function replace_latitude($data, $params = array(), $tagdata = FALSE) - { - list($latitude, $longitude, $zoom) = explode('|', $data); - return $latitude; - } - -There is also a function to catch ALL modifiers, whose declaration includes the modifier name and looks like this: - - function replace_tag_catchall($file_info, $params = array(), $tagdata = FALSE, $modifier) - -You can also use variable pairs to capture tag data for processing in your modifier function. The syntax for using modifiers on variable pairs in your templates is: - - {myfield:option} - Tag data here - {/myfield} - -## Development Reference - -[TOC=3] ### Class Variables @@ -288,6 +121,20 @@ NOTE: **Note:** Allowing fields to be used as tag pairs requires some extra proc `TRUE` if the field can be used as a tag pair +#### `EE_Fieldtype::$entry_manager_compatible` + +`true` if the field should be displayed as an Entry Manager column in the Control Panel. + +NOTE: **Note:** when setting `public $entry_manager_compatible = true;` make sure that your fieldtype also implements the [`renderTableCell` method](development/fieldtypes/fieldtypes.md#ee_fieldtyperendertablecelldata-field_id-entry). + +#### `EE_Fieldtype::$supportedEvaluationRules` + +Array of supported evaluation rules when field is used as conditional (or `null` if the field cannot be used as conditional source). If omitted, default rules set will be used. + +#### `EE_Fieldtype::$defaultEvaluationRule` + +Default evaluation rule to pre-select when adding field conditions. Optional. + ### Function Reference **class `EE_Fieldtype`** @@ -361,6 +208,23 @@ Used to render the publish field. | \$data | `Array` | Current field data, blank for new entries | | Returns | `String` | The field to display on the publish page | +#### `EE_Fieldtype::renderTableCell($data, $field_id, $entry)` + +Display the field data as column in the Entry Manager + +| Parameter | Type | Description | +| --------- | -------- | ----------------------------------------- | +| \$data | `Array` | Current field data | +| \$field_id| `Int` | Current field ID | +| \$entry | `Array` | Current `ChannelEntry` object | +| Returns | `String` | The string to display in Entry Manager column | + +#### `EE_Fieldtype::getTableColumnConfig()` + +Sets [table column configuration](development/services/table.md#setting-the-columns) for Entry Manager + +Returns `Array` + #### `EE_Fieldtype::validate($data)` Validates the field input @@ -712,52 +576,8 @@ Here are the usage details for this function: A jQuery object of the field being affected by the current event is passed to the callback function. -## Working with Live Preview - -In order for your fieldtype to render in a template under live preview, it needs to be able to render using data from the publish form, which is essentially your fieldtype's POST data. You will not access your data from `$_POST`, your fieldtype's data should be sent automatically to your `replace_tag()` method. If you're missing any data, you can access the entry's entire preview data via the [LivePreview service](development/services/live-preview.md). +NOTE: **Note:** Please refer to [Enhanced Fieldtype Features](development/fieldtypes/enhanced.md) page for advanced topics, such ad working with Live Preview, Entry Manager, Entry Cloning, File Picker and Conditional Fields. -This means if your fieldtype does extra processing before your data is saved and your `replace_tag()` method expects data in a different format than what is returned directly from the publish form, you'll need to make accommodations. +## Do Something - Build A Fieldtype -For instance, say your fieldtype has inputs that look like this: - - - - -And your `save()` and `replace_tag()` routines looks like this: - - function save($data) - { - // Concatenate this data to save in the database - return $data['text1'] . $data['text2']; - } - - function replace_tag($data) - { - // Data is preformatted, just return it! - return $data; - } - -You may want to change your `replace_tag()` routine to format its data on the fly: - - function replace_tag($data) - { - // Looks like we're in live preview, reformat our data for presentation - if (ee('LivePreview')->hasEntryData()) - { - return $data['text1'] . $data['text2']; - } - - return $data; - } - -### Live Preview Javascript - -Live Preview automatically refreshes when HTML inputs, selects, and textareas are interacted with. If your fieldtype has other interactions that need to update the live preview, you can use the following JavaScript: - - $(document).trigger('entry:preview'); - -Many fieldtypes do not need to be notified via JavaScript when the Live Preview modal opens and closes, many of your JavaScript bindings should continue to work. But certain libraries such as CKEditor may require some more attention in this area and for that you can listen to the `entry:preview-open` and `entry:preview-closed` events on `$(document)` to do any extra processing you need: - - $(document).on('entry:preview-open', function(event) { - // ... - }); +For a complete fieldtype example see the [Google Maps Fieldtype example](/development/fieldtypes/example.md). \ No newline at end of file diff --git a/docs/development/guidelines/checklist.md b/docs/development/guidelines/checklist.md index 195900158..4c9de5825 100755 --- a/docs/development/guidelines/checklist.md +++ b/docs/development/guidelines/checklist.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/guidelines/general.md b/docs/development/guidelines/general.md index fbe08f702..68f688655 100755 --- a/docs/development/guidelines/general.md +++ b/docs/development/guidelines/general.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -128,7 +128,7 @@ CORRECT: In general, code should be commented prolifically. It not only helps describe the flow and intent of the code for less experienced programmers, but can prove invaluable when returning to your own code months down the line. There is not a required format for comments, but the following are recommended. -[DocBlock](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock) style comments preceding class and method declarations so they can be picked up by IDEs: +[DocBlock](https://docs.phpdoc.org/guide/guides/docblocks.html) style comments preceding class and method declarations so they can be picked up by IDEs: /** * Super Class @@ -247,7 +247,7 @@ CORRECT: } } -See also information regarding [typecasting](http://us3.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting), which can be quite useful. Typecasting has a slightly different effect which may be desirable. When casting a variable as a string, for instance, `NULL` and boolean `FALSE` variables become empty strings, 0 (and other numbers) become strings of digits, and boolean `TRUE` becomes `"1"`: +See also information regarding [typecasting](https://us3.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting), which can be quite useful. Typecasting has a slightly different effect which may be desirable. When casting a variable as a string, for instance, `NULL` and boolean `FALSE` variables become empty strings, 0 (and other numbers) become strings of digits, and boolean `TRUE` becomes `"1"`: $str = (string) $str; // cast $str as a string @@ -301,7 +301,7 @@ When aligning multiple lines (e.g. in an associative array), use spaces instead ## Compatibility -Unless specifically mentioned in your add-on's documentation, all code must be compatible with PHP version 5.3.10+. Additionally, do not use PHP functions that require non-default libraries to be installed unless your code contains an alternative method when the function is not available, or you explicitly document that your add-on requires said PHP libraries. +Unless specifically mentioned in your add-on's documentation, all code must be compatible with PHP version 7.2.5+. Additionally, do not use PHP functions that require non-default libraries to be installed unless your code contains an alternative method when the function is not available, or you explicitly document that your add-on requires said PHP libraries. ## Use of ee()->session->cache @@ -504,7 +504,7 @@ On some servers where display_errors is disabled, and you do not have the abilit ini_set('display_errors', 1); -NOTE: **Note:** Setting the [display_errors](http://us.php.net/manual/en/ref.errorfunc.php#ini.display-errors) setting with `ini_set()` at runtime is not identical to having it enabled in the PHP environment. Namely, it will not have any effect if the script has fatal errors +NOTE: **Note:** Setting the [display_errors](https://us.php.net/manual/en/ref.errorfunc.php#ini.display-errors) setting with `ini_set()` at runtime is not identical to having it enabled in the PHP environment. Namely, it will not have any effect if the script has fatal errors ## Short Open Tags @@ -572,7 +572,7 @@ CORRECT: ## MySQL Table Key Naming -Table key definitions must be explicitly named, to avoid accidental duplicate keys or inadvertent operations on the wrong index. Multiple column keys should be named distinctly, and preferably use all column names, separated with an underscore. ([Additional info](http://www.mysqlperformanceblog.com/2008/05/28/should-you-name-indexes-while-doing-alter-table/)) +Table key definitions must be explicitly named, to avoid accidental duplicate keys or inadvertent operations on the wrong index. Multiple column keys should be named distinctly, and preferably use all column names, separated with an underscore. ([Additional info](https://www.percona.com/blog/2008/05/28/should-you-name-indexes-while-doing-alter-table/)) INCORRECT: diff --git a/docs/development/guidelines/in-app-documentation.md b/docs/development/guidelines/in-app-documentation.md index 6da74a754..b07384cb8 100755 --- a/docs/development/guidelines/in-app-documentation.md +++ b/docs/development/guidelines/in-app-documentation.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/guidelines/index.md b/docs/development/guidelines/index.md index 86c64266c..2b834e0e4 100755 --- a/docs/development/guidelines/index.md +++ b/docs/development/guidelines/index.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/guidelines/performance.md b/docs/development/guidelines/performance.md index b2a36fa3c..20f1cd2d9 100755 --- a/docs/development/guidelines/performance.md +++ b/docs/development/guidelines/performance.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -89,7 +89,7 @@ Remarkably, even if a match occurs on each loop, the additional processing overh ## Use sprintf instead of str_replace -When you need to add one or more variables to an existing string (e.g. lang values), make sure to use [sprintf](http://php.net/sprintf) instead of `str_replace`. +When you need to add one or more variables to an existing string (e.g. lang values), make sure to use [sprintf](https://php.net/sprintf) instead of `str_replace`. INCORRECT: @@ -116,7 +116,7 @@ CORRECT: if (strncmp($str, 'foo', 3) == 0) if (strncasecmp($str, 'foo', 3) == 0) -[strncmp()](http://us3.php.net/manual/en/function.strncmp.php) and [strncasecmp()](http://us3.php.net/manual/en/function.strcasecmp.php) return < 0 if `str1` is less than `str2`, > 0 if `str1` is greater than `str2`, and **0 if they are equal**. +[strncmp()](https://us3.php.net/manual/en/function.strncmp.php) and [strncasecmp()](https://us3.php.net/manual/en/function.strcasecmp.php) return < 0 if `str1` is less than `str2`, > 0 if `str1` is greater than `str2`, and **0 if they are equal**. ## for() Loops @@ -136,7 +136,7 @@ ALTERNATIVE: ## Heredoc Strings -Avoid [heredoc strings](http://us3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc) unless absolutely necessary. They are more intensive for PHP to parse than single or double-quoted strings, resulting in slower code execution and increased memory usage. +Avoid [heredoc strings](https://us3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc) unless absolutely necessary. They are more intensive for PHP to parse than single or double-quoted strings, resulting in slower code execution and increased memory usage. ## One-time Use Variables diff --git a/docs/development/guidelines/security.md b/docs/development/guidelines/security.md index 7f1ad4315..b4095b8d2 100755 --- a/docs/development/guidelines/security.md +++ b/docs/development/guidelines/security.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -17,15 +17,15 @@ lang: php ## Cross Site Scripting (XSS) -Cross Site Scripting is a type of security vulnerability that allows code injection by malicious users onto a page. You can find some educational reading and examples on the following site: [http://owasp.org](https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet). +Cross Site Scripting is a type of security vulnerability that allows code injection by malicious users onto a page. You can find some educational reading and examples on the following site: [https://owasp.org](https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet). Cross Site Scripting should be taken very seriously as you would never want your add-on to be the source of an attack vector. -### `ee()->security->xss_clean()` +### `ee('Security/XSS')->clean()` -`ee()->security->xss_clean()` is the built in ExpressionEngine XSS sanitization method, which is constantly tweaked for improved security and performance. It accepts both a `string` and an `array` and will return sanitized text: +`ee('Security/XSS')->clean()` is the built in ExpressionEngine XSS sanitization method, which is constantly tweaked for improved security and performance. It accepts both a `string` and an `array` and will return sanitized text: - $str = ee()->security->xss_clean($str); + $str = ee('Security/XSS')->clean($str); ### Sanitized Variables on Input @@ -41,7 +41,7 @@ If the user input is in the Control Panel, such as a module's back end, it is at ### INSERT and UPDATE Queries -As ExpressionEngine assumes that all information in the database is sanitized against XSS, the responsibility for sanitization falls on **input** to the database. Active Record methods will escape your data, but will not XSS clean it.Therefore, all data should be run through either `ee()->security->xss_clean()` or `ee()->input->get_post('key', TRUE)` before being stored in the database. +As ExpressionEngine assumes that all information in the database is sanitized against XSS, the responsibility for sanitization falls on **input** to the database. Active Record methods will escape your data, but will not XSS clean it.Therefore, all data should be run through either `ee('Security/XSS')->clean()` or `ee()->input->get_post('key', TRUE)` before being stored in the database. ### Outputting Data to the Page @@ -53,7 +53,7 @@ Use the [Typography class](development/legacy/libraries/typography.md) whenever ### When In Doubt... -If there is any doubt on the safety of a variable that you are outputting or inserting into the database, use XSS Clean: `ee()->security->xss_clean($value)`. +If there is any doubt on the safety of a variable that you are outputting or inserting into the database, use XSS Clean: `ee('Security/XSS')->clean($value)`. ## SQL Injection Prevention @@ -62,7 +62,7 @@ SQL Injection is a special type of attack in which data is used in a query witho $evil = "brett'; DELETE FROM exp_members;"; $query = ee()->db->query("SELECT * FROM exp_members WHERE username='{$evil}'"); -For more information, you can read MySQL's guide to SQL Injection security: +For more information, you can read MySQL's guide to SQL Injection security: ### Escaping PHP Variables @@ -70,7 +70,7 @@ PHP variables should be escaped in queries anytime the variable is not explicitl Manually written queries should use both XSS cleaned data and [ee()->db->escape_str()](development/legacy/libraries/database.md) on variables, even if you think the value is trusted: - $data = ee()->security->xss_clean($foo); + $data = ee('Security/XSS')->clean($foo); OR @@ -143,11 +143,11 @@ Or even: $foo = (ctype_digit($foo = ee()->TMPL->fetch_param('foo'))) ? FALSE : $foo; -NOTE: **Note:** You no doubt notice that `ctype_digit` is being used here to validate the parameter as a numeric value. Why? [is_numeric()](http://us3.php.net/manual/en/function.is-numeric.php) returns `TRUE` for some non-integer numbers, including notation, e.g. "-0123.45e6". [is_int()](http://us2.php.net/manual/en/function.is-int.php) only returns `TRUE` on actual integer variable types, and tag parameters are always strings. Note that [ctype_digit()](http://us3.php.net/manual/en/function.ctype-digit.php), will return `TRUE` on an empty string in pre-5.1.0 versions of PHP. +NOTE: **Note:** You no doubt notice that `ctype_digit` is being used here to validate the parameter as a numeric value. Why? [is_numeric()](https://us3.php.net/manual/en/function.is-numeric.php) returns `TRUE` for some non-integer numbers, including notation, e.g. "-0123.45e6". [is_int()](https://us2.php.net/manual/en/function.is-int.php) only returns `TRUE` on actual integer variable types, and tag parameters are always strings. Note that [ctype_digit()](https://us3.php.net/manual/en/function.ctype-digit.php), will return `TRUE` on an empty string in pre-5.1.0 versions of PHP. ### Default Values -Always have default values if you plan to allow the code to execute without parameters being supplied, or in the case of invalid parameter values being provided. An empty string, `NULL`, or boolean `FALSE` simply needs to be tested later to accommodate defaults in your code. This also allows you to change the defaults all in one place in the script. Here is one method, that takes advantage of PHP's [variable variables](http://us2.php.net/manual/en/language.variables.variable.php). +Always have default values if you plan to allow the code to execute without parameters being supplied, or in the case of invalid parameter values being provided. An empty string, `NULL`, or boolean `FALSE` simply needs to be tested later to accommodate defaults in your code. This also allows you to change the defaults all in one place in the script. Here is one method, that takes advantage of PHP's [variable variables](https://us2.php.net/manual/en/language.variables.variable.php). $defaults = array( 'type' => '', @@ -192,7 +192,7 @@ If your form submits to a different site you should ensure that you are not leak ### Validating Form Hashes in Your Add-on -ExpressionEngine will automatically check the CSRF token of all requests before handing the request off to your add-on. This means that all forms and requests must include the `csrf_token` field. Asynchronous requests that include an _HTTP_REQUESTED_BY_ header (this is set by most popular libraries, such as jQuery) default to being exempt from these checks as they provide a good layer of intrinsic security. +ExpressionEngine will automatically check the CSRF token of all requests before handing the request off to your add-on. This means that all forms and requests must include the `csrf_token` field. There are several ways in which you can control this validation behavior of the CSRF tokens. @@ -236,14 +236,14 @@ In your methods that will be handling form data, create a logic map that you can - What is validated and in what order? - Does the user need to be a logged in member? - - Does the user need to be in a specific member group for the action? + - Does the user need to be in a specific member role for the action? - [Deny Duplicate Data](security/spam-protection.md) Check? - What security checks are performed? - Secure form hashes - CAPTCHA - - Blacklist Banning / Whitelist Overrides - - `ee()->blacklist->blacklisted == 'y'` (blacklisted) - - `ee()->blacklist->whitelisted == 'y'` (whitelist override) + - Block list Banning / Allow list Overrides + - `ee()->blockedlist->blocked == 'y'` (blocked) + - `ee()->blockedlist->allowed == 'y'` (allowedlist override) - Preferences and settings checked against - Data Filtering and Conversion - XSS clean @@ -252,7 +252,7 @@ In your methods that will be handling form data, create a logic map that you can - XML convert - Remove PHP or ExpressionEngine tags? - Insert Data or Update - - `ee()->security->xss_clean()` on all string data even if there is no intent to output (don't forget about the Query module!) + - `ee('Security/XSS')->clean()` on all string data even if there is no intent to output (don't forget about the Query module!) - Make sure all data is properly escaped After processing, make sure submitted data that might be sent to the screen for a success or error message is the filtered and validated version @@ -289,7 +289,7 @@ Never send values for preferences or settings in hidden form fields. HTML source - JavaScript is good against bots but not against serious hackers. - Base 64 encoding is easy to break and therefore NOT recommended. - If there are a limited number of _possible_ values, you could use `md5()` or `sha1()` to encode the values and check against encoded _possible_ values. This is not bulletproof of course, as the hacker needs only to know what the possible values are to be able to utilize them. -- PHP has the [OpenSSL library](http://php.net/manual/en/book.openssl.php) and other PHP libraries which have encryption and decryption with a salt. +- PHP has the [OpenSSL library](https://php.net/manual/en/book.openssl.php) and other PHP libraries which have encryption and decryption with a salt. - ExpressionEngine has an [Encryption service](development/services/encrypt.md) available to developers that uses OpenSSL. ### Yes / No Preferences diff --git a/docs/development/guidelines/view-php-syntax.md b/docs/development/guidelines/view-php-syntax.md index f839b00aa..12e437536 100755 --- a/docs/development/guidelines/view-php-syntax.md +++ b/docs/development/guidelines/view-php-syntax.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/json-version-feed.md b/docs/development/json-version-feed.md index 5b06149d8..0bdd20aff 100755 --- a/docs/development/json-version-feed.md +++ b/docs/development/json-version-feed.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/jump-menu.md b/docs/development/jump-menu.md new file mode 100644 index 000000000..8a66f2a31 --- /dev/null +++ b/docs/development/jump-menu.md @@ -0,0 +1,85 @@ +--- +lang: ee +--- + + + +# Jump Menu + +Add-ons can easily add custom items for the Jump Menu. + +TIP: If you are working with an existing add-on, we recommend you start with [Modernizing add-ons](development/modernizing-existing-add-ons.md) + +## Creating your add-on jump file. +Jumps are created via the CLI by using the `make:jump` command. + +``` +php eecli.php make:jump +Let's create an add-on Jump File! +What add-on is the Jumps file being added to? (amazing_add_on, cron): [amazing_add_on] +Building Add-on Jumps file now. +Jumps file successfully created! Please note: You may need to clear your browser cache before you can see the new jump menu items + +``` + +Follow the prompts to add a jump file to your add-on. +This will create a `jump.amazing_add_on.php` file in your add-on. + +``` +amazing_add_on + ┣ jump.amazing_add_on.php + ┗ ... + ``` + +Please note, your jump file will contain of the following: + + use ExpressionEngine\Service\JumpMenu\AbstractJumpMenu; + + class [AddonName]_jump extends AbstractJumpMenu + { + + protected static $items = array( + 'commandArrayTitle' => array( + 'icon' => 'fa-file', + 'command' => 'few lowercase words to be fuzzy-matched in jump menu', + 'command_title' => 'Displayed command title upon match from above', + 'dynamic' => false, + 'requires_keyword' => false, + 'target' => 'See Below. Behavior changes based on dynamic element above' + )); + +To Add Jump Menu commands to your add-on, you simply add array elements to the `$items` array in the example generated + +The array of a Jump Menu command is comprised of the following keys: + +- `commandArrayTitle` _(string)_ Unique command title used as key in global jumps array. Will be prefixed with the add-ons name so a command title in the add-on AmazingAddOn of `processData` will be `AmazingAddon:processData` +- `icon` _(string)_ FontAwesome format: `fa-file` +- `command` _(string)_ lowercase string to be fuzzy-matched when user is typing in jump menu: “edit external source” +- `command_title` _(string)_ Language file array key for Human-readable command title, shows up in results if fuzzy-matched. *Please note, this should be in your Lang file. + +NOTE: Style Note: We use bold, italics, and brackets to denote keywords and actions to the user and urge you to use keep your commands in line with this style: +“Edit <b>Your Object</b> titled <i>[secondary keywords]</i>” +“Edit Author titled [name]” + + +- `dynamic` _(bool)_ default: false, sets whether your command has secondary options in the jump menu +- `requires_keyword` _(bool)_ default: false, Used in conjunction with `dynamic`. Whether your command requires additional keywords to return results or not. An example of a `false` would be returning a list of channels. An example of `true` would be returning entries where you don’t want to prematurely return them before the user enters something to filter by. +- `target` (string) Can NOT be to an external link + - If `dynamic` == true: method name in your add-on’s jump file that will be called. Will be passed an array of search keywords. + - If `dynamic` == false: method name to redirect the user to in your add-on (ex: settings/license) + + NOTE: This is currently hard-coded to `addons/settings/[addon_name]/X` but will most likely be changed to allow any CP URL path. + +In addition to the required array elements above. There are also the following array element that is optional. +``` +'permission' => 'ban_users' + +``` +- `permission` _(string)_ ExpressionEngine Role permissions that has to be matched for a user to see this jump menu command. diff --git a/docs/development/legacy/api/api-channel-categories.md b/docs/development/legacy/api/api-channel-categories.md index 450091797..342693c06 100755 --- a/docs/development/legacy/api/api-channel-categories.md +++ b/docs/development/legacy/api/api-channel-categories.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/api/api-channel-fields.md b/docs/development/legacy/api/api-channel-fields.md index 79843c7e5..e0abe0032 100755 --- a/docs/development/legacy/api/api-channel-fields.md +++ b/docs/development/legacy/api/api-channel-fields.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/api/api-channel-structure.md b/docs/development/legacy/api/api-channel-structure.md index 8a6fcb69c..e4a59d194 100755 --- a/docs/development/legacy/api/api-channel-structure.md +++ b/docs/development/legacy/api/api-channel-structure.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/api/api-template-structure.md b/docs/development/legacy/api/api-template-structure.md index 1c82e86eb..9df8efc80 100755 --- a/docs/development/legacy/api/api-template-structure.md +++ b/docs/development/legacy/api/api-template-structure.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/api/index.md b/docs/development/legacy/api/index.md index 6e395ae71..69bbe21d8 100755 --- a/docs/development/legacy/api/index.md +++ b/docs/development/legacy/api/index.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/common-functions.md b/docs/development/legacy/common-functions.md index 6e8203a1d..58bafe76f 100755 --- a/docs/development/legacy/common-functions.md +++ b/docs/development/legacy/common-functions.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -101,7 +101,7 @@ This function is an alias for `CI_Log::write_log()`. | Parameter | Type | Description | | --------- | -------- | -------------------------------------------- | -| \$code | `Int` | HTTP Reponse status code | +| \$code | `Int` | HTTP Response status code | | \$text | `String` | A custom message to set with the status code | | Returns | `Void` | | @@ -110,7 +110,7 @@ Permits you to manually set a server status header. Example: set_status_header(401); // Sets the header as: Unauthorized -[See here](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) for a full list of headers. +[See here](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) for a full list of headers. ### `remove_invisible_characters($str[, $url_encoded = TRUE])` diff --git a/docs/development/legacy/controllers.md b/docs/development/legacy/controllers.md index 4a87acdbd..a9c0d6165 100755 --- a/docs/development/legacy/controllers.md +++ b/docs/development/legacy/controllers.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -130,7 +130,7 @@ The overridden method call (typically the second segment of the URI) will be pas } } -Any extra segments after the method name are passed into `_remap()` as an optional second parameter. This array can be used in combination with PHP's [call_user_func_array()](http://php.net/call_user_func_array) to emulate ExpressionEngine's default behavior. +Any extra segments after the method name are passed into `_remap()` as an optional second parameter. This array can be used in combination with PHP's [call_user_func_array()](https://php.net/call_user_func_array) to emulate ExpressionEngine's default behavior. Example: diff --git a/docs/development/legacy/database/active-record.md b/docs/development/legacy/database/active-record.md index 201582c5c..5f7fac30e 100755 --- a/docs/development/legacy/database/active-record.md +++ b/docs/development/legacy/database/active-record.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -494,7 +494,7 @@ The second parameter lets you set a result offset: ee()->db->limit(10, 20); // Produces: LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax) -### `ffset($offset)` +### `offset($offset)` | Parameter | Type | Description | | --------- | --------------------- | ---------------------------- | diff --git a/docs/development/legacy/database/connecting-to-an-external-database.md b/docs/development/legacy/database/connecting-to-an-external-database.md index ad36bbbaa..1ae11ff25 100755 --- a/docs/development/legacy/database/connecting-to-an-external-database.md +++ b/docs/development/legacy/database/connecting-to-an-external-database.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -25,12 +25,12 @@ The basic pattern is to: For example, given an `other_db` block alongside `expressionengine` in the `$config['database']` array of your primary config file: - $db_config = \EllisLab\ExpressionEngine\Service\Database\DBConfig(ee('Config')->getFile()); + $db_config = \ExpressionEngine\Service\Database\DBConfig(ee('Config')->getFile()); $db_config->getGroupConfig('other_db'); - $db = new \EllisLab\ExpressionEngine\Service\Database\Database($db_config); + $db = new \ExpressionEngine\Service\Database\Database($db_config); $query = $db->newQuery()->get('my_table'); -NOTE: **Note:** Your class can `use EllisLab\ExpressionEngine\Service\Database;` and then reference `Database\DBConfig` and `Database\Database` without typing out the full namespace. +NOTE: **Note:** Your class can `use ExpressionEngine\Service\Database;` and then reference `Database\DBConfig` and `Database\Database` without typing out the full namespace. In actual practice you will want to make sure you are only spinning up one connection per request, and you will want to use cleaner and clearer syntax. To that end, here is a complete, simple example using a plugin we will call "Help Desk". @@ -58,7 +58,7 @@ To keep our syntax simple and explicit, we will make our external database avail 'My Vendor', diff --git a/docs/development/legacy/database/forge.md b/docs/development/legacy/database/forge.md index 9f8f472d6..884da8766 100755 --- a/docs/development/legacy/database/forge.md +++ b/docs/development/legacy/database/forge.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -123,7 +123,7 @@ NOTE: **Note:** Multiple calls to `add_field()` are cumulative. **Creating an id field** -There is a special exception for creating id fields. A field with type id will automatically be assinged as an `INT(9) auto_incrementing` Primary Key: +There is a special exception for creating id fields. A field with type id will automatically be assigned as an `INT(9) auto_incrementing` Primary Key: ee()->dbforge->add_field('id'); // gives id INT(9) NOT NULL AUTO_INCREMENT @@ -213,7 +213,7 @@ Executes a `TABLE` rename: | Parameter | Type | Description | | ------------- | -------------- | ---------------------------------------------------------------------------------- | | \$table | `String` | The table to add the column to | -| \$field | `Array` | The column defintition (see `add_field()` for details) | +| \$field | `Array` | The column definition (see `add_field()` for details) | | \$after_field | `String` | The field that should come before this new field, leave empty to be the last field | | Returns | `CI_DB_result` | The result of the `ALTER TABLE` query | @@ -254,7 +254,7 @@ Used to remove a column from a table: | Parameter | Type | Description | | --------- | -------------- | ------------------------------------------------------ | | \$table | `String` | The table to add the column to | -| \$field | `Array` | The column defintition (see `add_field()` for details) | +| \$field | `Array` | The column definition (see `add_field()` for details) | | Returns | `CI_DB_result` | The result of the `ALTER TABLE` query | The usage of this method is identical to `add_column()`, except it alters an existing column rather than adding a new one. In order to change the name you can add a `name` key into the field defining array: diff --git a/docs/development/legacy/database/index.md b/docs/development/legacy/database/index.md index dbbd9fdbe..3cd39c789 100755 --- a/docs/development/legacy/database/index.md +++ b/docs/development/legacy/database/index.md @@ -3,7 +3,7 @@ ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/database/raw.md b/docs/development/legacy/database/raw.md index e2d849c13..bd5c85477 100755 --- a/docs/development/legacy/database/raw.md +++ b/docs/development/legacy/database/raw.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/database/results.md b/docs/development/legacy/database/results.md index 8409fe3d1..e4572f1df 100755 --- a/docs/development/legacy/database/results.md +++ b/docs/development/legacy/database/results.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/database/smartforge.md b/docs/development/legacy/database/smartforge.md new file mode 100644 index 000000000..abb2dbb89 --- /dev/null +++ b/docs/development/legacy/database/smartforge.md @@ -0,0 +1,182 @@ +--- +lang: php +--- + + + +# Database SmartForge Class + +**class `Smartforge`** + +[TOC] + +The Smartforge Class contains utility methods to help you manage your database. Load the Forge Class as follows: + + ee()->load->library('smartforge') + +Once initialized you will access the methods using the `ee()->smartforge` object: + + ee()->smartforge->some_method(); + +Some Smartforge class functions duplicate similar dbforge class functions but adds more intelligence to these transaction - for example by checking that the +table / column / index actually exist before executing the function. The other Smartforge functions are novel to the class. + +## Utility functions + +[TOC=3] + +### `create_table($table)` + +| Parameter | Type | Description | +| --------- | -------------- | ----------------------------------------- | +| \$table | `String` | The name of the table to create | +| Returns | `CI_DB_result` | The result of the `CREATE TABLE` query | + +Creates a table within the current EE database. Function will check to make sure the existing table doesn't exist before creating it. + + ee()->smartforge->create_table('cat_watch_list'); + +### `rename_table($table, $new_table)` + +| Parameter | Type | Description | +| ----------- | ---------------------- | -------------------------------------------------------------- | +| \$table | `String` | The name of the table to rename | +| \$new_table | `String` | The new name for the table. | +| Returns | `CI_DB_result| bool` | The result of the `ALTER TABLE .. RENAME TO ..` query or false | + +Renames a table. Function will check to make sure the existing table name actually exists and the new table name doesn't. + + ee()->smartforge->rename_table('cat_watch_list','malicious_feline_ids'); + +### `add_column($table = '', $field = array(), $after_field = '')` + +| Parameter | Type | Description | +| -------------- | ---------------------- | -------------------------------------------------------------- | +| \$table | `String` | The name of the table to add a column to | +| \$field | `Array` | A multiddimensional associative array containing field names as the keys and an associative array of parameters for creating database fields:
`type`: The type of field to create (e.g. `INT`, `VARCHAR`, `TEXT`)
`constraint`: The length of the field
`unsigned`: Set to `TRUE` to generate `UNSIGNED` in the field definition.
`default`: Set to a value to generate a default value in the field definition.
`null`: Set to `TRUE` to generate `NULL` in the field definition. Without this, the field will default to `NOT NULL`.
`auto_increment`: Set to `TRUE` to generate an `auto_increment` flag on the field. Note that the field type must be a type that supports this, such as integer. | +| \$after_field | `String` | The field that should come before this new field, leave empty to be the last field | +| Returns | `bool` | True if the column add succeeds, otherwise false | + +Adds one or more columns to a table, optionally starting the insertion after a nominated column. For each column to add it checks to see if column already exists in the DB; if it does it skips adding that column. + + ee()->smartforge->add_column('cat_watch_list','malicious_feline_ids'); + $fields = array( + 'preferences' => array('type' => 'TEXT') + ); + ee()->smartforge->add_column('table_name', $fields); + +You can also take advantage of MySQL's `AFTER` and `FIRST` clauses to position the new column: + + // Will place the new column after the `another_field` column: + $fields = array( + 'preferences' => array('type' => 'TEXT', 'after' => 'another_field') + ); + + // Will place the new column at the start of the table definition: + $fields = array( + 'preferences' => array('type' => 'TEXT', 'first' => TRUE) + ); + +### `drop_column($table, $column_name)` + +| Parameter | Type | Description | +| ------------- | -------------- | --------------------------------- | +| \$table | `String` | The table to drop the column from | +| \$column_name | `String` | The name of column to drop | +| Returns | `CI_DB_result|bool` | The result of the `DROP` query or false if it fails | + +Drop a column in the given database table if it already exists. + + ee()->smartforge->drop_column('table_name', 'name_of_col_7'); + +### `drop_column_batch($table, $column_names)` + +| Parameter | Type | Description | +| ------------- | -------------- | --------------------------------- | +| \$table | `String` | The table to drop the column from | +| \$column_names | `Array` | An array of column names to drop | +| Returns | `CI_DB_result|bool` | The result of the `DROP` query or false if it fails | + +Drop multiple columns in the given database table if they already exists. + + ee()->smartforge->drop_column('table_name', ['name_of_col_11','name_of_col_33']); + +### `drop_table($table)` + +| Parameter | Type | Description | +| --------- | -------------- | ---------------------------------------------- | +| \$table | `String` | The name of the table to drop | +| Returns | `CI_DB_result|bool` | The result of the `DROP TABLE IF EXISTS` query or false if it fails| + +Drops a table from the database if it exists. + + ee()->smartforge->drop_table('table_name'); + +### `modify_column($table = '', $field = array())` + +| Parameter | Type | Description | +| --------- | -------------- | ------------------------------------------------------ | +| \$table | `String` | The table to add the column to | +| \$field | `Array` | The column definition (see `add_column()` for details) | +| Returns | `bool` | True if it succeeds, false otherwise | + + Modify a database column (if it exists) with the added check that if the column is being renamed and both current column (A) and proposed column (B) names exist, drop column A and leave column B. + +If both columns exist, it's likely this update is being run again from a version further back than the point the DB is actually at (an overlay, if you will). Therefore, column B is probably the one with all the data in it, and column A has only very recently (as in, within seconds) been created. + + $fields = array( + 'old_name' => array( + 'name' => 'new_name', + 'type' => 'TEXT', + ), + ); + + ee()->smartforge->modify_column('table_name', $fields); + +### `insert_set($table = '', $values = array(), $unique = array())` + +| Parameter | Type | Description | +| --------- | -------------- | ------------------------------------------------------ | +| \$table | `String` | The table to add the column to | +| \$values | `Array` | An associative array of column names => row values | +| \$unique | `Array` | An associative array of column names => row values (can only include key/value pairs from $values) | +| Returns | `bool` | True if it succeeds, false otherwise | + +Insert values into the database, with optional unique column name/values in a given column(s). + +If the unique field content already exists in the column in the DB, function return FALSE since this set of values cannot be inserted into the column without breaking the uniqueness test. + + ee()->smartforge->insert_set('table_name', $values, $unique); + +### `add_key($table = '', $col_name = '', $key_name = '')` + +| Parameter | Type | Description | +| ------------ | -------------- | ------------------------------------------------ | +| \$table | `String` | The name of the table to drop | +| \$col_name | `String|array` | The name(s) of the column(s) to include in index | +| \$key_name | `String` | The name for the new key (optional) | +| Returns | `bool` | True if it succeeds, false otherwise | + +Add a new key to the given database table if it doesn't already exist. Will create a composite primary key if `$col_name` is array and key name is PRIMARY. + + ee()->smartforge->add_key('table_name', 'name_of_column_22', 'index_for_22'); + +### `drop_key($table = '', $key_name = '')` + +| Parameter | Type | Description | +| ------------ | -------------- | ------------------------------------------------ | +| \$table | `String` | The name of the table to drop | +| \$key_name | `String` | The name of the key to drop | +| Returns | `bool` | True if it succeeds, false otherwise | + +Add a new key to the given database table if it doesn't already exist. Will create a composite primary key if `$col_name` is array and key name is PRIMARY. + + ee()->smartforge->drop_key('table_name', 'index_for_22'); + diff --git a/docs/development/legacy/database/utilities.md b/docs/development/legacy/database/utilities.md index a1ace2a50..54888f51f 100755 --- a/docs/development/legacy/database/utilities.md +++ b/docs/development/legacy/database/utilities.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/drivers.md b/docs/development/legacy/drivers.md index 155f6061e..7f0bf489c 100755 --- a/docs/development/legacy/drivers.md +++ b/docs/development/legacy/drivers.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/array-helper.md b/docs/development/legacy/helpers/array-helper.md index c737c9179..6a3e08c66 100755 --- a/docs/development/legacy/helpers/array-helper.md +++ b/docs/development/legacy/helpers/array-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/cookie-helper.md b/docs/development/legacy/helpers/cookie-helper.md index a9f1deb19..d4b89adf5 100755 --- a/docs/development/legacy/helpers/cookie-helper.md +++ b/docs/development/legacy/helpers/cookie-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/directory-helper.md b/docs/development/legacy/helpers/directory-helper.md index 4b0171bbc..c3cc16b06 100755 --- a/docs/development/legacy/helpers/directory-helper.md +++ b/docs/development/legacy/helpers/directory-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/download-helper.md b/docs/development/legacy/helpers/download-helper.md index fef7bc532..adb1a4562 100755 --- a/docs/development/legacy/helpers/download-helper.md +++ b/docs/development/legacy/helpers/download-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/file-helper.md b/docs/development/legacy/helpers/file-helper.md index 739e50c74..2ff07d348 100755 --- a/docs/development/legacy/helpers/file-helper.md +++ b/docs/development/legacy/helpers/file-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -69,7 +69,7 @@ You can optionally set the write mode via the third parameter: write_file('./path/to/file.php', $data, 'r+'); -The default mode is 'wb'. Please see the [PHP user guide](http://php.net/fopen) for mode options. +The default mode is 'wb'. Please see the [PHP user guide](https://php.net/fopen) for mode options. NOTE: **Note:** The path is relative to your main site index.php file, NOT your controller or view files. CodeIgniter uses a front controller so paths are always relative to the main site index. @@ -147,7 +147,7 @@ Example: Given a file and path, returns (optionally) the _name_, _path_, _size_ and _date modified_ information attributes for a file. Second parameter allows you to explicitly declare what information you want returned. -Valid `$returned_values` options are: `name`, `size`, `date`, `readable`, `writeable`, `executable` and `fileperms`. +Valid `$returned_values` options are: `name`, `size`, `date`, `readable`, `writable`, `executable` and `fileperms`. ### `get_mime_by_extension($filename)` diff --git a/docs/development/legacy/helpers/form-helper.md b/docs/development/legacy/helpers/form-helper.md index 08d826d35..0f563e22c 100755 --- a/docs/development/legacy/helpers/form-helper.md +++ b/docs/development/legacy/helpers/form-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/html-helper.md b/docs/development/legacy/helpers/html-helper.md index 3f69311e4..30471e2ca 100755 --- a/docs/development/legacy/helpers/html-helper.md +++ b/docs/development/legacy/helpers/html-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -55,11 +55,11 @@ The above code produces: Lets you create HTML `` tags. The first parameter contains the image source. Example: - echo img('images/picture.jpg'); // gives + echo img('images/picture.jpg'); // gives There is an optional second parameter that is a `TRUE`/`FALSE` value that specifics if the `src` should have the page specified by `$config['index_page']` added to the address it creates. Presumably, this would be if you were using a media controller: - echo img('images/picture.jpg', TRUE); // gives + echo img('images/picture.jpg', TRUE); // gives Additionally, an associative array can be passed to the `img()` function for complete control over all attributes and values. If an `alt` attribute is not provided, CodeIgniter will generate an empty string. @@ -76,7 +76,7 @@ Example: ); img($image_properties); - // Me, demonstrating how to eat 4 slices of pizza at one time + // Me, demonstrating how to eat 4 slices of pizza at one time ### `link_tag([$href = ''[, $rel = 'stylesheet'[, $type = 'text/css'[, $title = ''[, $media = ''[, $index_page = FALSE]]]]]])` @@ -97,15 +97,15 @@ Lets you create HTML `` tags. This is useful for stylesheet links, as we Example: echo link_tag('css/mystyles.css'); - // gives + // gives Further examples: echo link_tag('favicon.ico', 'shortcut icon', 'image/ico'); - // + // echo link_tag('feed', 'alternate', 'application/rss+xml', 'My RSS Feed'); - // + // Additionally, an associative array can be passed to the `link()` function for complete control over all attributes and values: @@ -117,7 +117,7 @@ Additionally, an associative array can be passed to the `link()` function for co ); echo link_tag($link); - // + // ### `ul($list[, $attributes = ''])` @@ -204,10 +204,10 @@ The above code will produce this:
  • shapes
    • round
    • -
    • suare
    • +
    • square
    • circles
        -
      • elipse
      • +
      • ellipse
      • oval
      • sphere
      @@ -311,22 +311,22 @@ Helps you generate document type declarations, or DTD's. XHTML 1.0 Strict is use Example: - echo doctype(); // + echo doctype(); // - echo doctype('html4-trans'); // + echo doctype('html4-trans'); // The following is a list of doctype choices. | Document type | Option | Result | | ---------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------- | -| XHTML 1.1 | xhtml11 | `` | -| XHTML 1.0 Strict | xhtml1-strict | `` | -| XHTML 1.0 Transitional | xhtml1-trans | `` | -| XHTML 1.0 Frameset | xhtml1-frame | `` | +| XHTML 1.1 | xhtml11 | `` | +| XHTML 1.0 Strict | xhtml1-strict | `` | +| XHTML 1.0 Transitional | xhtml1-trans | `` | +| XHTML 1.0 Frameset | xhtml1-frame | `` | | HTML 5 | html5 | `` | -| HTML 4 Strict | html4-strict | `` | -| HTML 4 Transitional | html4-trans | `` | -| HTML 4 Frameset | html4-frame | `` | +| HTML 4 Strict | html4-strict | `` | +| HTML 4 Transitional | html4-trans | `` | +| HTML 4 Frameset | html4-frame | `` | ### `br([$count = 1])` diff --git a/docs/development/legacy/helpers/index.md b/docs/development/legacy/helpers/index.md index 94b509f71..86a59f640 100755 --- a/docs/development/legacy/helpers/index.md +++ b/docs/development/legacy/helpers/index.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/language-helper.md b/docs/development/legacy/helpers/language-helper.md index 7880060cc..380000c10 100755 --- a/docs/development/legacy/helpers/language-helper.md +++ b/docs/development/legacy/helpers/language-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/number-helper.md b/docs/development/legacy/helpers/number-helper.md index 706588bc0..9b99d30a4 100755 --- a/docs/development/legacy/helpers/number-helper.md +++ b/docs/development/legacy/helpers/number-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/path-helper.md b/docs/development/legacy/helpers/path-helper.md index 4011caa8d..cdd474b2b 100755 --- a/docs/development/legacy/helpers/path-helper.md +++ b/docs/development/legacy/helpers/path-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -19,12 +19,12 @@ The Path Helper file contains functions that permits you to work with file paths ## Available Functions -### `set_realpath($path[, $check_existance = FALSE])` +### `set_realpath($path[, $check_existence = FALSE])` | Parameter | Type | Description | | ----------------- | -------- | -------------------------------------------- | | \$path | `String` | Path | -| \$check_existance | `Bool` | Whether to check if the path actually exists | +| \$check_existence | `Bool` | Whether to check if the path actually exists | | Returns | `String` | An absolute path | This function will return a server path without symbolic links or relative directory structures. An optional second argument will cause an error to be triggered if the path cannot be resolved. diff --git a/docs/development/legacy/helpers/security-helper.md b/docs/development/legacy/helpers/security-helper.md index 36d21497f..b9eb39201 100755 --- a/docs/development/legacy/helpers/security-helper.md +++ b/docs/development/legacy/helpers/security-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/string-helper.md b/docs/development/legacy/helpers/string-helper.md index dfcf9705f..b378efd20 100755 --- a/docs/development/legacy/helpers/string-helper.md +++ b/docs/development/legacy/helpers/string-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -15,7 +15,7 @@ lang: php The String Helper file contains functions that assist in working with strings. This helper is loaded using the following code: - $this->load->helper('string'); + ee()->load->helper('string'); ## Available Functions @@ -94,7 +94,7 @@ NOTE: **Note:** To use multiple separate calls to this function simply call the | \$str | `String` | Input string | | Returns | `String` | A string with normalized slashes | -Converts double slashes in a string to a single slash, except those found in URL protocol prefixes (e.g. http://). +Converts double slashes in a string to a single slash, except those found in URL protocol prefixes (e.g. https://). Example: @@ -149,7 +149,7 @@ Removes any leading/trailing slashes from a string. Example: | \$trim | `Bool` | Whether to also trim the specified character | | Returns | `String` | Reduced string | -Reduces multiple instances of a particular character occuring directly after each other. Example: +Reduces multiple instances of a particular character occurring directly after each other. Example: $string = "Fred, Bill,, Joe, Jimmy"; $string = reduce_multiples($string,","); //results in "Fred, Bill, Joe, Jimmy" diff --git a/docs/development/legacy/helpers/text-helper.md b/docs/development/legacy/helpers/text-helper.md index bb5080740..364920e3f 100755 --- a/docs/development/legacy/helpers/text-helper.md +++ b/docs/development/legacy/helpers/text-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/helpers/url-helper.md b/docs/development/legacy/helpers/url-helper.md index 0edca86c8..455662db6 100755 --- a/docs/development/legacy/helpers/url-helper.md +++ b/docs/development/legacy/helpers/url-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -35,21 +35,16 @@ WARN: Deprecated since version 3.0.0: Use [CP/URL Service](development/services/ | \$protocol | `String` | Protocol, e.g. 'http' or 'https' | | Returns | `String` | Site URL | -Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site **index_page** in your config file) will be added to the URL, as will any URI segments you pass to the function, plus the **url_suffix** as set in your config file. +Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site **index_page** in your config file) will be added to the URL, as will any URI segments you pass to the function. You are encouraged to use this function any time you need to generate a local URL so that your pages become more portable in the event your URL changes. -Segments can be optionally passed to the function as a string or an array. Here is a string example: +Segments can be optionally passed to the function as a string. Here is a string example: - echo site_url('http://github.com/news/local/123'); + echo site_url('http://github.com/news/local/123'); The above example would return something like: `https://example.com/news/local/123` -Here is an example of segments passed as an array: - - $segments = array('news', 'local', '123'); - echo site_url(http://github.com/$segments); - This function is an alias for `EE_Config::site_url()`. ### `base_url(http://github.com/$uri%20=%20'',%20$protocol%20=%20NULL)` @@ -64,21 +59,7 @@ Returns your site base URL, as specified in your config file. Example: echo base_url(); -This function returns the same thing as `site_url()`, without the _index_page_ or _url_suffix_ being appended. - -Also like `site_url()`, you can supply segments as a string or an array. Here is a string example: - - echo base_url("http://github.com/blog/post/123"); - -The above example would return something like: `https://example.com/blog/post/123` - -This is useful because unlike `site_url()`, you can supply a string to a file, such as an image or stylesheet. For example: - - echo base_url("http://github.com/images/icons/edit.png"); - -This would give you something like: `https://example.com/images/icons/edit.png` - -This function is an alias for `EE_Config::base_url()`. +This function returns the same thing as `site_url()`, without the _index_page_ being appended. ### `current_url()` @@ -98,7 +79,7 @@ NOTE: **Note:** Calling this function is the same as doing this: `site_url(uri_s Returns the URI segments of any page that contains this function. For example, if your URL was this: - http://some-site.com/blog/comments/123 + https://some-site.com/blog/comments/123 The function would return: @@ -129,7 +110,7 @@ Creates a standard HTML anchor link based on your local site URL. The first parameter can contain any segments you wish appended to the URL. As with the `site_url()` function above, segments can be a string or an array. -NOTE: **Note:** If you are building links that are internal do not include the base URL (http://...). This will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL. +NOTE: **Note:** If you are building links that are internal do not include the base URL (https://...). This will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL. The second segment is the text you would like the link to say. If you leave it blank, the URL will be used. @@ -174,7 +155,7 @@ Here is an example with attributes: NOTE: **Note:** The above attributes are the function defaults so you only need to set the ones that are different from what you need. If you want the function to use all of its defaults simply pass an empty array in the third parameter: `echo anchor_popup('news/local/123', 'Click Me!', array());` -NOTE: **Note:** The `window_name` is not really an attribute, but an argument to the JavaScript [window.open()](http://www.w3schools.com/jsref/met_win_open.asp) method, which accepts either a window name or a window target. +NOTE: **Note:** The `window_name` is not really an attribute, but an argument to the JavaScript [window.open()](https://www.w3schools.com/jsref/met_win_open.asp) method, which accepts either a window name or a window target. NOTE: **Note:** Any other attribute than the listed above will be parsed as an HTML attribute to the anchor tag. diff --git a/docs/development/legacy/helpers/xml-helper.md b/docs/development/legacy/helpers/xml-helper.md index 90a6323e7..20cf2ef5f 100755 --- a/docs/development/legacy/helpers/xml-helper.md +++ b/docs/development/legacy/helpers/xml-helper.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/libraries/benchmark.md b/docs/development/legacy/libraries/benchmark.md index d09bce001..b154076d1 100755 --- a/docs/development/legacy/libraries/benchmark.md +++ b/docs/development/legacy/libraries/benchmark.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -117,4 +117,4 @@ If the first parameter is empty this function instead returns the `{elapsed_time Simply returns the `{memory_usage}` marker. -This permits it to be put it anywhere in a template without the memory being calculated until the end. The [Output Class](/development/legacy/libraries/output.md) will swap the real value for this variable. +This permits it to be put it anywhere in a template without the memory being calculated until the end. The [Output Class](development/legacy/libraries/output.md) will swap the real value for this variable. diff --git a/docs/development/legacy/libraries/cache.md b/docs/development/legacy/libraries/cache.md index e0dcdb2c5..21b76b067 100755 --- a/docs/development/legacy/libraries/cache.md +++ b/docs/development/legacy/libraries/cache.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/libraries/config.md b/docs/development/legacy/libraries/config.md index 3a1084450..ec91a9792 100755 --- a/docs/development/legacy/libraries/config.md +++ b/docs/development/legacy/libraries/config.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -25,7 +25,7 @@ NOTE: **Note:** This class is initialized automatically by the system so there i ### Anatomy of a Config File -ExpressionEngine has one primary config file, located at `sysem/user/config/config.php` and add-ons can also contain additional config files located inside their directory. Make sure that you only use the primary configuration file when the config is on a per-install basis. +ExpressionEngine has one primary config file, located at `system/user/config/config.php` and add-ons can also contain additional config files located inside their directory. Make sure that you only use the primary configuration file when the config is on a per-install basis. NOTE: **Note:** If you do create your own config files use the same format as the primary one, storing your items in an array called \$config. ExpressionEngine will intelligently manage these files so there will be no conflict even though the array has the same name (assuming an array index is not named the same as another). @@ -134,7 +134,7 @@ This method is identical to `item()`, except it appends a forward slash to the e | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------------------- | | \$file | `String` | Configuration file name | -| \$use_sections | `Bool` | Whether config values shoud be loaded into their own section (index of the main config array) | +| \$use_sections | `Bool` | Whether config values should be loaded into their own section (index of the main config array) | | \$fail_gracefully | `Bool` | Whether to return FALSE or to display an error message | | Returns | `Bool` | TRUE on success, FALSE on failure | @@ -148,7 +148,7 @@ Loads a configuration file. This method retrieves the URL to your site, along with the "index" value you've specified in the config file. -This method is normally accessed via the corresponding functions in the [URL Helper](/development/legacy/helpers/url-helper.md). +This method is normally accessed via the corresponding functions in the [URL Helper](development/legacy/helpers/url-helper.md). ### `update_site_prefs([$new_values = array()[, $site_ids = array()[, $find = ''[, $replace = '']]]])` diff --git a/docs/development/legacy/libraries/cp.md b/docs/development/legacy/libraries/cp.md index 119ec3a8c..4a594f7ee 100755 --- a/docs/development/legacy/libraries/cp.md +++ b/docs/development/legacy/libraries/cp.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -80,13 +80,13 @@ This method allows you to include scripts found in the main JavaScript directory NOTE: **Note:** This method will only load files from the `themes/javascript` directory. To load a third-party add-on package's JavaScript files, use `Cp::load_package_js`. -Several custom jQuery plugins are included with ExpressionEngine and available for third-party developers to use. Plugins available include [ee_interact.event](development/control-panel-js/events.md#form-interaction-event), [tablesorter](http://tablesorter.com/docs/), [ee_table](development/control-panel-js/table.md), and [wysihat](development/control-panel-js/wysihat-api.md). +Several custom jQuery plugins are included with ExpressionEngine and available for third-party developers to use. Plugins available include [ee_interact.event](development/control-panel-js/events.md#form-interaction-event), [tablesorter](https://mottie.github.io/tablesorter/docs/), [ee_table](development/control-panel-js/table.md), and [wysihat](development/control-panel-js/wysihat-api.md). An example call to load one of the jQuery plugins: ee()->cp->add_js_script('plugin', 'tablesorter'); -The [jQuery UI](http://jqueryui.com) interactions and widgets are also included with ExpressionEngine for third-party developers to use. The call to load the jQuery UI Autocomplete plugin would look like this, for example: +The [jQuery UI](https://jqueryui.com) interactions and widgets are also included with ExpressionEngine for third-party developers to use. The call to load the jQuery UI Autocomplete plugin would look like this, for example: ee()->cp->add_js_script('ui', 'autocomplete'); @@ -148,7 +148,7 @@ Creates the a the following link: `https://example.com?URL=https://example.com` | \$which | `String` | permission string to check for | | Returns | `String` | `TRUE` if they have access, `FALSE` if they don't or if the permission doesn't exist | -When a user or logged in member visits an EE site, the Session class ascribes user data to them that, among other things, pertains to their member groups's access to various parts of the site. Returns `FALSE` if they have access, `TRUE` if they do: +When a user or logged in member visits an EE site, the Session class ascribes user data to them that, among other things, pertains to their member role's access to various parts of the site. Returns `FALSE` if they have access, `TRUE` if they do: if ( ! ee()->cp->allowed_group('can_delete_all_entries')) { @@ -187,4 +187,4 @@ Modules have certain actions for forms, links, etc. that are recognized via an a ## Publish Page Layout Methods -Administrators may extensively customize publish pages on a per member group and per channel basis. Since these custom layouts are saved as a serialized array in the database, any additions or deletions to publish page tabs and fields must be synced to any saved layouts. The control panel library provides 4 methods to facilitate custom layout updates. (See also [Tab File Function Reference](development/modules.md#tab-file-function-reference) +Administrators may extensively customize publish pages on a per member role and per channel basis. Since these custom layouts are saved as a serialized array in the database, any additions or deletions to publish page tabs and fields must be synced to any saved layouts. The control panel library provides 4 methods to facilitate custom layout updates. (See also [Tab File Reference](development/tab-files.md) diff --git a/docs/development/legacy/libraries/creating-libraries.md b/docs/development/legacy/libraries/creating-libraries.md index c58512718..27b9d9a9b 100755 --- a/docs/development/legacy/libraries/creating-libraries.md +++ b/docs/development/legacy/libraries/creating-libraries.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/libraries/database.md b/docs/development/legacy/libraries/database.md index d0f096b22..4b287b599 100755 --- a/docs/development/legacy/libraries/database.md +++ b/docs/development/legacy/libraries/database.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -35,7 +35,7 @@ This class is initialized automatically: ### Active Record -While we still make `ee()->db->query()` available, it's highly recommended that you use [CodeIgniter's Active Record](https://ellislab.com/codeigniter/user-guide/database/active_record.html) because queries will be easier to read and edit: +While we still make `ee()->db->query()` available, it's highly recommended that you use [CodeIgniter's Active Record](https://www.codeigniter.com/userguide2/database/active_record.html) because queries will be easier to read and edit: $query = ee()->db->select('username, screen_name, email, url, signature') ->from('members m') diff --git a/docs/development/legacy/libraries/email.md b/docs/development/legacy/libraries/email.md index acd56b9b9..4916ce120 100755 --- a/docs/development/legacy/libraries/email.md +++ b/docs/development/legacy/libraries/email.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -30,8 +30,9 @@ The Email class will automatically create all email headers and will process the ee()->load->library('email'); ee()->load->helper('text'); - ee()->email->wordwrap = true; - ee()->email->mailtype = 'text'; + ee()->email->set_wordwrap(TRUE); + ee()->email->set_mailtype('html'); + ee()->email->from($from); ee()->email->to($recipient); ee()->email->subject($email_subject); @@ -154,7 +155,7 @@ Sets the email message body: ee()->email->message('This is my message'); -#### `send_alt_message($str = '')` +#### `set_alt_message($str = '')` | Parameter | Type | Description | | --------- | -------- | --------------------------------------------------------------------------------------- | @@ -167,6 +168,20 @@ This is an optional message string which can be used if you send HTML formatted NOTE: **Note:** If you are using data from a channel entry and not sending an HTML email, then you should use the `entities_to_ascii()` method (text helper) to convert any HTML entities back into ASCII characters before sending the message to the class. +#### `attach($filename, $disposition = '', $newname = NULL, $mime = '')` + +| Parameter | Type | Description | +| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| \$filename | `String` | The full local path to the file to attach | +| \$disposition | `String` | Optionally set the HTTP header [Content-Disposition](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) for the attachment (default: `attachment`) | +| \$newname | `String` | Optionally set a different name for the attachment (default same as $filename) | +| \$mime | `String` | Optionally set the HTTP header [Content-Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) for the attachment | +| Returns | `Object` | Email class objects | + +Adds an attachment to a message: + + ee()->email->attach($filename); + #### `send($auto_clear = TRUE)` | Parameter | Type | Description | @@ -198,7 +213,7 @@ Returns a string containing any server messages, the email headers, and the emai | \$clear_attachments | `Boolean` | If set to `TRUE` attachments will be cleared out, otherwise they're left alone. | | Returns | `Object` | Email class object | -Clears out all parameters set either by property or method: +Clears out all the message-specific parameters set either by property or method (text, recipient, subject, etc.), but not including the overall parameters like the charset, wordwrap, mailtype, and the sending method (smtp, etc.): ee()->email->clear(); @@ -209,8 +224,8 @@ If you are sending multiple emails in a method either for notifications or becau ee()->load->library('email'); ee()->load->helper('text'); - ee()->email->wordwrap = true; - ee()->email->mailtype = 'text'; + ee()->email->set_wordwrap(TRUE); + ee()->email->set_mailtype('html'); $errors = array(); foreach($member_emails as $username => $from) diff --git a/docs/development/legacy/libraries/file-field.md b/docs/development/legacy/libraries/file-field.md new file mode 100644 index 000000000..6d31640ff --- /dev/null +++ b/docs/development/legacy/libraries/file-field.md @@ -0,0 +1,70 @@ +--- +lang: php +--- + + + +# File Field Library + +ExpressionEngine's File Field Library provides some helper functions to display and parse File fields. + +## Loading + +In order to be used, the library needs to be loaded first. You can do it with this code + + ee()->load->library('file_field'); + +## Class Reference + +**class `File_field`** + +[TOC=3] + + +### `dragAndDropField($field_name, $data = '', $allowed_file_dirs = 'all', $content_type = 'all')` + +Creates a drag-and-drop, control-panel only file field + +| Parameter | Type | Description | +| ------------------------| --------- | --------------------------------------------------------------------------------------------------------| +| \$field_name | `String` | The name of the field | +| \$data | `String` | The data stored in the file field e.g. `{file:XX:url}` or `{filedir_x}filename.ext` | +| \$allowed_file_dirs | `String` | Whether to show one upload destination or all upload destinations. Either 'all' or ONE directory ID | +| \$content_type | `String` | The content type allowed. Either 'all' or 'image' | +| Returns | `String` | Fully rendered file field | + + $file_field = ee()->file_field->dragAndDropField('file_field', $file_field, 'all', 'image'); + +### `field($field_name, $data = '', $allowed_file_dirs = 'all', $content_type = 'all', $filebrowser = true, $existing_limit = null)` + +Creates a front-end-friendly file field + +| Parameter | Type | Description | +| ------------------- | ----------- | ----------------------------------------------------------------------------------- | +| \$field_name | `String` | The name of the field | +| \$data | `String` | The data stored in the file field, e.g. `{file:XX:url}` or `{filedir_x}filename.ext` | +| \$allowed_file_dirs | `String` | The allowed file directory. Either 'all' or ONE directory ID | +| \$content_type | `String` | The content type allowed. Either 'all' or 'image' | +| \$filebrowser | `Bool` | Indicates whether the list of existing files should be shown | +| \$existing_limit | `Int` | The number of existing files to show | +| Returns | `String` | Rended file field that can be displayed in front-end templates | + +### `getFileModelForFieldData($data)` + +Returns `File` model for the file field value. +Can accept string like `{file:XX:url}`, `{filedir_1}somefile.jpg` as well as numeric file ID. + +### `parse_field($data)` + +Parse field contents, which may be in `{file:XX:url}` or `{filedir_x}filename.ext` format. + +This function is being called internally when using [Typography](development/legacy/libraries/typography.md) library, but you might need to explicitly call it in your add-on if the output data are not being passed to EE Typography parser. + + $content = ee()->file_field->parse_field($content); diff --git a/docs/development/legacy/libraries/file-uploading.md b/docs/development/legacy/libraries/file-uploading.md index cd25a6df0..cb9620923 100755 --- a/docs/development/legacy/libraries/file-uploading.md +++ b/docs/development/legacy/libraries/file-uploading.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -69,6 +69,7 @@ Then, you'll need to create a method to handle the form: public function do_upload() { $config['upload_path'] = './uploads/'; + //$config['upload_destination'] = 5; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = 100; $config['max_width'] = 1024; @@ -90,9 +91,7 @@ Then, you'll need to create a method to handle the form: } } -> } - -Inside that method, you can see that we're initializing the Upload library and checking to see if the upload was sucessful. If not, we kick back to the `upload_form.php` view. +Inside that method, you can see that we're initializing the Upload library and checking to see if the upload was successful. If not, we kick back to the `upload_form.php` view. ### The Upload Directory @@ -111,6 +110,7 @@ Like most other classes in ExpressionEngine, the Upload class is initialized in Similar to other libraries, you'll control what is allowed to be upload based on your preferences. In the controller you built above you set the following preferences: $config['upload_path'] = './uploads/'; + //$config['upload_destination'] = 5; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; @@ -127,24 +127,24 @@ The above preferences should be fairly self-explanatory. Below is a table descri The following preferences are available. The default value indicates what will be used if you do not specify that preference. -| Preference | Default Value | Options | Description | -| ---------------------- | ------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| upload_path | None | None | The path to the directory where the upload should be placed. The directory must be writable and the path can be absolute or relative. | -| allowed_types | None | None | The mime types corresponding to the types of files you allow to be uploaded. Usually the file extension can be used as the mime type. Can be either an array or a pipe-separated string. | -| file_name | None | Desired file name | If set ExpressionEngine will rename the uploaded file to this name. The extension provided in the file name must also be an allowed file type. If no extension is provided in the original file_name will be used. | -| file_ext_tolower | FALSE | TRUE/FALSE (boolean) | If set to TRUE, the file extension will be forced to lower case | -| overwrite | FALSE | TRUE/FALSE (boolean) | If set to true, if a file with the same name as the one you are uploading exists, it will be overwritten. If set to false, a number will be appended to the filename if another with the same name exists. | -| max_size | 0 | None | The maximum size (in kilobytes) that the file can be. Set to zero for no limit. Note: Most PHP installations have their own limit, as specified in the php.ini file. Usually 2 MB (or 2048 KB) by default. | -| max_width | 0 | None | The maximum width (in pixels) that the image can be. Set to zero for no limit. | -| max_height | 0 | None | The maximum height (in pixels) that the image can be. Set to zero for no limit. | -| min_width | 0 | None | The minimum width (in pixels) that the image can be. Set to zero for no limit. | -| min_height | 0 | None | The minimum height (in pixels) that the image can be. Set to zero for no limit. | -| max_filename | 0 | None | The maximum length that a file name can be. Set to zero for no limit. | -| max_filename_increment | 100 | None | When overwrite is set to FALSE, use this to set the maximum filename increment for ExpressionEngine to append to the filename. | -| encrypt_name | FALSE | TRUE/FALSE (boolean) | If set to TRUE the file name will be converted to a random encrypted string. This can be useful if you would like the file saved with a name that can not be discerned by the person uploading it. | -| remove_spaces | TRUE | TRUE/FALSE (boolean) | If set to TRUE, any spaces in the file name will be converted to underscores. This is recommended. | -| detect_mime | TRUE | TRUE/FALSE (boolean) | If set to TRUE, a server side detection of the file type will be performed to avoid code injection attacks. DO NOT disable this option unless you have no other option as that would cause a security risk. | -| mod_mime_fix | TRUE | TRUE/FALSE (boolean) | If set to TRUE, multiple filename extensions will be suffixed with an underscore in order to avoid triggering Apache mod_mime. DO NOT turn off this option if your upload directory is public, as this is a security risk. | +| Preference | Default Value | Options | Description | +| ---------------------- | ------------- | -------------------- | -------------------------------------------------------------------------------------------- | +| upload_destination | NULL | None | ID of upload directory where the file should be saved. Mandatory, unless `upload_path` is specified | +| upload_path | None | None | The path to the directory where the upload should be placed. The directory must be writable and the path can be absolute or relative. | +| allowed_types | None | None | The mime types corresponding to the types of files you allow to be uploaded. Usually the file extension can be used as the mime type. Can be either an array or a pipe-separated string. | +| file_name | None | Desired file name | If set ExpressionEngine will rename the uploaded file to this name. The extension provided in the file name must also be an allowed file type. If no extension is provided in the original file_name will be used. | +| file_ext_tolower | FALSE | TRUE/FALSE (boolean) | If set to TRUE, the file extension will be forced to lower case | +| overwrite | FALSE | TRUE/FALSE (boolean) | If set to true, if a file with the same name as the one you are uploading exists, it will be overwritten. If set to false, a number will be appended to the filename if another with the same name exists. | +| max_size | 0 | None | The maximum size (in kilobytes) that the file can be. Set to zero for no limit. Note: Most PHP installations have their own limit, as specified in the php.ini file. Usually 2 MB (or 2048 KB) by default. | +| max_width | 0 | None | The maximum width (in pixels) that the image can be. Set to zero for no limit. | +| max_height | 0 | None | The maximum height (in pixels) that the image can be. Set to zero for no limit. | +| min_width | 0 | None | The minimum width (in pixels) that the image can be. Set to zero for no limit. | +| min_height | 0 | None | The minimum height (in pixels) that the image can be. Set to zero for no limit. | +| max_filename | 0 | None | The maximum length that a file name can be. Set to zero for no limit. | +| max_filename_increment | 100 | None | When overwrite is set to FALSE, use this to set the maximum filename increment for ExpressionEngine to append to the filename. | +| encrypt_name | FALSE | TRUE/FALSE (boolean) | If set to TRUE the file name will be converted to a random encrypted string. This can be useful if you would like the file saved with a name that can not be discerned by the person uploading it. | +| remove_spaces | TRUE | TRUE/FALSE (boolean) | If set to TRUE, any spaces in the file name will be converted to underscores. This is recommended. | +| auto_resize | FALSE | TRUE/FALSE (boolean) | If set to TRUE, the uploaded image will be automatically resized to the max_width / min_height dimensions. | ## Class Reference diff --git a/docs/development/legacy/libraries/form-validation.md b/docs/development/legacy/libraries/form-validation.md index 39a6fc163..a26e078d4 100755 --- a/docs/development/legacy/libraries/form-validation.md +++ b/docs/development/legacy/libraries/form-validation.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -21,7 +21,7 @@ lang: php The Form Validation class provides comprehensive validation framework to minimize the amount of code you need to write. It provides a toolset for validating user input, showing validation errors, and repopulating form fields. -The base functionality for the Form Validation class is inherited from the corresponding CodeIgniter library---refer to the [Form Validation](https://ellislab.com/codeigniter/user-guide/libraries/form_validation.html) documentation in the CodeIgniter user guide for details. +The base functionality for the Form Validation class is inherited from the corresponding CodeIgniter library---refer to the [Form Validation](https://www.codeigniter.com/userguide2/libraries/form_validation.html) documentation in the CodeIgniter user guide for details. ## Setting Reference Values diff --git a/docs/development/legacy/libraries/functions.md b/docs/development/legacy/libraries/functions.md index 221292f77..bcc9b7821 100755 --- a/docs/development/legacy/libraries/functions.md +++ b/docs/development/legacy/libraries/functions.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -126,6 +126,8 @@ Any form will accept the `form_class` and `form_id` parameters. Access the value $r = ee()->functions->form_declaration($form_details); +{{embed:_tips/form-attributes.md}} + ### `form_backtrack([$offset = ''])` | Parameter | Type | Description | @@ -169,7 +171,7 @@ Evaluates a string as PHP: | Parameter | Type | Description | | --------- | ---------- | ---------------------- | | \$str | `String` | String to limit | -| \$num | `Interger` | Characters to limit to | +| \$num | `Integer` | Characters to limit to | | Returns | `String` | Limited string | Returns section of a string limited to a certain amount of characters but rounds the string up to the nearest word. @@ -179,7 +181,7 @@ Returns section of a string limited to a certain amount of characters but rounds | Parameter | Type | Description | | --------- | ---------- | ----------------- | | \$str | `String` | String to limit | -| \$num | `Interger` | Words to limit to | +| \$num | `Integer` | Words to limit to | | Returns | `String` | Limited string | Returns section of a string based on number of words. diff --git a/docs/development/legacy/libraries/image-lib.md b/docs/development/legacy/libraries/image-lib.md index d61db833b..314e2618b 100755 --- a/docs/development/legacy/libraries/image-lib.md +++ b/docs/development/legacy/libraries/image-lib.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -326,4 +326,4 @@ The clear method resets all of the values used when processing an image. You wil Returns all detected errors formatted as a string. - echo ee()->image_lib->diplay_errors(); + echo ee()->image_lib->display_errors(); diff --git a/docs/development/legacy/libraries/index.md b/docs/development/legacy/libraries/index.md index 4ddbde11d..65585aafd 100755 --- a/docs/development/legacy/libraries/index.md +++ b/docs/development/legacy/libraries/index.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> diff --git a/docs/development/legacy/libraries/input.md b/docs/development/legacy/libraries/input.md index 23af5cb2a..ae36c502b 100755 --- a/docs/development/legacy/libraries/input.md +++ b/docs/development/legacy/libraries/input.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -30,9 +30,9 @@ This class is initialized automatically. You are not required to use this class to call the incoming data from the superglobal arrays, it will still be available through the superglobals themselves. However, the input class does offer some benefits. -The superglobal methods all allow the specification of an optional second parameter that lets you run the data through the [XSS filter](security). It's enabled by setting the second parameter to boolean TRUE. +All of the superglobal methods allow the specification of an optional second parameter that lets you run the data through the [XSS filter](security). It's enabled by setting the second parameter to `TRUE` (boolean). -Lastly, the superglobal methods will check to see if the item is set and return `FALSE` (boolean) if not. This lets you conveniently use data without having to test whether an item exists first. In other words, normally you might do something like this: +Lastly, the superglobal methods will check to see if the item is set and return `FALSE` (boolean) if not. This lets you conveniently use data without testing whether an item exists first. In other words, normally you might do something like this: if ( ! isset($_POST['something'])) { @@ -175,7 +175,7 @@ The input library contains two methods for manipulating cookies. One for setting | \$expire | `Integer` | When the cookie should expire, if left blank the time is set to the past and the cookie will expire immediately | | Returns | `Void` | | -Sets cookie based on name and value. The advantage to using this function over the standard PHP function is EE will automatically add the cookie domain, cookie prefix, and cookie path as specified in the preferences. Those are helpful for making these cookies unique to EE and not interfering with other cookies set for your site by other software. +Sets cookie based on name and value. The advantage of using this function over the standard PHP function is EE will automatically add the cookie domain, cookie prefix, and cookie path as specified in the preferences. Those are helpful for making these cookies unique to EE and not interfering with other cookies set for your site by other software. ### `delete_cookie($name)` @@ -184,4 +184,4 @@ Sets cookie based on name and value. The advantage to using this function over t | \$name | `String` | Name of the cookie | | Returns | `Void` | | -Cleanly delete a cookie. The advantage to using this function over the standard PHP function is EE will automatically add the cookie domain, cookie prefix, and cookie path as specified in the preferences. +Cleanly delete a cookie. The advantage of using this function over the standard PHP function is EE will automatically add the cookie domain, cookie prefix, and cookie path as specified in the preferences. diff --git a/docs/development/legacy/libraries/javascript.md b/docs/development/legacy/libraries/javascript.md index 09f4f115f..e942f4136 100755 --- a/docs/development/legacy/libraries/javascript.md +++ b/docs/development/legacy/libraries/javascript.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -29,7 +29,11 @@ The library is loaded using the following code: | \$val | `String` | The value of the variable being added | | Returns | `Void` | | -Add a variable to the EE javascript object. Useful if you need to dynamically set variables for your external script. Will intelligently resolve namespaces (i.e. `filemanager.filelist`) so please use them. +Add a variable to the [EE javascript object](development/control-panel-js/globals.md). Useful if you need to dynamically set variables for your external script. Will intelligently resolve namespaces (i.e. `filemanager.filelist`) so please use them. + + ee()->javascript->set_global([ + 'publish.foreignChars' => ee()->config->loadFile('foreign_chars') + ]); ### `compile([$view_var = 'script_foot'[, $script_tags = TRUE]])` diff --git a/docs/development/legacy/libraries/language.md b/docs/development/legacy/libraries/language.md index f80fcd06e..832188ec5 100755 --- a/docs/development/legacy/libraries/language.md +++ b/docs/development/legacy/libraries/language.md @@ -7,7 +7,7 @@ lang: php ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide) @link https://expressionengine.com/ - @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com) + @copyright Copyright (c) 2003-2020, Packet Tide, LLC (https://packettide.com) @license https://expressionengine.com/license Licensed under Apache License, Version 2.0 --> @@ -82,7 +82,7 @@ Every so often, you might require or desire the language values from another lan | \$id | `String` | ID of the form element; if supplied will wrap the rendered text in a `