mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Support for default media-category image in plugin.xml
This commit is contained in:
@@ -1861,12 +1861,14 @@ class e107plugin
|
||||
|
||||
$prevType = $type;
|
||||
|
||||
$data['owner'] = $folder;
|
||||
$data['category'] = $folder."_".$type;
|
||||
$data['title'] = $v['@value'];
|
||||
$data['sef'] = vartrue($v['@attributes']['sef']);
|
||||
$data['owner'] = $folder;
|
||||
$data['image'] = vartrue($v['@attributes']['image']);
|
||||
$data['category'] = $folder."_".$type;
|
||||
$data['title'] = $v['@value'];
|
||||
$data['sef'] = vartrue($v['@attributes']['sef']);
|
||||
// $data['type'] = $v['@attributes']['type']; //TODO
|
||||
$data['class'] = 253;
|
||||
$data['class'] = 253;
|
||||
|
||||
$status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
|
||||
$mes->add("Adding Media Category: {$data['category']}", $status);
|
||||
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>
|
||||
<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>
|
||||
<pluginPrefs>
|
||||
<pref name="popup_w">800</pref>
|
||||
|
Reference in New Issue
Block a user