Skip to content

Commit

Permalink
Merge pull request #41 from alexplusde/install-fallback-image
Browse files Browse the repository at this point in the history
Fallback-Bild bei Installation in den Medienpool hinzufügen
  • Loading branch information
alxndr-w authored Dec 16, 2023
2 parents 0f696e3 + 7e181d8 commit 838818e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,17 @@

/* Tablesets aktualisieren */
rex_yform_manager_table_api::importTablesets(rex_file::get(rex_path::addon(rex_addon::get('neues')->getName(), 'install/tableset.json')));

if(!rex_media::get('neues_entry_fallback_image.png')) {

rex_file::copy(rex_path::addon('neues', '/install/neues_entry_fallback_image.png'), rex_path::media('neues_entry_fallback_image.png'));
$data = [];
$data['title'] = 'Aktuelles - Fallback-Image';
$data['category_id'] = 0;
$data['file'] = [
'name' => "neues_entry_fallback_image.png",
'path' => rex_path::media('neues_entry_fallback_image.png'),
];

rex_media_service::addMedia($data, false);
}
Binary file added install/neues_entry_fallback_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ pages:

default_config:
default_author: "Redaktion"
default_thumbnail: ""
default_thumbnail: "neues_entry_fallback_iamge.png"
external_url_label: "Zur Website"
editor: 'class="form-control redactor-editor--default"'

0 comments on commit 838818e

Please sign in to comment.