Skip to content

Commit d4077d8

Browse files
authored
Merge pull request #19 from ignetic/main
Updated for EE3 - EE7
2 parents b2cf98b + 9fadf48 commit d4077d8

File tree

10 files changed

+494
-105
lines changed

10 files changed

+494
-105
lines changed

el_playamatrix_importer/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Playa & Matrix Importer for ExpressionEngine 2
1+
# Playa & Matrix Importer for ExpressionEngine 2 - 7
22

33
[![Build Status](https://travis-ci.org/EllisLab/PlayaMatrixImporter.svg?branch=master)](https://travis-ci.org/EllisLab/PlayaMatrixImporter)
44

@@ -8,9 +8,9 @@ This is a module for importing existing Playa and Matrix fields into new Relatio
88

99
This importer was developed and tested in the context of at least:
1010

11-
* ExpressionEngine 2.10.2
12-
* Matrix 2.6.1
13-
* Playa 4.5.2
11+
* ExpressionEngine 2.10.2 +
12+
* Matrix 2.6.1 +
13+
* Playa 4.5.2 +
1414

1515
Best to make sure any third-party celltypes you have that are also compatible with Grid are up-to-date as well to ensure their Grid implementations are in place.
1616

@@ -31,6 +31,7 @@ Each celltype native to Matrix has been mapped to a native EE near-equivalent. I
3131

3232
| Matrix celltype | Mapped native fieldtype |
3333
| ----------------------- | -------------------------------------------- |
34+
| Assets | Assets |
3435
| Date | Date |
3536
| Fieldpack Checkboxes | Checkboxes |
3637
| Fieldpack Dropdown | Select |
@@ -43,7 +44,9 @@ Each celltype native to Matrix has been mapped to a native EE near-equivalent. I
4344
| Number | Text (with number content type) |
4445
| Playa | Relationship |
4546
| Rich Text | Rich Text |
47+
| Wygwam | Wygwam |
4648
| Text | Text for single line, Textarea for multiline |
49+
| Structure | Structure |
4750

4851
## Gotchas
4952

@@ -68,6 +71,11 @@ If you run into anything, head on over to [the issues](https://github.com/EllisL
6871

6972
## Change Log
7073

74+
- 1.0.10 - Apr 25, 2023
75+
- Fixed issue with inserting field 'field_list_items' in sql strict mode (Mar 29, 2023)
76+
- Added support for Structure field in Matrix.
77+
- 1.0.9 - March 06, 2023
78+
- Enabled assets importing from Matrix columns. Tested in EE7.
7179
- 1.0.8 - June 21, 2017
7280
- Fixed a bug (#10) where the importer may error when encountering orphaned Playa or Assets data.
7381
- 1.0.7 - May 30, 2017
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
return array(
4+
'author' => 'Packet Tide',
5+
'author_url' => 'https://packettide.com/',
6+
'name' => 'Playa & Matrix Importer',
7+
'description' => 'Playa & Matrix Importer for ExpressionEngine 2-7',
8+
'version' => '1.0.10',
9+
'namespace' => 'User\Addons\PlayaMatrixImporter',
10+
'docs_url' => '',
11+
'settings_exist' => TRUE,
12+
);

el_playamatrix_importer/language/english/lang.el_playamatrix_importer.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@
77
'el_playamatrix_importer_module_description' =>
88
'Creates new Relationships and Grid fields from Playa and Matrix fields.',
99

10-
'el_playamatrix_importer_module_long_description' => "<p>This module will import existing Playa and Matrix fields into new Relationship and Grid fields. The import is <b>non-destructive</b>, meaning it doesn't convert or change the existing fields or data in any way. It creates <em>new</em> fields and copies the data over to them, so you have a chance to inspect and check that the import has done its job before you commit to the new fields.</p><p>Backup your database in case you want to rollback, then click Import to get started.</p>",
10+
'el_playamatrix_importer_module_long_description' => "<p>This module will import existing Playa and Matrix fields into new Relationship and Grid fields. The import is <b>non-destructive</b>, meaning it doesn't convert or change the existing fields or data in any way. It creates <b>new</b> fields and copies the data over to them, so you have a chance to inspect and check that the import has done its job before you commit to the new fields.</p><p>Backup your database in case you want to rollback, then click Import to get started.</p>",
11+
12+
'el_playamatrix_fields' => 'Playa & Matrix Fields',
1113

1214
'module_home' => 'Playa & Matrix Importer Home',
1315

1416
'grid_relationships_not_installed' => 'Please make sure both Grid and Relationships are installed before importing.',
1517

1618
'btn_import' => 'Import',
1719

18-
'import_completed' => 'Success: Import has created %d new Relationship fields and %d new Grid fields'
20+
'import_success' => 'Import Successful',
21+
'import_fail' => 'Import Failed',
22+
'import_completed' => 'Success: Import has created %d new Relationship fields and %d new Grid fields',
23+
'import_no_fields' => 'Failed: No Matrix or Playa fields selected'
1924
);
2025

2126
// EOF

el_playamatrix_importer/libraries/PlayaMatrixImporter/Converters/MatrixConverter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public static function convertMatrixColumns($columns, $grid_fieldtypes, $field_i
113113
public static function mapColumnType($from_cell_type, $settings, $grid_fieldtypes = array())
114114
{
115115
$col_type_mapping = array(
116+
'assets' => 'assets',
116117
'date' => 'date',
117118
'fieldpack_checkboxes' => 'checkboxes',
118119
'fieldpack_dropdown' => 'select',
@@ -125,7 +126,9 @@ public static function mapColumnType($from_cell_type, $settings, $grid_fieldtype
125126
'number' => 'text',
126127
'playa' => 'relationship',
127128
'rte' => 'rte',
128-
'text' => 'text'
129+
'wygwam' => 'wygwam',
130+
'text' => 'text',
131+
'structure' => 'structure'
129132
);
130133

131134
// Make sure Text celltypes with the multiline option set to 'y'

0 commit comments

Comments
 (0)