mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Support for default media-category image in plugin.xml
This commit is contained in:
@@ -1861,12 +1861,14 @@ class e107plugin
|
|||||||
|
|
||||||
$prevType = $type;
|
$prevType = $type;
|
||||||
|
|
||||||
$data['owner'] = $folder;
|
$data['owner'] = $folder;
|
||||||
$data['category'] = $folder."_".$type;
|
$data['image'] = vartrue($v['@attributes']['image']);
|
||||||
$data['title'] = $v['@value'];
|
$data['category'] = $folder."_".$type;
|
||||||
$data['sef'] = vartrue($v['@attributes']['sef']);
|
$data['title'] = $v['@value'];
|
||||||
|
$data['sef'] = vartrue($v['@attributes']['sef']);
|
||||||
// $data['type'] = $v['@attributes']['type']; //TODO
|
// $data['type'] = $v['@attributes']['type']; //TODO
|
||||||
$data['class'] = 253;
|
$data['class'] = 253;
|
||||||
|
|
||||||
$status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
$status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||||
$mes->add("Adding Media Category: {$data['category']}", $status);
|
$mes->add("Adding Media Category: {$data['category']}", $status);
|
||||||
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
|
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
|
||||||
|
BIN
e107_plugins/gallery/images/butterfly.jpg
Normal file
BIN
e107_plugins/gallery/images/butterfly.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 KiB |
BIN
e107_plugins/gallery/images/horse.jpg
Normal file
BIN
e107_plugins/gallery/images/horse.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 328 KiB |
BIN
e107_plugins/gallery/images/lake-and-forest.jpg
Normal file
BIN
e107_plugins/gallery/images/lake-and-forest.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 310 KiB |
@@ -12,7 +12,7 @@
|
|||||||
<mainPrefs>
|
<mainPrefs>
|
||||||
</mainPrefs>
|
</mainPrefs>
|
||||||
<mediaCategories>
|
<mediaCategories>
|
||||||
<category type="image" sef="gallery-1">Gallery 1</category>
|
<category type="image" sef="gallery-1" image='{e_PLUGIN}gallery/images/butterfly.jpg'>Gallery 1</category>
|
||||||
</mediaCategories>
|
</mediaCategories>
|
||||||
<pluginPrefs>
|
<pluginPrefs>
|
||||||
<pref name="popup_w">800</pref>
|
<pref name="popup_w">800</pref>
|
||||||
|
Reference in New Issue
Block a user