├── scss-lint.yml
├── content
└── index.php
├── install
├── config
│ ├── database.php
│ ├── error.php
│ ├── app.php
│ ├── session.php
│ └── aliases.php
├── .htaccess
├── views
│ ├── assets
│ │ ├── img
│ │ │ ├── logo.png
│ │ │ ├── chosen-sprite.png
│ │ │ └── chosen-sprite@2x.png
│ │ └── js
│ │ │ └── main.js
│ ├── installed.php
│ ├── partials
│ │ ├── footer.php
│ │ └── header.php
│ ├── halt.php
│ ├── complete.php
│ ├── error
│ │ ├── 404.php
│ │ └── 500.php
│ ├── account.php
│ └── start.php
├── readme.md
├── storage
│ ├── application.distro.php
│ ├── session.distro.php
│ ├── database.distro.php
│ └── htaccess.distro
├── libraries
│ ├── layout.php
│ └── braces.php
└── index.php
├── anchor
├── .htaccess
├── views
│ ├── assets
│ │ ├── img
│ │ │ ├── cloud.png
│ │ │ ├── cross.gif
│ │ │ ├── icons.png
│ │ │ ├── logo.png
│ │ │ ├── piggy.gif
│ │ │ ├── tick.gif
│ │ │ ├── tick.png
│ │ │ ├── favicon.png
│ │ │ └── statuses.png
│ │ ├── scss
│ │ │ ├── components
│ │ │ │ ├── _footer.scss
│ │ │ │ ├── _paging.scss
│ │ │ │ ├── editor
│ │ │ │ │ ├── _half.scss
│ │ │ │ │ ├── _redirect.scss
│ │ │ │ │ ├── _preview.scss
│ │ │ │ │ └── _files.scss
│ │ │ │ ├── _fileUpload.scss
│ │ │ │ ├── _buttons.scss
│ │ │ │ ├── _notifications.scss
│ │ │ │ ├── _editor.scss
│ │ │ │ ├── _lists.scss
│ │ │ │ └── _header.scss
│ │ │ ├── _components.scss
│ │ │ ├── _focusMode.scss
│ │ │ ├── admin.scss
│ │ │ ├── _layout.scss
│ │ │ ├── _typography.scss
│ │ │ ├── mixins
│ │ │ │ ├── _brightness.scss
│ │ │ │ ├── _contrast.scss
│ │ │ │ └── _breakpoints.scss
│ │ │ ├── _login.scss
│ │ │ ├── _variables.scss
│ │ │ └── _colors.scss
│ │ └── js
│ │ │ ├── page-name.js
│ │ │ ├── text-resize.js
│ │ │ ├── custom-fields.js
│ │ │ ├── redirect.js
│ │ │ ├── focus-mode.js
│ │ │ ├── change-saver.js
│ │ │ ├── sortable.js
│ │ │ └── autosave.js
│ ├── pages
│ │ └── fields.php
│ ├── extend
│ │ ├── plugins
│ │ │ └── index.php
│ │ ├── pagetypes
│ │ │ ├── index.php
│ │ │ ├── add.php
│ │ │ └── edit.php
│ │ ├── variables
│ │ │ ├── index.php
│ │ │ ├── add.php
│ │ │ └── edit.php
│ │ ├── fields
│ │ │ └── index.php
│ │ └── index.php
│ ├── partials
│ │ ├── editor.php
│ │ └── footer.php
│ ├── profile.php
│ ├── panel.php
│ ├── users
│ │ ├── reset.php
│ │ ├── amnesia.php
│ │ ├── index.php
│ │ └── login.php
│ ├── categories
│ │ ├── index.php
│ │ ├── add.php
│ │ └── edit.php
│ ├── menu
│ │ └── index.php
│ ├── error
│ │ ├── 404.php
│ │ └── 500.php
│ ├── comments
│ │ ├── index.php
│ │ └── edit.php
│ └── intro.php
├── language
│ └── en_GB
│ │ ├── menu.php
│ │ ├── panel.php
│ │ ├── categories.php
│ │ ├── comments.php
│ │ ├── pages.php
│ │ ├── posts.php
│ │ ├── metadata.php
│ │ └── users.php
├── config
│ ├── migrations.php
│ ├── aliases.php
│ └── error.php
├── migrations
│ ├── 80_drop_sessions_ip.php
│ ├── 81_drop_sessions_ua.php
│ ├── 120_add_page_parent.php
│ ├── 60_drop_posts_custom_fields.php
│ ├── 130_pages_show_in_menu.php
│ ├── 140_add_page_menu_order.php
│ ├── 62_add_posts_category.php
│ ├── 110_alter_session_date.php
│ ├── 90_alter_users_password.php
│ ├── 21_alter_comments_date.php
│ ├── 210_fix_page_menu_order.php
│ ├── 20_alter_comments_status.php
│ ├── 61_alter_posts_created.php
│ ├── 10_add_comment_notifications.php
│ ├── 11_add_comment_moderation_keys.php
│ ├── 70_create_categories_table.php
│ ├── 71_insert_default_categories.php
│ ├── 40_create_page_meta_table.php
│ ├── 50_create_post_meta_table.php
│ ├── 160_resize_post_html.php
│ ├── 180_insert_meta_key.php
│ ├── 220_alter_meta_field.php
│ ├── 30_create_extend_table.php
│ ├── 170_add_category_cust_field.php
│ ├── 212_insert_default_dashboard_meta_key.php
│ ├── 169_add_category_meta.php
│ ├── 200_create_user_meta_table.php
│ ├── 201_enable_pagetypes.php
│ ├── 211_alter_post_page_content.php
│ └── 213_add_updated_fields_to_tables.php
├── routes
│ ├── panel.php
│ ├── plugins.php
│ └── menu.php
├── composer_check.php
├── libraries
│ ├── response.php
│ ├── hash.php
│ ├── csrf.php
│ ├── date.php
│ ├── events.php
│ ├── items.php
│ ├── json.php
│ ├── registry.php
│ └── language.php
├── functions
│ ├── metadata.php
│ ├── config.php
│ └── users.php
├── models
│ ├── base.php
│ ├── user.php
│ └── category.php
└── run.php
├── .github
├── anchor-bg.jpeg
├── PULL_REQUEST_TEMPLATE.md
└── ISSUE_TEMPLATE.md
├── test
├── unit
│ ├── system.cli.spec.php
│ ├── system.route.spec.php
│ ├── system.database.spec.php
│ ├── system.router.spec.php
│ ├── README.md
│ ├── system.database.query.spec.php
│ ├── system.database.record.spec.php
│ ├── system.database.builder.spec.php
│ ├── system.database.connector.spec.php
│ ├── system.database.connectors.mysql.spec.php
│ ├── system.database.connectors.sqlite.spec.php
│ ├── system.request.spec.php
│ ├── system.config.spec.php
│ ├── system.request.server.spec.php
│ └── system.error.spec.php
├── integration
│ └── README.md
├── teardown.js
├── travis-ci
│ ├── release.sh
│ ├── setup-apache.sh
│ ├── apache_vhost
│ └── setup-php-fpm.sh
├── peridot.php
├── setup.js
├── environment.js
└── index.js
├── themes
└── default
│ ├── img
│ ├── favicon.png
│ ├── og_image.gif
│ ├── search.png
│ └── categories.png
│ ├── about.txt
│ ├── page.php
│ ├── 404.php
│ ├── css
│ └── small.css
│ ├── footer.php
│ ├── search.php
│ ├── posts.php
│ ├── functions.php
│ ├── js
│ └── main.js
│ └── article.php
├── .editorconfig
├── docker-compose.yml
├── jest.config.js
├── .gitignore
├── index.php
├── system
├── start.php
├── request.php
├── database
│ └── connectors
│ │ ├── sqlite.php
│ │ └── mysql.php
├── boot.php
├── autoloader.php
└── request
│ └── server.php
├── composer.json
├── Dockerfile
└── package.json
/scss-lint.yml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/content/index.php:
--------------------------------------------------------------------------------
1 |
2 | Deny from all
3 |
4 |
--------------------------------------------------------------------------------
/install/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | SetEnv HTTP_MOD_REWRITE On
3 |
--------------------------------------------------------------------------------
/.github/anchor-bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anchorcms/anchor-cms/HEAD/.github/anchor-bg.jpeg
--------------------------------------------------------------------------------
/test/unit/system.cli.spec.php:
--------------------------------------------------------------------------------
1 | 'Menu',
6 | 'edit_menu' => 'Edit menu'
7 |
8 | ];
9 |
--------------------------------------------------------------------------------
/install/config/error.php:
--------------------------------------------------------------------------------
1 | true,
5 | 'logger' => function ($exception) {
6 | }
7 | ];
8 |
--------------------------------------------------------------------------------
/install/views/assets/img/chosen-sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anchorcms/anchor-cms/HEAD/install/views/assets/img/chosen-sprite.png
--------------------------------------------------------------------------------
/test/unit/system.database.builder.spec.php:
--------------------------------------------------------------------------------
1 | MIGRATION_NUMBER
9 | ];
10 |
--------------------------------------------------------------------------------
/themes/default/about.txt:
--------------------------------------------------------------------------------
1 | Theme name: Default
2 | Description: This is the default, shiny theme for Anchor CMS.
3 | Author name: Visual Idiot
4 | Author site: http://visualidiot.com
5 | License: http://licence.visualidiot.com
--------------------------------------------------------------------------------
/themes/default/page.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/anchor/views/pages/fields.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/install/views/installed.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Anchor is already installed
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/install/storage/application.distro.php:
--------------------------------------------------------------------------------
1 | '{{url}}',
5 | 'index' => '{{index}}',
6 | 'timezone' => '{{timezone}}',
7 | 'key' => '{{key}}',
8 | 'language' => '{{language}}',
9 | 'encoding' => 'UTF-8'
10 | ];
11 |
--------------------------------------------------------------------------------
/anchor/views/extend/plugins/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/install/config/app.php:
--------------------------------------------------------------------------------
1 | dirname($_SERVER['SCRIPT_NAME']),
5 | 'index' => 'index.php?route=',
6 | 'timezone' => 'UTC',
7 | 'key' => hash('md5', 'Anchor Installer ' . VERSION),
8 | 'language' => 'en_GB',
9 | 'encoding' => 'UTF-8'
10 | ];
11 |
--------------------------------------------------------------------------------
/anchor/views/partials/editor.php:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/anchor/views/assets/scss/components/_footer.scss:
--------------------------------------------------------------------------------
1 | @import "../variables";
2 |
3 | .bottom {
4 | padding: 40px 0 30px;
5 |
6 | small {
7 | float: left;
8 | font-size: $font-size-small;
9 | }
10 |
11 | em {
12 | float: right;
13 | font-size: $font-size-small;
14 | font-style: normal;
15 | color: $color-gray-chateau;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | charset = utf-8
3 | end_of_line = lf
4 | insert_final_newline = true
5 | trim_trailing_whitespace = true
6 |
7 | [*.php]
8 | indent_style = space
9 | indent_size = 4
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [Makefile]
15 | indent_style = tab
16 |
17 | [{Dockerfile,*.json,*.sh,*.yml,*.yaml}]
18 | indent_style = space
19 | indent_size = 2
20 |
--------------------------------------------------------------------------------
/anchor/views/profile.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/anchor/views/assets/scss/components/_paging.scss:
--------------------------------------------------------------------------------
1 | @import "../variables";
2 |
3 | .paging {
4 | clear: both;
5 | text-align: center;
6 | padding-top: 25px;
7 |
8 | a,
9 | strong {
10 | display: inline-block;
11 | padding: 0.2em 1em;
12 | background: $color-white;
13 | border-radius: 5px;
14 | color: $color-slate-gray;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Summary
2 |
3 | A brief but detailed explanation of the issue or bug you are reporting.
4 |
5 | ### Expected Behaviour
6 |
7 | - A list of steps you expected to happen in order
8 |
9 | ### Actual Behaviour
10 |
11 | - A list of steps you actually encountered
12 |
13 | ### Context details (if applicable)
14 |
15 | - Anchor version:
16 | - Server setup:
17 | - URL
18 |
--------------------------------------------------------------------------------
/install/config/session.php:
--------------------------------------------------------------------------------
1 | 'anchorcms-install',
5 | 'gc_probability' => '0',
6 | 'cookie_lifetime' => 86400,
7 | 'cookie_path' => '/',
8 | 'cookie_domain' => '',
9 | 'cookie_secure' => false,
10 | 'hash_function' => 'sha256',
11 | 'use_cookies' => true,
12 | 'use_only_cookies' => true,
13 | ];
14 |
--------------------------------------------------------------------------------
/install/storage/session.distro.php:
--------------------------------------------------------------------------------
1 | 'anchorcms',
5 | 'gc_probability' => '0',
6 | 'cookie_lifetime' => 86400,
7 | 'cookie_path' => '/',
8 | 'cookie_domain' => '',
9 | 'cookie_secure' => false,
10 | 'hash_function' => 'sha256',
11 | 'use_cookies' => true,
12 | 'use_only_cookies' => true,
13 | ];
14 |
--------------------------------------------------------------------------------
/anchor/views/assets/scss/components/editor/_half.scss:
--------------------------------------------------------------------------------
1 | .half {
2 | float: left;
3 | width: 48.5%;
4 | margin-right: 3%;
5 |
6 | & + .half {
7 | margin-right: 0;
8 | }
9 |
10 | label {
11 | & + input,
12 | & + textarea,
13 | & + select {
14 | width: auto;
15 | min-width: 305px;
16 | }
17 | }
18 |
19 | em,
20 | legend {
21 | display: none;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/test/integration/README.md:
--------------------------------------------------------------------------------
1 | Integration tests (JavaScript)
2 | ==============================
3 |
4 | This directory contains the Integration tests using Puppeteer and Jest. This isn't about testing the
5 | JavaScript side of things, however, but rather the complete user interaction with AnchorCMS.
6 | Using Puppeteer, we can spin up a fully fledged headless version of Google Chrome that will carry out
7 | anything we command it to.
8 |
--------------------------------------------------------------------------------
/anchor/views/assets/js/page-name.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Mirrors the page title into the page name field which is use in the menus
3 | */
4 | $(function(input, output) {
5 | var input = $('input[name=title]'), output = $('input[name=name]');
6 | var changed = false;
7 |
8 | output.bind('keyup', function() {
9 | changed = true;
10 | });
11 |
12 | input.bind('keyup', function() {
13 | if( ! changed) output.val(input.val());
14 | });
15 | });
--------------------------------------------------------------------------------
/anchor/views/assets/scss/_components.scss:
--------------------------------------------------------------------------------
1 | @import "components/buttons";
2 | @import "components/editor";
3 | @import "components/fileUpload";
4 | @import "components/footer";
5 | @import "components/forms";
6 | @import "components/header";
7 | // @import "components/links";
8 | @import "components/lists";
9 | @import "components/notifications";
10 | @import "components/paging";
11 | @import "components/panel";
12 | @import "components/sidebar";
13 |
--------------------------------------------------------------------------------
/anchor/migrations/80_drop_sessions_ip.php:
--------------------------------------------------------------------------------
1 | has_table_column($table, 'ip')) {
11 | $sql = 'ALTER TABLE `' . $table . '` DROP `ip`';
12 | DB::ask($sql);
13 | }
14 | }
15 |
16 | public function down()
17 | {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/anchor/migrations/81_drop_sessions_ua.php:
--------------------------------------------------------------------------------
1 | has_table_column($table, 'ua')) {
11 | $sql = 'ALTER TABLE `' . $table . '` DROP `ua`';
12 | DB::ask($sql);
13 | }
14 | }
15 |
16 | public function down()
17 | {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/anchor/language/en_GB/panel.php:
--------------------------------------------------------------------------------
1 | 'Administration Panel',
6 | 'title' => 'Welcome to your Anchor site',
7 | 'message' => 'Here you will find all of the tools you will need to produce content for your website, manage users, posts and pages. For more information on what you can do with Anchor, please see our documentation at http://anchorcms.com/docs',
8 |
9 | ];
10 |
--------------------------------------------------------------------------------
/anchor/views/assets/scss/components/editor/_redirect.scss:
--------------------------------------------------------------------------------
1 | @import "../../variables";
2 |
3 | .redirect {
4 | height: 0;
5 | background: $color-alabaster;
6 | opacity: 0;
7 | transition: all 0.3s;
8 |
9 | &.show {
10 | top: 0;
11 | height: 37px;
12 | opacity: 0.99;
13 | }
14 |
15 | input {
16 | width: 100%;
17 | padding: 10px 0;
18 | color: $color-gull-gray;
19 | background: none;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/install/views/partials/footer.php:
--------------------------------------------------------------------------------
1 |
2 | You’re installing Anchor version .
3 | Need help?
4 |
5 |
6 |
7 |
8 |
9 |