Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback-Bild bei Installation in den Medienpool hinzufügen #41

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"'