1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Support for default media-category image in plugin.xml

This commit is contained in:
Cameron
2013-04-30 16:16:37 -07:00
parent 818501d31b
commit 2fdfdb0813
5 changed files with 8 additions and 6 deletions

View File

@@ -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');

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

View File

@@ -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>