Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ab4934d
v.3.0.0-beta for MODX3
sergant210 Dec 6, 2021
8e21b29
Some refactoring for 3.0.0-beta
sergant210 Dec 7, 2021
8d063ee
Rename build assets package name to follow rules and add package lock…
Dec 8, 2021
25ae665
Use new way of registering constant and small impromenets in file paths
Dec 8, 2021
b9aa527
Add MODX as dev-dependency for local development
Dec 8, 2021
7c601dc
Update readme file.
sergant210 Dec 9, 2021
4586629
Merge pull request #320 from modx-pro/feature/improvements
Dec 9, 2021
3a358ec
Merge pull request #321 from modx-pro/require-local-modx
Dec 9, 2021
80ea589
Fix makeUrl method properties
ilyautkin Dec 21, 2021
4e4968e
Update transport.plugins.php
Boshnik Jan 25, 2022
75a486d
Fix prepareTVs and processTVs = 1 not working
Qowyn Apr 7, 2022
8d36f9c
Update connector.php
halftrainedharry Apr 7, 2022
ba77f37
Fixed bugs with getting config.
Jul 16, 2022
7d8be64
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
735c4c2
Merge pull request #335 from Qowyn/patch-1
sergant210 Jul 22, 2022
3744a47
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
4a64938
Merge pull request #336 from halftrainedharry/patch-1
sergant210 Jul 22, 2022
a313669
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
b1adfdd
Merge pull request #322 from modx-pro/fix-makeurl
sergant210 Jul 22, 2022
88fc39e
Merge pull request #326 from Boshnik/patch-1
sergant210 Jul 22, 2022
351cb63
Merge branch '3x-new' of https://github.com/modx-pro/pdoTools into 3x…
Jul 22, 2022
8162c76
Fixed fatal error caused by loop (#341).
Jul 22, 2022
e2a1039
Fixed checking TV before adding to the query (#343).
Jul 25, 2022
6965ac9
Changed $_SERVER['DOCUMENT_ROOT'] to dirname in the connector (#332).
Jul 25, 2022
0076487
v.3.0.0-pl
Jul 25, 2022
1bfd641
Fixed bug when clearing cache (#347).
Jul 27, 2022
d1ee5bd
Fixed incorrect next and prev canonical URLs (#318).
Aug 1, 2022
88c30fb
Added aliases "pdoTools" and "pdoFetch" for the service container.
Aug 1, 2022
cc39303
v.3.0.1-pl
Aug 1, 2022
559bfd9
Fixed a bug in the Fenom parser (#331).
Aug 1, 2022
40ef747
Поддержка файловых сниппетов в pdoPage
bezumkin Mar 14, 2023
1fdc34a
Merge pull request #360 from modx-pro/uncached-bindings
sergant210 Apr 11, 2023
4abcb80
Merge remote-tracking branch 'origin/3x-new' into 3x-new
Apr 11, 2023
e8c8ab0
Security fix for the pdoPage snippet.
Apr 11, 2023
613aef7
v.3.0.2-pl.
Apr 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
## pdoTools

Small library for creating fast snippets for MODX Revolution that works through PDO.
Library for MODX Revolution for creating fast snippets and using file elements instead of DB elements. It's used by Tickets and miniShop2.

Required by Tickets and miniShop2.

## Main features
- Builds queries with xPDO.
### Main features
- Building queries with xPDO.
- Retrieve results with PDO.
- Improved pdoTools::getChunk() function, that processing placeholders faster, than original modX::getChunk().
- Includes Fenom template engine.
- New pdoTools::getChunk() function, that processing placeholders faster than original modX::getChunk().
- New pdoTools::runSnippet() function, that is faster and more powerful than original modX::runSnippet().
- Added functionality of file elements.
- Includes some snippets for convenient and fast development.
- pdoResources
- pdoMenu
- pdoCrumbs
- pdoPage
- pdoSitemap
- pdoUsers
- pdoTitle
- pdoField
- pdoArchive
- pdoNeighbor

pdoTools snippets will work so faster, than more fields you will retrieve from database at one query.

\* Required by Tickets and miniShop2.
55 changes: 26 additions & 29 deletions _build/build.config.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,50 @@
<?php

/* define package */
define('PKG_NAME', 'pdoTools');
define('PKG_NAME_LOWER', strtolower(PKG_NAME));

define('PKG_VERSION', '2.13.2');
define('PKG_RELEASE', 'pl');
define('PKG_AUTO_INSTALL', false);
const PKG_NAME = 'pdoTools';
const PKG_NAME_LOWER = 'pdotools';

const PKG_VERSION = '3.0.2';
const PKG_RELEASE = 'pl';
const PKG_AUTO_INSTALL = false;

/* define paths */
if (isset($_SERVER['MODX_BASE_PATH'])) {
define('MODX_BASE_PATH', $_SERVER['MODX_BASE_PATH']);
} elseif (file_exists(dirname(dirname(__DIR__)) . '/core')) {
define('MODX_BASE_PATH', dirname(dirname(__DIR__)) . '/');
} elseif (file_exists(dirname(__DIR__, 2) . '/core')) {
define('MODX_BASE_PATH', dirname(__DIR__, 2) . '/');
} else {
define('MODX_BASE_PATH', dirname(dirname(dirname(__DIR__))) . '/');
define('MODX_BASE_PATH', dirname(__DIR__, 3) . '/');
}

define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/');
define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');
const MODX_CORE_PATH = MODX_BASE_PATH . 'core/';
const MODX_MANAGER_PATH = MODX_BASE_PATH . 'manager/';
const MODX_CONNECTORS_PATH = MODX_BASE_PATH . 'connectors/';
const MODX_ASSETS_PATH = MODX_BASE_PATH . 'assets/';

/* define urls */
define('MODX_BASE_URL', '/');
define('MODX_CORE_URL', MODX_BASE_URL . 'core/');
define('MODX_MANAGER_URL', MODX_BASE_URL . 'manager/');
define('MODX_CONNECTORS_URL', MODX_BASE_URL . 'connectors/');
define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/');
const MODX_BASE_URL = '/';
const MODX_CORE_URL = MODX_BASE_URL . 'core/';
const MODX_MANAGER_URL = MODX_BASE_URL . 'manager/';
const MODX_CONNECTORS_URL = MODX_BASE_URL . 'connectors/';
const MODX_ASSETS_URL = MODX_BASE_URL . 'assets/';

/* define build options */
//define('BUILD_MENU_UPDATE', false);
//define('BUILD_ACTION_UPDATE', false);
define('BUILD_SETTING_UPDATE', false);
const BUILD_SETTING_UPDATE = false;
//define('BUILD_CHUNK_UPDATE', false);

define('BUILD_SNIPPET_UPDATE', true);
define('BUILD_PLUGIN_UPDATE', true);
define('BUILD_EVENT_UPDATE', true);
const BUILD_SNIPPET_UPDATE = true;
const BUILD_PLUGIN_UPDATE = true;
const BUILD_EVENT_UPDATE = true;
//define('BUILD_POLICY_UPDATE', true);
//define('BUILD_POLICY_TEMPLATE_UPDATE', true);
//define('BUILD_PERMISSION_UPDATE', true);

//define('BUILD_CHUNK_STATIC', false);
define('BUILD_SNIPPET_STATIC', false);
define('BUILD_PLUGIN_STATIC', false);
const BUILD_SNIPPET_STATIC = false;
const BUILD_PLUGIN_STATIC = false;

$BUILD_RESOLVERS = array(
'extension',
'parser',
);
$BUILD_RESOLVERS = [
//'parser',
];
9 changes: 4 additions & 5 deletions _build/build.prepare.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?php

$root = dirname(dirname(__FILE__)) . '/';
$root = dirname(__FILE__, 2) . '/';
require_once $root . '_build/includes/functions.php';
$base = $root . 'core/components/pdotools/vendor/fenom/fenom/';

// Clean base dir
if ($dirs = @scandir($base)) {
foreach ($dirs as $dir) {
if (!in_array($dir, array('src', 'config', 'vendor', '.', '..'))) {
if (!in_array($dir, ['src', 'config', 'vendor', '.', '..'])) {
$path = $base . $dir;
if (is_dir($path)) {
removeDir($path);
}
else {
} else {
unlink($path);
}
}
Expand All @@ -21,4 +20,4 @@

// Clean vendors
// $base = $root . 'core/components/pdotools/vendor/fenom/fenom/vendor/';
// cleanPackages($base);
// cleanPackages($base);
Loading