-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix some MIGX-grid width - issues and more
- Loading branch information
Showing
75 changed files
with
640 additions
and
1,776 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,55 @@ | ||
<?php | ||
|
||
/* | ||
$cats = array ( | ||
0 => 'MIGX', | ||
0 => 'MIGX', | ||
); | ||
return $cats; | ||
*/ | ||
|
||
|
||
//$packagepath = $modx->getOption('core_path') . 'components/' . $packageName . '/'; | ||
|
||
$element_types = 'snippets,chunks,plugins,templates'; | ||
$element_types = explode(',', $element_types); | ||
|
||
$cats = array(); | ||
|
||
foreach ($element_types as $element_type) { | ||
$elementspath = $packagepath . 'elements/' . $element_type . '/'; | ||
|
||
if (is_dir($elementspath)) { | ||
if ($handle = opendir($elementspath)) { | ||
while (false !== ($file = readdir($handle))) { | ||
$exploded = explode('.', $file); | ||
if (count($exploded) == 3 && $exploded[0] == $element_type && $exploded[2] == 'json') { | ||
$elements = @file_get_contents($elementspath . $file); | ||
$elements = $modx->fromJson($elements); | ||
if (is_array($elements)) { | ||
foreach ($elements as $element) { | ||
$category_name = $modx->getOption('category_name', $element, ''); | ||
$element_name = $modx->getOption($nameField, $element, ''); | ||
$filename = $modx->getOption('filename', $element, ''); | ||
|
||
if (!isset($cats[$category_name])) { | ||
$cats[$category_name] = array(); | ||
$cats[$category_name]['category'] = $category_name; | ||
} | ||
|
||
if (!isset($cats[$category_name][$element_type])) { | ||
$cats[$category_name][$element_type] = array(); | ||
} | ||
$element['content'] = @file_get_contents($elementspath . $filename); | ||
$cats[$category_name][$element_type][] = $element; | ||
|
||
} | ||
} | ||
} | ||
} | ||
closedir($handle); | ||
} | ||
} | ||
|
||
} | ||
|
||
return $cats; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id":1, | ||
"package":"MIGX", | ||
"packageDescription":"", | ||
"version":"2.9.6", | ||
"release":"pl", | ||
"menus":"[{\"MIGX_id\":\"1\",\"text\":\"migx\",\"parent\":\"\",\"description\":\"\",\"icon\":\"\",\"menuindex\":\"\",\"params\":\"&configs=packagemanager||migxconfigs||setup\",\"handler\":\"\",\"permissions\":\"\",\"action.id\":\"\",\"action.namespace\":\"\",\"action.controller\":\"\",\"action.haslayout\":\"0\",\"action.lang_topics\":\"\",\"action.assets\":\"\"}]" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.